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:
@@ -805,8 +805,8 @@ class PKCS11(object):
|
|||||||
if self.key_wrap_gen_iv:
|
if self.key_wrap_gen_iv:
|
||||||
iv_len = {
|
iv_len = {
|
||||||
'CKM_AES_CBC_PAD': 16, # bytes
|
'CKM_AES_CBC_PAD': 16, # bytes
|
||||||
'CKM_AES_WRAP_PAD': 8, # bytes
|
'CKM_AES_KEY_WRAP_PAD': 8, # bytes
|
||||||
'CKM_AES_KEY_WRAP_KWP': 4 # bytes
|
'CKM_AES_KEY_WRAP_KWP': 4 # bytes
|
||||||
}.get(self.key_wrap_mechanism)
|
}.get(self.key_wrap_mechanism)
|
||||||
iv = self._generate_random(iv_len, session)
|
iv = self._generate_random(iv_len, session)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user