]> wagner.pp.ru Git - oss/ctypescrypto.git/commitdiff
Added prototypes for CMS_get0_type and OBJ_obj2nid
authorVictor Wagner <vitus@wagner.pp.ru>
Mon, 20 Jun 2016 14:48:33 +0000 (17:48 +0300)
committerVictor Wagner <vitus@wagner.pp.ru>
Mon, 20 Jun 2016 14:48:33 +0000 (17:48 +0300)
ctypescrypto/__init__.py
ctypescrypto/cms.py
ctypescrypto/oid.py

index c55ae11842d566a6e66b3e772012db690602b9ba..1213398b08ff7069421841fe090175cd9ff6f7de 100644 (file)
@@ -25,6 +25,8 @@ else:
 if __libname__ is None:
     raise OSError("Cannot find OpenSSL crypto library")
 
+#__libname__ = "/usr/local/ssl/lib/libcrypto.so.1.1"
+
 libcrypto = CDLL(__libname__)
 libcrypto.OPENSSL_config.argtypes = (c_char_p, )
 libcrypto.OPENSSL_add_all_algorithms_conf()
index 685d52bd642c1cde132c002f5c1f65b5d87eac2b..f7e5e166325cf4f057e3dc5d3b55addd8e7ea7d1 100644 (file)
@@ -306,6 +306,8 @@ class EncryptedData(CMSBase):
 __all__ = ['CMS', 'CMSError', 'Flags', 'SignedData', 'EnvelopedData',
            'EncryptedData']
 
+libcrypto.CMS_get0_type.restype = c_void_p
+libcrypto.CMS_get0_type.argtypes = (c_void_p,)
 libcrypto.CMS_add1_cert.restype = c_int
 libcrypto.CMS_add1_cert.argtypes = (c_void_p, c_void_p)
 libcrypto.CMS_decrypt.restype = c_int
index 28e12baa0ee64118cce86296d2a8082615d6c882..569739e6b7360c8c411580957847afd4117143e2 100644 (file)
@@ -139,6 +139,8 @@ def cleanup():
 libcrypto.OBJ_nid2sn.restype = c_char_p
 libcrypto.OBJ_nid2ln.restype = c_char_p
 libcrypto.OBJ_nid2obj.restype = c_void_p
+libcrypto.OBJ_obj2nid.restype = c_int
 libcrypto.OBJ_obj2txt.argtypes = (c_char_p, c_int, c_void_p, c_int)
 libcrypto.OBJ_txt2nid.argtupes = (c_char_p, )
+libcrypto.OBJ_obj2nid.argtupes = (c_void_p, )
 libcrypto.OBJ_create.argtypes = (c_char_p, c_char_p, c_char_p)