aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-06-01 21:47:10 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-06-01 21:47:10 -0700
commit5f92c14a359d6e4fe6bd918c90f814b13c46965c (patch)
treef5601591b770edef8a63d757ce7372b6f4639697 /src/_cffi_src
parent8c3eafa23cf6531a0edee873b2f7da339f3c2857 (diff)
downloadcryptography-5f92c14a359d6e4fe6bd918c90f814b13c46965c.tar.gz
cryptography-5f92c14a359d6e4fe6bd918c90f814b13c46965c.tar.bz2
cryptography-5f92c14a359d6e4fe6bd918c90f814b13c46965c.zip
backport a function from 1.1.0 for x.509 (#2939)
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/x509.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py
index b0ff9844..28f00da7 100644
--- a/src/_cffi_src/openssl/x509.py
+++ b/src/_cffi_src/openssl/x509.py
@@ -281,6 +281,7 @@ int i2d_X509_REQ_INFO(X509_REQ_INFO *, unsigned char **);
/* new in 1.0.2 */
int i2d_re_X509_tbs(X509 *, unsigned char **);
void X509_get0_signature(ASN1_BIT_STRING **, X509_ALGOR **, X509 *);
+int X509_get_signature_nid(const X509 *);
long X509_get_version(X509 *);
@@ -377,6 +378,12 @@ void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
if (palg)
*palg = x->sig_alg;
}
+
+int X509_get_signature_nid(const X509 *x)
+{
+ return OBJ_obj2nid(x->sig_alg->algorithm);
+}
+
#endif
/* Added in 1.0.2 but we need it in all versions now due to the great
opaquing. */