diff options
Diffstat (limited to 'lib/vtls/gtls.c')
-rw-r--r-- | lib/vtls/gtls.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index 48de842a8..6364a61cf 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -107,7 +107,15 @@ static bool gtls_inited = FALSE; # include <gnutls/ocsp.h> #endif -#define BACKEND connssl +struct ssl_backend_data { + gnutls_session_t session; + gnutls_certificate_credentials_t cred; +#ifdef USE_TLS_SRP + gnutls_srp_client_credentials_t srp_client_cred; +#endif +}; + +#define BACKEND connssl->backend /* * Custom push and pull callback functions used by GNU TLS to read and write @@ -843,7 +851,7 @@ gtls_connect_step1(struct connectdata *conn, } if(conn->proxy_ssl[sockindex].use) { - transport_ptr = conn->proxy_ssl[sockindex].session; + transport_ptr = conn->proxy_ssl[sockindex].backend->session; gnutls_transport_push = Curl_gtls_push_ssl; gnutls_transport_pull = Curl_gtls_pull_ssl; } @@ -1806,6 +1814,8 @@ const struct Curl_ssl Curl_ssl_gnutls = { 0, /* have_ssl_ctx */ 1, /* support_https_proxy */ + sizeof(struct ssl_backend_data), + Curl_gtls_init, /* init */ Curl_gtls_cleanup, /* cleanup */ Curl_gtls_version, /* version */ |