diff options
author | daurnimator <quae@daurnimator.com> | 2017-08-30 22:46:59 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-08-31 01:09:46 +1000 |
commit | 52b637bb43c7fbe5ae0d67f939acdaed5e7426f0 (patch) | |
tree | 8989aa6be8bd94c4a28d2e1bba7f7c810760f5bc | |
parent | 24c947d934703c5b59edfe8229f9fa5202ffc86d (diff) | |
download | luaossl-52b637bb43c7fbe5ae0d67f939acdaed5e7426f0.tar.gz luaossl-52b637bb43c7fbe5ae0d67f939acdaed5e7426f0.tar.bz2 luaossl-52b637bb43c7fbe5ae0d67f939acdaed5e7426f0.zip |
Fix openssl 0.9.8 compat (missing sk_OPENSSL_STRING_* functions)
-rw-r--r-- | src/openssl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c index a3e5637..2cfad4a 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -333,6 +333,10 @@ #define HAVE_SSLV2_SERVER_METHOD (!OPENSSL_PREREQ(1,1,0) && !defined OPENSSL_NO_SSL2) #endif +#ifndef HAVE_STACK_OPENSSL_STRING_FUNCS +#define HAVE_STACK_OPENSSL_STRING_FUNCS (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) +#endif + #ifndef HAVE_X509_GET_SIGNATURE_NID #define HAVE_X509_GET_SIGNATURE_NID OPENSSL_PREREQ(1,0,2) #endif @@ -1698,6 +1702,12 @@ static int compat_SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm) { } /* compat_SSL_CTX_set1_param() */ #endif +#if !HAVE_STACK_OPENSSL_STRING_FUNCS +#define sk_OPENSSL_STRING_num(s) sk_num(s) +#define sk_OPENSSL_STRING_value(s, i) sk_value((s), (i)) +#define sk_OPENSSL_STRING_free(s) X509_email_free(s) +#endif + #if !HAVE_X509_GET0_EXT #define X509_get0_ext(crt, i) X509_get_ext((crt), (i)) #endif |