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>
(cherry picked from commit eaa0e14cb2)
This commit is contained in:
Rakshith R 2022-08-24 12:30:30 +05:30 committed by mergify[bot]
parent 0dde0e32b1
commit f3675f4f28

View File

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