From 98ac90b7e252f35e6b5500cc0fa56914dcc350f0 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 19 Jul 2016 20:12:28 +0100 Subject: Add missing X509_get_signature_nid for 1.0.1 --- ext/openssl/openssl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 326e32ea27..e01d4a50e6 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -669,6 +669,15 @@ int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) return 1; } +#if OPENSSL_VERSION_NUMBER < 0x10002000L + +static int X509_get_signature_nid(const X509 *x) +{ + return OBJ_obj2nid(x->sig_alg->algorithm); +} + +#endif + #endif /* }}} */ -- cgit v1.2.1