cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] Fix the --no-sessionid option, which is not working if using libnss

From: Paul Donohue <curl_at_paulsd.com>
Date: Tue, 15 Oct 2013 15:36:32 -0400

---
 lib/nss.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/nss.c b/lib/nss.c
index 34dfbb1..43576e6 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -1244,8 +1244,9 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE) != SECSuccess)
     goto error;
 
-  /* do not use SSL cache if we are not going to verify peer */
-  ssl_no_cache = (data->set.ssl.verifypeer) ? PR_FALSE : PR_TRUE;
+  /* do not use SSL cache if disabled or we are not going to verify peer */
+  ssl_no_cache = (conn->ssl_config.sessionid && data->set.ssl.verifypeer) ?
+    PR_FALSE : PR_TRUE;
   if(SSL_OptionSet(model, SSL_NO_CACHE, ssl_no_cache) != SECSuccess)
     goto error;
 
-- 
1.8.1.2
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-10-15