From 4573e5d31657d368efbc051424f3e06b94ffce1a Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Thu, 10 Sep 2015 15:12:41 +0300 Subject: [PATCH] Fix CMS module --- ctypescrypto/cms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ctypescrypto/cms.py b/ctypescrypto/cms.py index bc27e9e..1e53387 100644 --- a/ctypescrypto/cms.py +++ b/ctypescrypto/cms.py @@ -140,7 +140,7 @@ class SignedData(CMSBase): raise ValueError("Specified keypair has no private part") if cert.pubkey != pkey: raise ValueError("Certificate doesn't match public key") - if libcrypto.CMS_sign_add1_Signer(self.ptr, cert.cert, pkey.ptr, + if libcrypto.CMS_add1_signer(self.ptr, cert.cert, pkey.ptr, digest_type.digest, flags) is None: raise CMSError("adding signer") if flags & Flags.REUSE_DIGEST == 0: @@ -325,8 +325,8 @@ libcrypto.CMS_get1_certs.restype = c_void_p libcrypto.CMS_get1_certs.argtypes = (c_void_p, ) libcrypto.CMS_sign.restype = c_void_p libcrypto.CMS_sign.argtypes = (c_void_p, c_void_p, c_void_p, c_void_p, c_uint) -libcrypto.CMS_sign_add1_Signer.restype = c_void_p -libcrypto.CMS_sign_add1_Signer.argtypes = (c_void_p, c_void_p, c_void_p, +libcrypto.CMS_add1_signer.restype = c_void_p +libcrypto.CMS_add1_signer.argtypes = (c_void_p, c_void_p, c_void_p, c_void_p, c_uint) libcrypto.CMS_verify.restype = c_int libcrypto.CMS_verify.argtypes = (c_void_p, c_void_p, c_void_p, c_void_p, -- 2.39.5