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>2016-04-11 00:51:51 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2016-04-11 00:51:51 -0400
commit638c03dc3e8223bde57efbb763d85b76e2a8a5c9 (patch)
treef3cb0c7ae817ad75dcd6ba4759bce7e3cd105fcd /WWW/Library/Implementation
parent4d9ef8b2001398ea281af9baa21cf6837aef5612 (diff)
downloadlynx-snapshots-638c03dc3e8223bde57efbb763d85b76e2a8a5c9.tar.gz
snapshot of project "lynx", label v2-8-9dev_8a
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTTP.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 2b409e8c..925512d1 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.151 2015/12/22 01:55:31 tom Exp $
+ * $LynxId: HTTP.c,v 1.153 2016/04/11 00:40:38 tom Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -169,30 +169,32 @@ SSL *HTGetSSLHandle(void)
 	 * First time only.
 	 */
 #if SSLEAY_VERSION_NUMBER < 0x0800
-	ssl_ctx = SSL_CTX_new();
-	X509_set_default_verify_paths(ssl_ctx->cert);
+	if ((ssl_ctx = SSL_CTX_new()) != NULL) {
+	    X509_set_default_verify_paths(ssl_ctx->cert);
+	}
 #else
 	SSLeay_add_ssl_algorithms();
-	ssl_ctx = SSL_CTX_new(SSLv23_client_method());
+	if ((ssl_ctx = SSL_CTX_new(SSLv23_client_method())) != NULL) {
 #ifdef SSL_OP_NO_SSLv2
-	SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
+	    SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
 #else
-	SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL);
+	    SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL);
 #endif
 #ifdef SSL_OP_NO_COMPRESSION
-	SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_COMPRESSION);
+	    SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_COMPRESSION);
 #endif
 #ifdef SSL_MODE_AUTO_RETRY
-	SSL_CTX_set_mode(ssl_ctx, SSL_MODE_AUTO_RETRY);
+	    SSL_CTX_set_mode(ssl_ctx, SSL_MODE_AUTO_RETRY);
 #endif
 #ifdef SSL_MODE_RELEASE_BUFFERS
-	SSL_CTX_set_mode(ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
+	    SSL_CTX_set_mode(ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
 #endif
-	SSL_CTX_set_default_verify_paths(ssl_ctx);
-	SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, HTSSLCallback);
+	    SSL_CTX_set_default_verify_paths(ssl_ctx);
+	    SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, HTSSLCallback);
+	}
 #endif /* SSLEAY_VERSION_NUMBER < 0x0800 */
 #if defined(USE_PROGRAM_DIR) & !defined(USE_GNUTLS_INCL)
-	{
+	if (ssl_ctx != NULL) {
 	    X509_LOOKUP *lookup;
 
 	    lookup = X509_STORE_add_lookup(ssl_ctx->cert_store,
n34' href='#n34'>34 35 36 37 38 39 40 41 42
43
44
45
46
47
48
49
50
51
52
53