aboutsummaryrefslogtreecommitdiffstats
path: root/WWW/Library
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-05-04 23:29:29 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-05-04 23:29:29 +0000
commita1f3e5c0b60d33c7bc6d732638c3beb5281281ae (patch)
tree5e5443e3062df24485c0a45e0399b98020af8b67 /WWW/Library
parentc6d1fb20cd5a88f3730558a4c9615197df747bf2 (diff)
downloadlynx-snapshots-a1f3e5c0b60d33c7bc6d732638c3beb5281281ae.tar.gz
snapshot of project "lynx", label v2-8-9dev_17h
Diffstat (limited to 'WWW/Library')
-rw-r--r--WWW/Library/Implementation/HTTP.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index c8d0bab4..41ab8499 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
/*
- * $LynxId: HTTP.c,v 1.174 2018/03/30 09:12:37 tom Exp $
+ * $LynxId: HTTP.c,v 1.175 2018/05/04 20:07:43 Elliot.Thomas Exp $
*
* HyperText Tranfer Protocol - Client implementation HTTP.c
* ==========================
@@ -191,9 +191,9 @@ SSL *HTGetSSLHandle(void)
{
#ifdef USE_GNUTLS_INCL
static char *certfile = NULL;
+#endif
static char *client_keyfile = NULL;
static char *client_certfile = NULL;
-#endif
if (ssl_ctx == NULL) {
/*
@@ -262,7 +262,7 @@ SSL *HTGetSSLHandle(void)
#endif
atexit(free_ssl_ctx);
}
-#ifdef USE_GNUTLS_INCL
+
if (non_empty(SSL_client_key_file)) {
client_keyfile = SSL_client_key_file;
CTRACE((tfp,
@@ -276,13 +276,21 @@ SSL *HTGetSSLHandle(void)
"HTGetSSLHandle: client cert file is set to %s by config SSL_CLIENT_CERT_FILE\n",
client_certfile));
}
-
+#ifdef USE_GNUTLS_INCL
ssl_ctx->certfile = certfile;
ssl_ctx->certfile_type = GNUTLS_X509_FMT_PEM;
ssl_ctx->client_keyfile = client_keyfile;
ssl_ctx->client_keyfile_type = GNUTLS_X509_FMT_PEM;
ssl_ctx->client_certfile = client_certfile;
ssl_ctx->client_certfile_type = GNUTLS_X509_FMT_PEM;
+#elif SSLEAY_VERSION_NUMBER >= 0x0930
+ if (client_certfile != NULL) {
+ if (client_keyfile == NULL) {
+ client_keyfile = client_certfile;
+ }
+ SSL_CTX_use_certificate_chain_file(ssl_ctx, client_certfile);
+ SSL_CTX_use_PrivateKey_file(ssl_ctx, client_keyfile, SSL_FILETYPE_PEM);
+ }
#endif
ssl_okay = 0;
return (SSL_new(ssl_ctx));