From 31d449e31db013500f57b4e2389c2489a39d2b6e Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 24 Apr 2014 20:06:57 -0500 Subject: add more d2i/i2d bindings because sometimes you just don't want bios --- cryptography/hazmat/bindings/openssl/x509.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cryptography/hazmat/bindings/openssl/x509.py b/cryptography/hazmat/bindings/openssl/x509.py index 92870369..68658ebf 100644 --- a/cryptography/hazmat/bindings/openssl/x509.py +++ b/cryptography/hazmat/bindings/openssl/x509.py @@ -183,8 +183,13 @@ const char *X509_get_default_private_dir(void); int i2d_RSA_PUBKEY(RSA *, unsigned char **); RSA *d2i_RSA_PUBKEY(RSA **, const unsigned char **, long); +RSA * d2i_RSAPublicKey(RSA **, const unsigned char **, long); +RSA *d2i_RSAPrivateKey(RSA **, const unsigned char **, long); int i2d_DSA_PUBKEY(DSA *, unsigned char **); DSA *d2i_DSA_PUBKEY(DSA **, const unsigned char **, long); +DSA * d2i_DSAPublicKey(DSA **, const unsigned char **, long); +DSA *d2i_DSAPrivateKey(DSA **, const unsigned char **, long); + RSA *d2i_RSAPrivateKey_bio(BIO *, RSA **); int i2d_RSAPrivateKey_bio(BIO *, RSA *); @@ -223,6 +228,11 @@ void sk_X509_EXTENSION_free(X509_EXTENSIONS *); int sk_X509_REVOKED_num(Cryptography_STACK_OF_X509_REVOKED *); X509_REVOKED *sk_X509_REVOKED_value(Cryptography_STACK_OF_X509_REVOKED *, int); +int i2d_RSAPublicKey(RSA *, unsigned char **); +int i2d_RSAPrivateKey(RSA *, unsigned char **); +int i2d_DSAPublicKey(DSA *, unsigned char **); +int i2d_DSAPrivateKey(DSA *, unsigned char **); + /* These aren't macros these arguments are all const X on openssl > 1.0.x */ int X509_CRL_set_lastUpdate(X509_CRL *, ASN1_TIME *); int X509_CRL_set_nextUpdate(X509_CRL *, ASN1_TIME *); -- cgit v1.2.3 From a179ff84891550e4186cd421e1f0e11a7f818414 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 24 Apr 2014 20:14:57 -0500 Subject: fix a style violation --- cryptography/hazmat/bindings/openssl/x509.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptography/hazmat/bindings/openssl/x509.py b/cryptography/hazmat/bindings/openssl/x509.py index 68658ebf..36a15e4a 100644 --- a/cryptography/hazmat/bindings/openssl/x509.py +++ b/cryptography/hazmat/bindings/openssl/x509.py @@ -183,11 +183,11 @@ const char *X509_get_default_private_dir(void); int i2d_RSA_PUBKEY(RSA *, unsigned char **); RSA *d2i_RSA_PUBKEY(RSA **, const unsigned char **, long); -RSA * d2i_RSAPublicKey(RSA **, const unsigned char **, long); +RSA *d2i_RSAPublicKey(RSA **, const unsigned char **, long); RSA *d2i_RSAPrivateKey(RSA **, const unsigned char **, long); int i2d_DSA_PUBKEY(DSA *, unsigned char **); DSA *d2i_DSA_PUBKEY(DSA **, const unsigned char **, long); -DSA * d2i_DSAPublicKey(DSA **, const unsigned char **, long); +DSA *d2i_DSAPublicKey(DSA **, const unsigned char **, long); DSA *d2i_DSAPrivateKey(DSA **, const unsigned char **, long); -- cgit v1.2.3