| OLD | NEW |
| 1 /* | 1 /* |
| 2 * vtables (and methods that call through them) for the 4 types of | 2 * vtables (and methods that call through them) for the 4 types of |
| 3 * SSLSockets supported. Only one type is still supported. | 3 * SSLSockets supported. Only one type is still supported. |
| 4 * Various other functions. | 4 * Various other functions. |
| 5 * | 5 * |
| 6 * This Source Code Form is subject to the terms of the Mozilla Public | 6 * This Source Code Form is subject to the terms of the Mozilla Public |
| 7 * License, v. 2.0. If a copy of the MPL was not distributed with this | 7 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 9 #include "seccomon.h" | 9 #include "seccomon.h" |
| 10 #include "cert.h" | 10 #include "cert.h" |
| 11 #include "keyhi.h" | 11 #include "keyhi.h" |
| 12 #include "ssl.h" | 12 #include "ssl.h" |
| 13 #include "sslimpl.h" | 13 #include "sslimpl.h" |
| 14 #include "sslproto.h" | 14 #include "sslproto.h" |
| 15 #include "nspr.h" | 15 #include "nspr.h" |
| 16 #include "private/pprio.h" | 16 #include "private/pprio.h" |
| 17 #ifndef NO_PKCS11_BYPASS | 17 #ifndef NO_PKCS11_BYPASS |
| 18 #include "blapi.h" | 18 #include "blapi.h" |
| 19 #endif | 19 #endif |
| 20 #include "pk11pub.h" | 20 #include "pk11pub.h" |
| 21 #include "nss.h" | 21 #include "nss.h" |
| 22 | 22 |
| 23 /* This is a bodge to allow this code to be compiled against older NSS headers | 23 /* This is a bodge to allow this code to be compiled against older NSS headers |
| 24 * that don't contain the TLS 1.2 changes. */ | 24 * that don't contain the TLS 1.2 changes. */ |
| 25 #ifndef CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 | 25 #ifndef CKM_TLS12_MASTER_KEY_DERIVE_DH |
| 26 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24) | 26 #define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2 |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 #define SET_ERROR_CODE /* reminder */ | 29 #define SET_ERROR_CODE /* reminder */ |
| 30 | 30 |
| 31 struct cipherPolicyStr { | 31 struct cipherPolicyStr { |
| 32 int cipher; | 32 int cipher; |
| 33 unsigned char export; /* policy value for export policy */ | 33 unsigned char export; /* policy value for export policy */ |
| 34 unsigned char france; /* policy value for france policy */ | 34 unsigned char france; /* policy value for france policy */ |
| 35 }; | 35 }; |
| 36 | 36 |
| (...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1911 return SECSuccess; | 1911 return SECSuccess; |
| 1912 } | 1912 } |
| 1913 | 1913 |
| 1914 static PRCallOnceType checkTLS12TokenOnce; | 1914 static PRCallOnceType checkTLS12TokenOnce; |
| 1915 static PRBool tls12TokenExists; | 1915 static PRBool tls12TokenExists; |
| 1916 | 1916 |
| 1917 static PRStatus | 1917 static PRStatus |
| 1918 ssl_CheckTLS12Token(void) | 1918 ssl_CheckTLS12Token(void) |
| 1919 { | 1919 { |
| 1920 tls12TokenExists = | 1920 tls12TokenExists = |
| 1921 » PK11_TokenExists(CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256); | 1921 » PK11_TokenExists(CKM_TLS12_MASTER_KEY_DERIVE_DH); |
| 1922 return PR_SUCCESS; | 1922 return PR_SUCCESS; |
| 1923 } | 1923 } |
| 1924 | 1924 |
| 1925 static PRBool | 1925 static PRBool |
| 1926 ssl_TLS12TokenExists(void) | 1926 ssl_TLS12TokenExists(void) |
| 1927 { | 1927 { |
| 1928 (void) PR_CallOnce(&checkTLS12TokenOnce, ssl_CheckTLS12Token); | 1928 (void) PR_CallOnce(&checkTLS12TokenOnce, ssl_CheckTLS12Token); |
| 1929 return tls12TokenExists; | 1929 return tls12TokenExists; |
| 1930 } | 1930 } |
| 1931 | 1931 |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3119 loser: | 3119 loser: |
| 3120 ssl_DestroySocketContents(ss); | 3120 ssl_DestroySocketContents(ss); |
| 3121 ssl_DestroyLocks(ss); | 3121 ssl_DestroyLocks(ss); |
| 3122 PORT_Free(ss); | 3122 PORT_Free(ss); |
| 3123 ss = NULL; | 3123 ss = NULL; |
| 3124 } | 3124 } |
| 3125 } | 3125 } |
| 3126 return ss; | 3126 return ss; |
| 3127 } | 3127 } |
| 3128 | 3128 |
| OLD | NEW |