mirror of
https://github.com/openkmip/pykmip
synced 2025-12-23 19:53:24 +00:00
Add necessary objects/attributes and payloads for MAC operation
This commit is contained in:
@@ -140,6 +140,9 @@ class AttributeValueFactory(object):
|
||||
padding_method = None
|
||||
hashing_algorithm = None
|
||||
key_role_type = None
|
||||
digital_signature_algorithm = None
|
||||
cryptographic_algorithm = None
|
||||
# TODO: Need to implement other fields of CryptographicParameters (3.6)
|
||||
|
||||
if params is not None:
|
||||
|
||||
@@ -162,11 +165,23 @@ class AttributeValueFactory(object):
|
||||
hashing_algorithm = attributes.HashingAlgorithm(
|
||||
params.get("hashing_algorithm"))
|
||||
|
||||
if 'digital_signature_algorithm' in params:
|
||||
digital_signature_algorithm = \
|
||||
attributes.CryptographicParameters. \
|
||||
DigitalSignatureAlgorithm(
|
||||
params.get("digital_signature_algorithm"))
|
||||
|
||||
if 'cryptographic_algorithm' in params:
|
||||
cryptographic_algorithm = attributes.CryptographicAlgorithm(
|
||||
params.get("cryptographic_algorithm"))
|
||||
|
||||
return attributes.CryptographicParameters(
|
||||
block_cipher_mode=bcm,
|
||||
padding_method=padding_method,
|
||||
hashing_algorithm=hashing_algorithm,
|
||||
key_role_type=key_role_type)
|
||||
key_role_type=key_role_type,
|
||||
digital_signature_algorithm=digital_signature_algorithm,
|
||||
cryptographic_algorithm=cryptographic_algorithm)
|
||||
|
||||
def _create_cryptographic_usage_mask(self, flags):
|
||||
mask = None
|
||||
|
||||
Reference in New Issue
Block a user