about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
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/Implementation
parentc6d1fb20cd5a88f3730558a4c9615197df747bf2 (diff)
downloadlynx-snapshots-a1f3e5c0b60d33c7bc6d732638c3beb5281281ae.tar.gz
snapshot of project "lynx", label v2-8-9dev_17h
Diffstat (limited to 'WWW/Library/Implementation')
-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));
ing idiom' href='/akkartik/mu/commit/factorial.mu?h=hlt&id=ce87c19ee42bc52c5ab9a1ee3c431a9423e5a885'>ce87c19e ^
32241605 ^
b96af395 ^
08b48a8d ^
b96af395 ^


bc643692 ^
b96af395 ^
bafc7192 ^
b96af395 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33