diff options
author | Rob Austein <sra@hactrn.net> | 2015-09-16 01:09:07 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-09-16 01:09:07 -0400 |
commit | fcb9943a4f1103768f225395f2ea4d7a2ff0d3a8 (patch) | |
tree | ca6ad1b261ae5925d999558e97c3d286cb00dd19 | |
parent | 405a65dea4ef1c12aaec4e232dc3a4b123ca3017 (diff) |
Call correct underlying methods from wrappers.
-rw-r--r-- | py11/__init__.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/py11/__init__.py b/py11/__init__.py index af7e053..ab187f7 100644 --- a/py11/__init__.py +++ b/py11/__init__.py @@ -114,9 +114,9 @@ class PKCS11 (object): def C_SignFinal(self, session): n = CK_ULONG() - self.so.C_Sign(session, None, byref(n)) + self.so.C_SignFinal(session, None, byref(n)) sig = create_string_buffer(n.value) - self.so.C_Sign(session, sig, byref(n)) + self.so.C_SignFinal(session, sig, byref(n)) return sig.raw def C_VerifyInit(self, session, mechanism_type, public_key): @@ -127,10 +127,10 @@ class PKCS11 (object): self.so.C_Verify(session, data, len(data), signature, len(signature)) def C_VerifyUpdate(self, session, data): - self.so.C_Verify(session, data, len(data)) + self.so.C_VerifyUpdate(session, data, len(data)) def C_VerifyFinal(self, session, signature): - self.so.C_Verify(session, signature, len(signature)) + self.so.C_VerifyFinal(session, signature, len(signature)) def C_CreateObject(self, session, template): template = self.adb.to_ctypes(template) @@ -154,9 +154,9 @@ class PKCS11 (object): def C_DigestFinal(self, session): n = CK_ULONG() - self.so.C_Digest(session, None, byref(n)) + self.so.C_DigestFinal(session, None, byref(n)) hash = create_string_buffer(n.value) - self.so.C_Digest(session, hash, byref(n)) + self.so.C_DigestFinal(session, hash, byref(n)) return hash.raw __all__ = ["PKCS11"] |