aboutsummaryrefslogtreecommitdiff
path: root/py11
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-09-15 16:03:56 -0400
committerRob Austein <sra@hactrn.net>2015-09-15 16:03:56 -0400
commit4efbecd181140499b3bffac76cc35539d4ab37e0 (patch)
tree4056651121eeabc19c1d97709f91c12d3aaf5762 /py11
parentcdb4d3a72091bebc4f0763980aabcea5dc0bc93d (diff)
py11 support for C_CreateObject().
Diffstat (limited to 'py11')
-rw-r--r--py11/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/py11/__init__.py b/py11/__init__.py
index 204c897..fa6e0f5 100644
--- a/py11/__init__.py
+++ b/py11/__init__.py
@@ -116,6 +116,12 @@ class PKCS11 (object):
def C_Verify(self, session, data, signature):
self.so.C_Verify(session, data, len(data), signature, len(signature))
+ def C_CreateObject(self, session, template):
+ template = self.adb.to_ctypes(template)
+ handle = CK_OBJECT_HANDLE()
+ self.so.C_CreateObject(session, template, len(template), byref(handle))
+ return handle.value
+
__all__ = ["PKCS11"]
__all__.extend(name for name in globals()
if name.startswith("CK")