2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 15:53:36 +00:00

Fix cryptographic usage mask handling for CreateKeyPair

This change fixes how the ProxyKmipClient handles cryptographic
usage mask values for the CreateKeyPair operation. Originally,
both Encrypt and Decrypt were set by default for both public and
private keys. This is incorrect behavior for certain algorithms.
Now, only the masks specified by the caller are set on the key
pair.

Fixes #412
This commit is contained in:
Peter Hamilton
2018-04-11 21:43:07 -04:00
parent 3c59dcf61a
commit 950e98569e
4 changed files with 35 additions and 33 deletions

View File

@@ -2453,6 +2453,8 @@ class TemplateAttribute(Struct):
if len(self.attributes) != len(other.attributes):
return False
# TODO (peter-hamilton) Allow order independence?
for i in xrange(len(self.names)):
a = self.names[i]
b = other.names[i]