From fcb9943a4f1103768f225395f2ea4d7a2ff0d3a8 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 16 Sep 2015 01:09:07 -0400 Subject: Call correct underlying methods from wrappers. --- py11/__init__.py | 12 ++++++------ 1 file 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"] -- cgit v1.2.3