]> www.wagner.pp.ru Git - oss/ctypescrypto.git/blobdiff - ctypescrypto/cms.py
Improved test coverage of oid.py
[oss/ctypescrypto.git] / ctypescrypto / cms.py
index 685d52bd642c1cde132c002f5c1f65b5d87eac2b..4250cbee3ebd66f125cf38553b7b7ba10c029243 100644 (file)
@@ -84,7 +84,7 @@ class CMSBase(object):
         """
         bio = Membio()
         if not libcrypto.i2d_CMS_bio(bio.bio, self.ptr):
-            raise CMSError("writing CMS to PEM")
+            raise CMSError("writing CMS to DER")
         return str(bio)
 
     def pem(self):
@@ -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