[Cryptech-Commits] [sw/libhal] 04/04: Support setting attributes via keyword arguments.
git at cryptech.is
git at cryptech.is
Mon Mar 6 22:16:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
sra at hactrn.net pushed a commit to branch pymux
in repository sw/libhal.
commit bcb43f6d1662d27e0a74b9705ad0d559fe4164e1
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Mon Mar 6 17:15:55 2017 -0500
Support setting attributes via keyword arguments.
---
libhal.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libhal.py b/libhal.py
index 3063398..53e5fe8 100644
--- a/libhal.py
+++ b/libhal.py
@@ -391,8 +391,9 @@ class PKey(Handle):
def verify(self, hash = 0, data = "", signature = None):
self.hsm.pkey_verify(self, hash = hash, data = data, signature = signature)
- def set_attributes(self, attributes):
- self.hsm.pkey_set_attributes(self, attributes)
+ def set_attributes(self, attributes = None, **kwargs):
+ assert if attributes is None or not kwargs
+ self.hsm.pkey_set_attributes(self, attributes or kwargs)
def get_attributes(self, attributes):
attrs = self.hsm.pkey_get_attributes(self, attributes, 0)
More information about the Commits
mailing list