mirror of
https://github.com/openkmip/pykmip
synced 2025-12-22 03:03:16 +00:00
Add cryptographic usage mask support for DeriveKey
This change updates the ProxyKmipClient support for the DeriveKey operation, now allowing the caller to specify a list of CryptographicUsageMask enumerations to set on the newly derived key. Fixes #417
This commit is contained in:
@@ -484,6 +484,13 @@ class ProxyKmipClient(object):
|
||||
kwargs.get('cryptographic_algorithm')
|
||||
)
|
||||
)
|
||||
if kwargs.get('cryptographic_usage_mask'):
|
||||
attributes.append(
|
||||
self.attribute_factory.create_attribute(
|
||||
enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK,
|
||||
kwargs.get('cryptographic_usage_mask')
|
||||
)
|
||||
)
|
||||
template_attribute = cobjects.TemplateAttribute(
|
||||
attributes=attributes
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user