diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-03 16:58:06 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-04-03 16:58:15 +1000 |
commit | 9c2be15399e2026849529cd7bc79df2b0bfff4a9 (patch) | |
tree | 69a138fb1e0d5a909a90ca892192fdb40799cabb | |
parent | e9f16fa7037f72c02f4dc82a93f852d08d08ca39 (diff) | |
download | luaossl-9c2be15399e2026849529cd7bc79df2b0bfff4a9.tar.gz luaossl-9c2be15399e2026849529cd7bc79df2b0bfff4a9.tar.bz2 luaossl-9c2be15399e2026849529cd7bc79df2b0bfff4a9.zip |
Add compat with openssl < 1.0.2 for X509_get_signature_nid
-rw-r--r-- | src/openssl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c index a640ed6..dd406bc 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -302,6 +302,10 @@ #define HAVE_SSLV2_SERVER_METHOD (!OPENSSL_PREREQ(1,1,0) && !defined OPENSSL_NO_SSL2) #endif +#ifndef HAVE_X509_GET_SIGNATURE_NID +#define HAVE_X509_GET_SIGNATURE_NID (OPENSSL_PREREQ(1,0,2)) +#endif + #ifndef HAVE_X509_STORE_REFERENCES #define HAVE_X509_STORE_REFERENCES (!OPENSSL_PREREQ(1,1,0)) #endif @@ -1615,6 +1619,10 @@ static int compat_SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm) { #define X509_get0_ext(crt, i) X509_get_ext((crt), (i)) #endif +#if !HAVE_X509_GET_SIGNATURE_NID +#define X509_get_signature_nid(crt) OBJ_obj2nid((crt)->sig_alg->algorithm) +#endif + #if !HAVE_X509_CRL_GET0_EXT #define X509_CRL_get0_ext(crt, i) X509_CRL_get_ext((crt), (i)) #endif |