From: Jakub Zelenka Date: Tue, 19 Jul 2016 19:12:28 +0000 (+0100) Subject: Add missing X509_get_signature_nid for 1.0.1 X-Git-Tag: php-7.1.0beta1~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98ac90b7e252f35e6b5500cc0fa56914dcc350f0;p=php Add missing X509_get_signature_nid for 1.0.1 --- 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 /* }}} */