diff options
author | daurnimator <quae@daurnimator.com> | 2018-05-29 15:16:55 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-05-29 15:24:34 +1000 |
commit | bf7138e1e587670e63aa1023f3a81694031b55f8 (patch) | |
tree | d907145e7dad01f1606fb04125de866483bd4702 /src | |
parent | bc8678bb2120f3ecf529ce3789b3a432a035771e (diff) | |
download | luaossl-bf7138e1e587670e63aa1023f3a81694031b55f8.tar.gz luaossl-bf7138e1e587670e63aa1023f3a81694031b55f8.tar.bz2 luaossl-bf7138e1e587670e63aa1023f3a81694031b55f8.zip |
src/openssl.c: Update defines for new LibreSSL releases
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 98 |
1 files changed, 53 insertions, 45 deletions
diff --git a/src/openssl.c b/src/openssl.c index 4a8649b..2601077 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -126,39 +126,39 @@ #endif #ifndef HAVE_ASN1_STRING_GET0_DATA -#define HAVE_ASN1_STRING_GET0_DATA OPENSSL_PREREQ(1,1,0) +#define HAVE_ASN1_STRING_GET0_DATA (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DH_GET0_KEY -#define HAVE_DH_GET0_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_DH_GET0_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DH_GET0_PQG -#define HAVE_DH_GET0_PQG OPENSSL_PREREQ(1,1,0) +#define HAVE_DH_GET0_PQG (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DH_SET0_KEY -#define HAVE_DH_SET0_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_DH_SET0_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DH_SET0_PQG -#define HAVE_DH_SET0_PQG OPENSSL_PREREQ(1,1,0) +#define HAVE_DH_SET0_PQG (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DSA_GET0_KEY -#define HAVE_DSA_GET0_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_DSA_GET0_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DSA_GET0_PQG -#define HAVE_DSA_GET0_PQG OPENSSL_PREREQ(1,1,0) +#define HAVE_DSA_GET0_PQG (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DSA_SET0_KEY -#define HAVE_DSA_SET0_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_DSA_SET0_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DSA_SET0_PQG -#define HAVE_DSA_SET0_PQG OPENSSL_PREREQ(1,1,0) +#define HAVE_DSA_SET0_PQG (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_DTLSV1_CLIENT_METHOD @@ -198,27 +198,27 @@ #endif #ifndef HAVE_EVP_CIPHER_CTX_FREE -#define HAVE_EVP_CIPHER_CTX_FREE OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_CIPHER_CTX_FREE (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_EVP_CIPHER_CTX_NEW -#define HAVE_EVP_CIPHER_CTX_NEW OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_CIPHER_CTX_NEW (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_EVP_MD_CTX_FREE -#define HAVE_EVP_MD_CTX_FREE OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_MD_CTX_FREE (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_EVP_MD_CTX_NEW -#define HAVE_EVP_MD_CTX_NEW OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_MD_CTX_NEW (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_EVP_PKEY_GET_DEFAULT_DIGEST_NID -#define HAVE_EVP_PKEY_GET_DEFAULT_DIGEST_NID OPENSSL_PREREQ(0,9,9) +#define HAVE_EVP_PKEY_GET_DEFAULT_DIGEST_NID (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_EVP_PKEY_BASE_ID -#define HAVE_EVP_PKEY_BASE_ID OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_PKEY_BASE_ID (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_EVP_PKEY_CTX_NEW @@ -226,19 +226,19 @@ #endif #ifndef HAVE_EVP_PKEY_GET0 -#define HAVE_EVP_PKEY_GET0 OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_PKEY_GET0 (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_EVP_PKEY_ID -#define HAVE_EVP_PKEY_ID OPENSSL_PREREQ(1,1,0) +#define HAVE_EVP_PKEY_ID (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_HMAC_CTX_FREE -#define HAVE_HMAC_CTX_FREE OPENSSL_PREREQ(1,1,0) +#define HAVE_HMAC_CTX_FREE (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_HMAC_CTX_NEW -#define HAVE_HMAC_CTX_NEW OPENSSL_PREREQ(1,1,0) +#define HAVE_HMAC_CTX_NEW (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_I2D_RE_X509_REQ_TBS @@ -246,27 +246,27 @@ #endif #ifndef HAVE_RSA_GET0_CRT_PARAMS -#define HAVE_RSA_GET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) +#define HAVE_RSA_GET0_CRT_PARAMS (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_RSA_GET0_FACTORS -#define HAVE_RSA_GET0_FACTORS OPENSSL_PREREQ(1,1,0) +#define HAVE_RSA_GET0_FACTORS (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_RSA_GET0_KEY -#define HAVE_RSA_GET0_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_RSA_GET0_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_RSA_SET0_CRT_PARAMS -#define HAVE_RSA_SET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) +#define HAVE_RSA_SET0_CRT_PARAMS (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_RSA_SET0_FACTORS -#define HAVE_RSA_SET0_FACTORS OPENSSL_PREREQ(1,1,0) +#define HAVE_RSA_SET0_FACTORS (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_RSA_SET0_KEY -#define HAVE_RSA_SET0_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_RSA_SET0_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_SSL_CLIENT_VERSION @@ -274,7 +274,7 @@ #endif #ifndef HAVE_SSL_CTX_GET0_PARAM -#define HAVE_SSL_CTX_GET0_PARAM OPENSSL_PREREQ(1,0,2) +#define HAVE_SSL_CTX_GET0_PARAM (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_SSL_CTX_GET0_CERTIFICATE @@ -298,7 +298,7 @@ #endif #ifndef HAVE_SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK -#define HAVE_SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK OPENSSL_PREREQ(1,0,0) +#define HAVE_SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK (OPENSSL_PREREQ(1,0,0) || LIBRESSL_PREREQ(2,0,0)) #endif #ifndef HAVE_SSL_CTX_SET1_CERT_STORE @@ -326,7 +326,7 @@ #endif #ifndef HAVE_SSL_GET0_PARAM -#define HAVE_SSL_GET0_PARAM OPENSSL_PREREQ(1,0,2) +#define HAVE_SSL_GET0_PARAM (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_SSL_SET_ALPN_PROTOS @@ -346,11 +346,11 @@ #endif #ifndef HAVE_SSL_SET1_PARAM -#define HAVE_SSL_SET1_PARAM OPENSSL_PREREQ(1,0,2) +#define HAVE_SSL_SET1_PARAM (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,5,1)) #endif #ifndef HAVE_SSL_GET_CLIENT_RANDOM -#define HAVE_SSL_GET_CLIENT_RANDOM OPENSSL_PREREQ(1,1,0) +#define HAVE_SSL_GET_CLIENT_RANDOM (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_SSL_GET_TLSEXT_STATUS_TYPE @@ -358,19 +358,27 @@ #endif #ifndef HAVE_SSL_UP_REF -#define HAVE_SSL_UP_REF OPENSSL_PREREQ(1,1,0) +#define HAVE_SSL_UP_REF (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_SSL_OP_NO_SSL_MASK -#define HAVE_SSL_OP_NO_SSL_MASK OPENSSL_PREREQ(1,0,2) +#ifdef SSL_OP_NO_SSL_MASK +#define HAVE_SSL_OP_NO_SSL_MASK (1) +#else +#define HAVE_SSL_OP_NO_SSL_MASK (0) +#endif #endif #ifndef HAVE_SSL_OP_NO_DTLS_MASK -#define HAVE_SSL_OP_NO_DTLS_MASK OPENSSL_PREREQ(1,1,0) +#ifdef SSL_OP_NO_DTLS_MASK +#define HAVE_SSL_OP_NO_DTLS_MASK (1) +#else +#define HAVE_SSL_OP_NO_DTLS_MASK (0) +#endif #endif #ifndef HAVE_SSL_SESSION_MASTER_KEY -#define HAVE_SSL_SESSION_MASTER_KEY OPENSSL_PREREQ(1,1,0) +#define HAVE_SSL_SESSION_MASTER_KEY (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_STACK_OPENSSL_STRING_FUNCS @@ -378,23 +386,23 @@ #endif #ifndef HAVE_X509_CRL_GET0_LASTUPDATE -#define HAVE_X509_CRL_GET0_LASTUPDATE OPENSSL_PREREQ(1,1,0) +#define HAVE_X509_CRL_GET0_LASTUPDATE (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_CRL_GET0_NEXTUPDATE -#define HAVE_X509_CRL_GET0_NEXTUPDATE OPENSSL_PREREQ(1,1,0) +#define HAVE_X509_CRL_GET0_NEXTUPDATE (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_CRL_SET1_LASTUPDATE -#define HAVE_X509_CRL_SET1_LASTUPDATE OPENSSL_PREREQ(1,1,0) +#define HAVE_X509_CRL_SET1_LASTUPDATE (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_CRL_SET1_NEXTUPDATE -#define HAVE_X509_CRL_SET1_NEXTUPDATE OPENSSL_PREREQ(1,1,0) +#define HAVE_X509_CRL_SET1_NEXTUPDATE (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_GET_SIGNATURE_NID -#define HAVE_X509_GET_SIGNATURE_NID OPENSSL_PREREQ(1,0,2) +#define HAVE_X509_GET_SIGNATURE_NID (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_STORE_REFERENCES @@ -402,15 +410,15 @@ #endif #ifndef HAVE_X509_STORE_UP_REF -#define HAVE_X509_STORE_UP_REF OPENSSL_PREREQ(1,1,0) +#define HAVE_X509_STORE_UP_REF (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_UP_REF -#define HAVE_X509_UP_REF OPENSSL_PREREQ(1,1,0) +#define HAVE_X509_UP_REF (OPENSSL_PREREQ(1,1,0) || LIBRESSL_PREREQ(2,5,1)) #endif #ifndef HAVE_X509_VERIFY_PARAM_ADD1_HOST -#define HAVE_X509_VERIFY_PARAM_ADD1_HOST OPENSSL_PREREQ(1,0,2) +#define HAVE_X509_VERIFY_PARAM_ADD1_HOST (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL @@ -418,15 +426,15 @@ #endif #ifndef HAVE_X509_VERIFY_PARAM_SET1_EMAIL -#define HAVE_X509_VERIFY_PARAM_SET1_EMAIL OPENSSL_PREREQ(1,0,2) +#define HAVE_X509_VERIFY_PARAM_SET1_EMAIL (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_VERIFY_PARAM_SET1_HOST -#define HAVE_X509_VERIFY_PARAM_SET1_HOST OPENSSL_PREREQ(1,0,2) +#define HAVE_X509_VERIFY_PARAM_SET1_HOST (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HAVE_X509_VERIFY_PARAM_SET1_IP_ASC -#define HAVE_X509_VERIFY_PARAM_SET1_IP_ASC OPENSSL_PREREQ(1,0,2) +#define HAVE_X509_VERIFY_PARAM_SET1_IP_ASC (OPENSSL_PREREQ(1,0,2) || LIBRESSL_PREREQ(2,7,0)) #endif #ifndef HMAC_INIT_EX_INT |