OLD | NEW |
1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c | 1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c |
2 --- a/nss/lib/ssl/ssl3con.c 2014-01-17 18:04:43.127747463 -0800 | 2 --- a/nss/lib/ssl/ssl3con.c 2014-01-17 18:04:43.127747463 -0800 |
3 +++ b/nss/lib/ssl/ssl3con.c 2014-01-17 18:06:21.919386088 -0800 | 3 +++ b/nss/lib/ssl/ssl3con.c 2014-01-17 18:06:21.919386088 -0800 |
4 @@ -44,6 +44,9 @@ | 4 @@ -44,6 +44,9 @@ |
5 #ifdef NSS_ENABLE_ZLIB | 5 #ifdef NSS_ENABLE_ZLIB |
6 #include "zlib.h" | 6 #include "zlib.h" |
7 #endif | 7 #endif |
8 +#ifdef LINUX | 8 +#ifdef LINUX |
9 +#include <dlfcn.h> | 9 +#include <dlfcn.h> |
10 +#endif | 10 +#endif |
(...skipping 13 matching lines...) Expand all Loading... |
24 +static PK11CryptFcn pk11_decrypt = NULL; | 24 +static PK11CryptFcn pk11_decrypt = NULL; |
25 + | 25 + |
26 +static PRCallOnceType resolvePK11CryptOnce; | 26 +static PRCallOnceType resolvePK11CryptOnce; |
27 + | 27 + |
28 +static PRStatus | 28 +static PRStatus |
29 +ssl3_ResolvePK11CryptFunctions(void) | 29 +ssl3_ResolvePK11CryptFunctions(void) |
30 +{ | 30 +{ |
31 +#ifdef LINUX | 31 +#ifdef LINUX |
32 + /* On Linux we use the system NSS libraries. Look up the PK11_Encrypt and | 32 + /* On Linux we use the system NSS libraries. Look up the PK11_Encrypt and |
33 + * PK11_Decrypt functions at run time. */ | 33 + * PK11_Decrypt functions at run time. */ |
34 + void *handle = dlopen(NULL, RTLD_LAZY); | 34 + pk11_encrypt = (PK11CryptFcn)dlsym(RTLD_DEFAULT, "PK11_Encrypt"); |
35 + if (!handle) { | 35 + pk11_decrypt = (PK11CryptFcn)dlsym(RTLD_DEFAULT, "PK11_Decrypt"); |
36 +» PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); | |
37 +» return PR_FAILURE; | |
38 + } | |
39 + pk11_encrypt = (PK11CryptFcn)dlsym(handle, "PK11_Encrypt"); | |
40 + pk11_decrypt = (PK11CryptFcn)dlsym(handle, "PK11_Decrypt"); | |
41 + dlclose(handle); | |
42 + return PR_SUCCESS; | 36 + return PR_SUCCESS; |
43 +#else | 37 +#else |
44 + /* On other platforms we use our own copy of NSS. PK11_Encrypt and | 38 + /* On other platforms we use our own copy of NSS. PK11_Encrypt and |
45 + * PK11_Decrypt are known to be available. */ | 39 + * PK11_Decrypt are known to be available. */ |
46 + pk11_encrypt = PK11_Encrypt; | 40 + pk11_encrypt = PK11_Encrypt; |
47 + pk11_decrypt = PK11_Decrypt; | 41 + pk11_decrypt = PK11_Decrypt; |
48 + return PR_SUCCESS; | 42 + return PR_SUCCESS; |
49 +#endif | 43 +#endif |
50 +} | 44 +} |
51 + | 45 + |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 ssl3_DisableNonDTLSSuites(ss); | 103 ssl3_DisableNonDTLSSuites(ss); |
110 } | 104 } |
111 | 105 |
112 + if (!ssl3_HasGCMSupport()) { | 106 + if (!ssl3_HasGCMSupport()) { |
113 + ssl3_DisableGCMSuites(ss); | 107 + ssl3_DisableGCMSuites(ss); |
114 + } | 108 + } |
115 + | 109 + |
116 #ifdef PARANOID | 110 #ifdef PARANOID |
117 /* Look for a matching cipher suite. */ | 111 /* Look for a matching cipher suite. */ |
118 j = ssl3_config_match_init(ss); | 112 j = ssl3_config_match_init(ss); |
OLD | NEW |