4f8d33
diff -r -u python-nss-0.16.0.orig/doc/examples/ssl_version_range.py python-nss-0.16.0/doc/examples/ssl_version_range.py
4f8d33
--- python-nss-0.16.0.orig/doc/examples/ssl_version_range.py	2014-11-25 12:20:58.744325434 -0500
4f8d33
+++ python-nss-0.16.0/doc/examples/ssl_version_range.py	2014-11-25 14:50:42.530189512 -0500
4f8d33
@@ -96,13 +96,12 @@
4f8d33
 
4f8d33
 names = [
4f8d33
     'ssl2', 'ssl3',
4f8d33
-    'tls1.0', 'tls1.1', 'tls1.2', 'tls1.3',
4f8d33
+    'tls1.0', 'tls1.1', 'tls1.2',
4f8d33
     'SSL_LIBRARY_VERSION_2',
4f8d33
     'SSL_LIBRARY_VERSION_3_0',
4f8d33
     'SSL_LIBRARY_VERSION_TLS_1_0',
4f8d33
     'SSL_LIBRARY_VERSION_TLS_1_1',
4f8d33
     'SSL_LIBRARY_VERSION_TLS_1_2',
4f8d33
-    'SSL_LIBRARY_VERSION_TLS_1_3',
4f8d33
     ]
4f8d33
 
4f8d33
 print
4f8d33
diff -r -u python-nss-0.16.0.orig/src/py_ssl.c python-nss-0.16.0/src/py_ssl.c
4f8d33
--- python-nss-0.16.0.orig/src/py_ssl.c	2014-11-25 12:20:58.766325459 -0500
4f8d33
+++ python-nss-0.16.0/src/py_ssl.c	2014-11-25 14:49:47.032128344 -0500
4f8d33
@@ -193,9 +193,11 @@
4f8d33
         case 3:
4f8d33
             version_enum = SSL_LIBRARY_VERSION_TLS_1_2;
4f8d33
             break;
4f8d33
+#if (NSS_VMAJOR > 3) || (NSS_VMAJOR == 3 && NSS_VMINOR >= 17)
4f8d33
         case 4:
4f8d33
             version_enum = SSL_LIBRARY_VERSION_TLS_1_3;
4f8d33
             break;
4f8d33
+#endif
4f8d33
         default:
4f8d33
             PyErr_Format(PyExc_ValueError, 
4f8d33
                          "Verson %d.%d has unkown minor version",
4f8d33
@@ -4411,7 +4413,9 @@
4f8d33
     ExportConstant(SSL_LIBRARY_VERSION_TLS_1_0);
4f8d33
     ExportConstant(SSL_LIBRARY_VERSION_TLS_1_1);
4f8d33
     ExportConstant(SSL_LIBRARY_VERSION_TLS_1_2);
4f8d33
+#if (NSS_VMAJOR > 3) || (NSS_VMAJOR == 3 && NSS_VMINOR >= 17)
4f8d33
     ExportConstant(SSL_LIBRARY_VERSION_TLS_1_3);
4f8d33
+#endif
4f8d33
 
4f8d33
 
4f8d33
     if ((ssl_library_version_alias_to_value = PyDict_New()) == NULL) {
4f8d33
@@ -4430,7 +4434,9 @@
4f8d33
     ExportConstantAlias(SSL_LIBRARY_VERSION_TLS_1_0, "tls1.0");
4f8d33
     ExportConstantAlias(SSL_LIBRARY_VERSION_TLS_1_1, "tls1.1");
4f8d33
     ExportConstantAlias(SSL_LIBRARY_VERSION_TLS_1_2, "tls1.2");
4f8d33
+#if (NSS_VMAJOR > 3) || (NSS_VMAJOR == 3 && NSS_VMINOR >= 17)
4f8d33
     ExportConstantAlias(SSL_LIBRARY_VERSION_TLS_1_3, "tls1.3");
4f8d33
+#endif
4f8d33
 
4f8d33
 
4f8d33
 #undef ExportConstant
4f8d33
@@ -4639,7 +4645,9 @@
4f8d33
     /* TLS_FALLBACK_SCSV is a signaling cipher suite value that indicates that a
4f8d33
      * handshake is the result of TLS version fallback.
4f8d33
      */
4f8d33
+#if (NSS_VMAJOR > 3) || (NSS_VMAJOR == 3 && NSS_VMINOR >= 17)
4f8d33
     ExportConstant(TLS_FALLBACK_SCSV);
4f8d33
+#endif
4f8d33
 
4f8d33
     /* Cipher Suite Values starting with 0xC000 are defined in informational
4f8d33
      * RFCs.
4f8d33
diff -r -u python-nss-0.16.0.orig/src/SSLerrs.h python-nss-0.16.0/src/SSLerrs.h
4f8d33
--- python-nss-0.16.0.orig/src/SSLerrs.h	2014-11-25 12:20:58.766325459 -0500
4f8d33
+++ python-nss-0.16.0/src/SSLerrs.h	2014-11-25 14:49:47.033128345 -0500
4f8d33
@@ -419,6 +419,8 @@
4f8d33
 ER3(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL, (SSL_ERROR_BASE + 130),
4f8d33
 "The server supports no protocols that the client advertises in the ALPN extension.")
4f8d33
 
4f8d33
+#if (NSS_VMAJOR > 3) || (NSS_VMAJOR == 3 && NSS_VMINOR >= 17)
4f8d33
 ER3(SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT, (SSL_ERROR_BASE + 131),
4f8d33
 "The server rejected the handshake because the client downgraded to a lower "
4f8d33
 "TLS version than the server supports.")
4f8d33
+#endif