From d5f5c8813da48f1914bd0b178faa75770ac6f230 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 16 Dec 2014 07:43:53 -0600 Subject: bind some cms flags --- src/cryptography/hazmat/bindings/openssl/cms.py | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/cms.py b/src/cryptography/hazmat/bindings/openssl/cms.py index 7cbedf44..e24980c6 100644 --- a/src/cryptography/hazmat/bindings/openssl/cms.py +++ b/src/cryptography/hazmat/bindings/openssl/cms.py @@ -25,6 +25,27 @@ typedef ... CMS_RevocationInfoChoice; typedef ... CMS_RecipientInfo; typedef ... CMS_ReceiptRequest; typedef ... CMS_Receipt; + +static const int CMS_TEXT; +static const int CMS_NOCERTS; +static const int CMS_NO_CONTENT_VERIFY; +static const int CMS_NO_ATTR_VERIFY; +static const int CMS_NOSIGS; +static const int CMS_NOINTERN; +static const int CMS_NO_SIGNER_CERT_VERIFY; +static const int CMS_NOVERIFY; +static const int CMS_DETACHED; +static const int CMS_BINARY; +static const int CMS_NOATTR; +static const int CMS_NOSMIMECAP; +static const int CMS_NOOLDMIMETYPE; +static const int CMS_CRLFEOL; +static const int CMS_STREAM; +static const int CMS_NOCRL; +static const int CMS_PARTIAL; +static const int CMS_REUSE_DIGEST; +static const int CMS_USE_KEYID; +static const int CMS_DEBUG_DECRYPT; """ FUNCTIONS = """ @@ -59,6 +80,26 @@ typedef void CMS_RevocationInfoChoice; typedef void CMS_RecipientInfo; typedef void CMS_ReceiptRequest; typedef void CMS_Receipt; +static const int CMS_TEXT = 0; +static const int CMS_NOCERTS = 0; +static const int CMS_NO_CONTENT_VERIFY = 0; +static const int CMS_NO_ATTR_VERIFY = 0; +static const int CMS_NOSIGS = 0; +static const int CMS_NOINTERN = 0; +static const int CMS_NO_SIGNER_CERT_VERIFY = 0; +static const int CMS_NOVERIFY = 0; +static const int CMS_DETACHED = 0; +static const int CMS_BINARY = 0; +static const int CMS_NOATTR = 0; +static const int CMS_NOSMIMECAP = 0; +static const int CMS_NOOLDMIMETYPE = 0; +static const int CMS_CRLFEOL = 0; +static const int CMS_STREAM = 0; +static const int CMS_NOCRL = 0; +static const int CMS_PARTIAL = 0; +static const int CMS_REUSE_DIGEST = 0; +static const int CMS_USE_KEYID = 0; +static const int CMS_DEBUG_DECRYPT = 0; BIO *(*BIO_new_CMS)(BIO *, CMS_ContentInfo *) = NULL; int (*i2d_CMS_bio_stream)(BIO *, CMS_ContentInfo *, BIO *, int) = NULL; int (*PEM_write_bio_CMS_stream)(BIO *, CMS_ContentInfo *, BIO *, int) = NULL; -- cgit v1.2.3 From d0f01c38429d9370d0776ec3a70a08671fe3c6c1 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 16 Dec 2014 07:48:59 -0600 Subject: properly remove flags that don't exist when CMS is not available --- src/cryptography/hazmat/bindings/openssl/cms.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/cms.py b/src/cryptography/hazmat/bindings/openssl/cms.py index e24980c6..5f2a8d36 100644 --- a/src/cryptography/hazmat/bindings/openssl/cms.py +++ b/src/cryptography/hazmat/bindings/openssl/cms.py @@ -128,5 +128,25 @@ CONDITIONAL_NAMES = { "CMS_encrypt", "CMS_decrypt", "CMS_add1_signer", + "CMS_TEXT", + "CMS_NOCERTS", + "CMS_NO_CONTENT_VERIFY", + "CMS_NO_ATTR_VERIFY", + "CMS_NOSIGS", + "CMS_NOINTERN", + "CMS_NO_SIGNER_CERT_VERIFY", + "CMS_NOVERIFY", + "CMS_DETACHED", + "CMS_BINARY", + "CMS_NOATTR", + "CMS_NOSMIMECAP", + "CMS_NOOLDMIMETYPE", + "CMS_CRLFEOL", + "CMS_STREAM", + "CMS_NOCRL", + "CMS_PARTIAL", + "CMS_REUSE_DIGEST", + "CMS_USE_KEYID", + "CMS_DEBUG_DECRYPT", ] } -- cgit v1.2.3 From 3b2f410981fbc9425b506f09ddd73e93447d1d76 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 16 Dec 2014 07:53:20 -0600 Subject: fix some cffi related warnings --- src/cryptography/hazmat/bindings/openssl/cms.py | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/cms.py b/src/cryptography/hazmat/bindings/openssl/cms.py index 5f2a8d36..a43df5d9 100644 --- a/src/cryptography/hazmat/bindings/openssl/cms.py +++ b/src/cryptography/hazmat/bindings/openssl/cms.py @@ -80,26 +80,26 @@ typedef void CMS_RevocationInfoChoice; typedef void CMS_RecipientInfo; typedef void CMS_ReceiptRequest; typedef void CMS_Receipt; -static const int CMS_TEXT = 0; -static const int CMS_NOCERTS = 0; -static const int CMS_NO_CONTENT_VERIFY = 0; -static const int CMS_NO_ATTR_VERIFY = 0; -static const int CMS_NOSIGS = 0; -static const int CMS_NOINTERN = 0; -static const int CMS_NO_SIGNER_CERT_VERIFY = 0; -static const int CMS_NOVERIFY = 0; -static const int CMS_DETACHED = 0; -static const int CMS_BINARY = 0; -static const int CMS_NOATTR = 0; -static const int CMS_NOSMIMECAP = 0; -static const int CMS_NOOLDMIMETYPE = 0; -static const int CMS_CRLFEOL = 0; -static const int CMS_STREAM = 0; -static const int CMS_NOCRL = 0; -static const int CMS_PARTIAL = 0; -static const int CMS_REUSE_DIGEST = 0; -static const int CMS_USE_KEYID = 0; -static const int CMS_DEBUG_DECRYPT = 0; +const long CMS_TEXT = 0; +const long CMS_NOCERTS = 0; +const long CMS_NO_CONTENT_VERIFY = 0; +const long CMS_NO_ATTR_VERIFY = 0; +const long CMS_NOSIGS = 0; +const long CMS_NOINTERN = 0; +const long CMS_NO_SIGNER_CERT_VERIFY = 0; +const long CMS_NOVERIFY = 0; +const long CMS_DETACHED = 0; +const long CMS_BINARY = 0; +const long CMS_NOATTR = 0; +const long CMS_NOSMIMECAP = 0; +const long CMS_NOOLDMIMETYPE = 0; +const long CMS_CRLFEOL = 0; +const long CMS_STREAM = 0; +const long CMS_NOCRL = 0; +const long CMS_PARTIAL = 0; +const long CMS_REUSE_DIGEST = 0; +const long CMS_USE_KEYID = 0; +const long CMS_DEBUG_DECRYPT = 0; BIO *(*BIO_new_CMS)(BIO *, CMS_ContentInfo *) = NULL; int (*i2d_CMS_bio_stream)(BIO *, CMS_ContentInfo *, BIO *, int) = NULL; int (*PEM_write_bio_CMS_stream)(BIO *, CMS_ContentInfo *, BIO *, int) = NULL; -- cgit v1.2.3