rbd: fix bug in kmip kms Decrypt function

This commit fixes a bug in kmip kms Decrypt
function, where emd.DEK was fed in a Nonce
instead of emd.Nonce by mistake.

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R 2022-08-24 12:30:30 +05:30 committed by mergify[bot]
parent 96a3aabe5a
commit eaa0e14cb2

View File

@ -255,7 +255,7 @@ func (kms *kmipKMS) DecryptDEK(_, encryptedDEK string) (string, error) {
DecryptRequestPayload{
UniqueIdentifier: kms.uniqueIdentifier,
Data: emd.DEK,
IVCounterNonce: emd.DEK,
IVCounterNonce: emd.Nonce,
CryptographicParameters: kmip.CryptographicParameters{
PaddingMethod: kmip14.PaddingMethodPKCS5,
CryptographicAlgorithm: kmip14.CryptographicAlgorithmAES,