diff options
author | Gisle Vanem <gvanem@yahoo.no> | 2016-01-29 00:11:41 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2016-01-29 00:11:43 -0500 |
commit | bdb465274f432be7fa8b65822c95e5abbdb773a4 (patch) | |
tree | adf865a127628e03dd53e476304890f88d1ed7ee /lib/urldata.h | |
parent | 300718382fed9b8235610c893e03072302d45124 (diff) | |
download | curl-bdb465274f432be7fa8b65822c95e5abbdb773a4.tar.gz |
urldata: Error on missing SSL backend-specific connect info
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index 929ba96e4..775da1e19 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -275,20 +275,18 @@ struct ssl_connect_data { bool use; ssl_connection_state state; ssl_connect_state connecting_state; -#ifdef USE_OPENSSL +#if defined(USE_OPENSSL) /* these ones requires specific SSL-types */ SSL_CTX* ctx; SSL* handle; X509* server_cert; -#endif /* USE_OPENSSL */ -#ifdef USE_GNUTLS +#elif defined(USE_GNUTLS) gnutls_session_t session; gnutls_certificate_credentials_t cred; #ifdef USE_TLS_SRP gnutls_srp_client_credentials_t srp_client_cred; #endif -#endif /* USE_GNUTLS */ -#ifdef USE_MBEDTLS +#elif defined(USE_MBEDTLS) mbedtls_ctr_drbg_context ctr_drbg; mbedtls_entropy_context entropy; mbedtls_ssl_context ssl; @@ -299,8 +297,7 @@ struct ssl_connect_data { mbedtls_x509_crl crl; mbedtls_pk_context pk; mbedtls_ssl_config config; -#endif /* USE_MBEDTLS */ -#ifdef USE_POLARSSL +#elif defined(USE_POLARSSL) ctr_drbg_context ctr_drbg; entropy_context entropy; ssl_context ssl; @@ -310,27 +307,22 @@ struct ssl_connect_data { x509_crt clicert; x509_crl crl; rsa_context rsa; -#endif /* USE_POLARSSL */ -#ifdef USE_CYASSL +#elif defined(USE_CYASSL) SSL_CTX* ctx; SSL* handle; -#endif /* USE_CYASSL */ -#ifdef USE_NSS +#elif defined(USE_NSS) PRFileDesc *handle; char *client_nickname; struct SessionHandle *data; struct curl_llist *obj_list; PK11GenericObject *obj_clicert; -#endif /* USE_NSS */ -#ifdef USE_GSKIT +#elif defined(USE_GSKIT) gsk_handle handle; int iocport; -#endif -#ifdef USE_AXTLS +#elif defined(USE_AXTLS) SSL_CTX* ssl_ctx; SSL* ssl; -#endif /* USE_AXTLS */ -#ifdef USE_SCHANNEL +#elif defined(USE_SCHANNEL) struct curl_schannel_cred *cred; struct curl_schannel_ctxt *ctxt; SecPkgContext_StreamSizes stream_sizes; @@ -341,13 +333,14 @@ struct ssl_connect_data { CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */ bool recv_sspi_close_notify; /* true if connection closed by close_notify */ bool recv_connection_closed; /* true if connection closed, regardless how */ -#endif /* USE_SCHANNEL */ -#ifdef USE_DARWINSSL +#elif defined(USE_DARWINSSL) SSLContextRef ssl_ctx; curl_socket_t ssl_sockfd; bool ssl_direction; /* true if writing, false if reading */ size_t ssl_write_buffered_length; -#endif /* USE_DARWINSSL */ +#elif defined(USE_SSL) +#error "SSL backend specific information missing from ssl_connect_data" +#endif }; struct ssl_config_data { |