From eaa0e14cb20baafe1884f839f01dd698c7370213 Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Wed, 24 Aug 2022 12:30:30 +0530 Subject: [PATCH] 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 --- internal/kms/kmip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kms/kmip.go b/internal/kms/kmip.go index f4862691a..a842c0ac7 100644 --- a/internal/kms/kmip.go +++ b/internal/kms/kmip.go @@ -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,