cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] nss: fix compilation failure with old versions of NSS

From: Paul Howarth <paul_at_city-fan.org>
Date: Thu, 23 Apr 2015 15:56:03 +0200

Bug: http://curl.haxx.se/mail/lib-2015-04/0095.html

---
 lib/vtls/nss.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index daf12a9..5434ce3 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -725,6 +725,7 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg)
   }
 }
 
+#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
 static SECStatus CanFalseStartCallback(PRFileDesc *sock, void *client_data,
                                        PRBool *canFalseStart)
 {
@@ -782,6 +783,7 @@ static SECStatus CanFalseStartCallback(PRFileDesc *sock, void *client_data,
 end:
   return SECSuccess;
 }
+#endif
 
 static void display_cert_info(struct SessionHandle *data,
                               CERTCertificate *cert)
@@ -1754,7 +1756,7 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
     goto error;
 #endif
 
-#ifdef SSL_ENABLE_FALSE_START
+#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
   if(data->set.ssl.falsestart) {
     if(SSL_OptionSet(connssl->handle, SSL_ENABLE_FALSE_START, PR_TRUE)
         != SECSuccess)
@@ -2049,7 +2051,7 @@ bool Curl_nss_cert_status_request(void)
 }
 
 bool Curl_nss_false_start(void) {
-#ifdef SSL_ENABLE_FALSE_START
+#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
   return TRUE;
 #else
   return FALSE;
-- 
2.3.5
--nextPart1808931.lUF191lpcb
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLQpMaXN0IGFkbWluOiBodHRwOi8vY29vbC5oYXh4LnNlL2xpc3QvbGlzdGluZm8v
Y3VybC1saWJyYXJ5CkV0aXF1ZXR0ZTogIGh0dHA6Ly9jdXJsLmhheHguc2UvbWFpbC9ldGlxdWV0
dGUuaHRtbA==
--nextPart1808931.lUF191lpcb--
Received on 2001-09-17