Fix typo in wrap_key function

This patch fixes a typo in one of the mechanisms in the
PKCS11.wrap_key() function in the pkcs11 module.

Closes-Bug: #2036506
Change-Id: I0b4b43cc64a2c18b8e99ab85bbcad05c46611d8d
This commit is contained in:
Douglas Mendizabal 2024-11-14 15:39:37 -05:00
parent 0d4101fa5d
commit 7b36764cd1

View File

@ -805,8 +805,8 @@ class PKCS11(object):
if self.key_wrap_gen_iv:
iv_len = {
'CKM_AES_CBC_PAD': 16, # bytes
'CKM_AES_WRAP_PAD': 8, # bytes
'CKM_AES_KEY_WRAP_KWP': 4 # bytes
'CKM_AES_KEY_WRAP_PAD': 8, # bytes
'CKM_AES_KEY_WRAP_KWP': 4 # bytes
}.get(self.key_wrap_mechanism)
iv = self._generate_random(iv_len, session)
else: