diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-22 09:51:21 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-22 09:51:21 -0600 |
commit | 7aa92312a47dc1ea79b2b1869881711115b80af6 (patch) | |
tree | 8f7e7b1f696c964a753cb26eb2da4fed6f03d989 | |
parent | 017d0fd513f684a42262e72275142e561f5c5b89 (diff) | |
parent | 973fc268f73fcaed24b2324fe8b30217c35a06fd (diff) | |
download | cryptography-7aa92312a47dc1ea79b2b1869881711115b80af6.tar.gz cryptography-7aa92312a47dc1ea79b2b1869881711115b80af6.tar.bz2 cryptography-7aa92312a47dc1ea79b2b1869881711115b80af6.zip |
Merge pull request #665 from public/evp-pkey-attributes
Bind X509 attribute methods for EVP_PKEYs
-rw-r--r-- | cryptography/hazmat/bindings/openssl/evp.py | 13 | ||||
-rw-r--r-- | cryptography/hazmat/bindings/openssl/x509.py | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/cryptography/hazmat/bindings/openssl/evp.py b/cryptography/hazmat/bindings/openssl/evp.py index e882bb33..a5e19c3a 100644 --- a/cryptography/hazmat/bindings/openssl/evp.py +++ b/cryptography/hazmat/bindings/openssl/evp.py @@ -105,6 +105,19 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *, int, const unsigned char *, int, int, int EVP_PKEY_set1_RSA(EVP_PKEY *, struct rsa_st *); int EVP_PKEY_set1_DSA(EVP_PKEY *, struct dsa_st *); + +int EVP_PKEY_get_attr_count(const EVP_PKEY *); +int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *, int, int); +int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *, ASN1_OBJECT *, int); +X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *, int); +X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *, int); +int EVP_PKEY_add1_attr(EVP_PKEY *, X509_ATTRIBUTE *); +int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *, const ASN1_OBJECT *, int, + const unsigned char *, int); +int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *, int, int, + const unsigned char *, int); +int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *, const char *, int, + const unsigned char *, int); """ MACROS = """ diff --git a/cryptography/hazmat/bindings/openssl/x509.py b/cryptography/hazmat/bindings/openssl/x509.py index 93098fc7..95c88b3a 100644 --- a/cryptography/hazmat/bindings/openssl/x509.py +++ b/cryptography/hazmat/bindings/openssl/x509.py @@ -34,6 +34,8 @@ typedef struct { ...; } X509_ALGOR; +typedef ... X509_ATTRIBUTE; + typedef struct { X509_ALGOR *signature; ...; |