1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 00:58:48 -05:00

openssl: acknowledge SRP disabling in configure properly

Follow-up to 68a5132474

Use a new separate define that is the combination of both
HAVE_OPENSSL_SRP and USE_TLS_SRP: USE_OPENSSL_SRP

Bug: https://curl.haxx.se/mail/lib-2020-10/0037.html

Closes #6094
This commit is contained in:
Daniel Stenberg 2020-10-15 22:56:13 +02:00
parent e34959c0b9
commit a3d5b199f9
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -225,6 +225,14 @@
"ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH" "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
#endif #endif
#ifdef HAVE_OPENSSL_SRP
/* the function exists */
#ifdef USE_TLS_SRP
/* the functionality is not disabled */
#define USE_OPENSSL_SRP
#endif
#endif
struct ssl_backend_data { struct ssl_backend_data {
/* these ones requires specific SSL-types */ /* these ones requires specific SSL-types */
SSL_CTX* ctx; SSL_CTX* ctx;
@ -2471,7 +2479,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
#endif #endif
#endif #endif
const long int ssl_version = SSL_CONN_CONFIG(version); const long int ssl_version = SSL_CONN_CONFIG(version);
#ifdef HAVE_OPENSSL_SRP #ifdef USE_OPENSSL_SRP
const enum CURL_TLSAUTH ssl_authtype = SSL_SET_OPTION(authtype); const enum CURL_TLSAUTH ssl_authtype = SSL_SET_OPTION(authtype);
#endif #endif
char * const ssl_cert = SSL_SET_OPTION(primary.clientcert); char * const ssl_cert = SSL_SET_OPTION(primary.clientcert);
@ -2516,7 +2524,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
failf(data, OSSL_PACKAGE " was built without SSLv2 support"); failf(data, OSSL_PACKAGE " was built without SSLv2 support");
return CURLE_NOT_BUILT_IN; return CURLE_NOT_BUILT_IN;
#else #else
#ifdef HAVE_OPENSSL_SRP #ifdef USE_OPENSSL_SRP
if(ssl_authtype == CURL_TLSAUTH_SRP) if(ssl_authtype == CURL_TLSAUTH_SRP)
return CURLE_SSL_CONNECT_ERROR; return CURLE_SSL_CONNECT_ERROR;
#endif #endif
@ -2529,7 +2537,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
failf(data, OSSL_PACKAGE " was built without SSLv3 support"); failf(data, OSSL_PACKAGE " was built without SSLv3 support");
return CURLE_NOT_BUILT_IN; return CURLE_NOT_BUILT_IN;
#else #else
#ifdef HAVE_OPENSSL_SRP #ifdef USE_OPENSSL_SRP
if(ssl_authtype == CURL_TLSAUTH_SRP) if(ssl_authtype == CURL_TLSAUTH_SRP)
return CURLE_SSL_CONNECT_ERROR; return CURLE_SSL_CONNECT_ERROR;
#endif #endif
@ -2797,7 +2805,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
} }
#endif #endif
#ifdef HAVE_OPENSSL_SRP #ifdef USE_OPENSSL_SRP
if(ssl_authtype == CURL_TLSAUTH_SRP) { if(ssl_authtype == CURL_TLSAUTH_SRP) {
char * const ssl_username = SSL_SET_OPTION(username); char * const ssl_username = SSL_SET_OPTION(username);