mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:43:32 +03:00
cmake: detect TLS-SRP in OpenSSL/wolfSSL/GnuTLS
With new option `CURL_DISABLE_SRP=ON` to force-disable it. To match existing option and detection logic in autotools. Also: - fix detecting GnuTLS. We assume `nettle` as a GnuTLS dependency. - add CMake GnuTLS CI job. - bump AppVeyor CMake OpenSSL MSVC job to OpenSSL 1.1.1 (from 1.0.2) TLS-SRP fails to detect with 1.0.2 due to an OpenSSL header bug. - fix compiler warning when building with GnuTLS and disabled TLS-SRP. - fix comment typos, whitespace. Ref: #11964 Closes #11967
This commit is contained in:
parent
e5bb88b8f8
commit
781242ffa4
5 changed files with 47 additions and 11 deletions
|
|
@ -777,3 +777,12 @@ ${SIZEOF_TIME_T_CODE}
|
|||
|
||||
/* Define to 1 to enable websocket support. */
|
||||
#cmakedefine USE_WEBSOCKETS 1
|
||||
|
||||
/* Define to 1 if OpenSSL has the SSL_CTX_set_srp_username function. */
|
||||
#cmakedefine HAVE_OPENSSL_SRP 1
|
||||
|
||||
/* Define to 1 if GnuTLS has the gnutls_srp_verifier function. */
|
||||
#cmakedefine HAVE_GNUTLS_SRP 1
|
||||
|
||||
/* Define to 1 to enable TLS-SRP support. */
|
||||
#cmakedefine USE_TLS_SRP 1
|
||||
|
|
|
|||
|
|
@ -1473,7 +1473,6 @@ static int gtls_shutdown(struct Curl_cfilter *cf,
|
|||
struct Curl_easy *data)
|
||||
{
|
||||
struct ssl_connect_data *connssl = cf->ctx;
|
||||
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
|
||||
struct gtls_ssl_backend_data *backend =
|
||||
(struct gtls_ssl_backend_data *)connssl->backend;
|
||||
int retval = 0;
|
||||
|
|
@ -1536,8 +1535,11 @@ static int gtls_shutdown(struct Curl_cfilter *cf,
|
|||
gnutls_certificate_free_credentials(backend->gtls.cred);
|
||||
|
||||
#ifdef USE_GNUTLS_SRP
|
||||
if(ssl_config->primary.username)
|
||||
gnutls_srp_free_client_credentials(backend->gtls.srp_client_cred);
|
||||
{
|
||||
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
|
||||
if(ssl_config->primary.username)
|
||||
gnutls_srp_free_client_credentials(backend->gtls.srp_client_cred);
|
||||
}
|
||||
#endif
|
||||
|
||||
backend->gtls.cred = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue