| OLD | NEW |
| 1 /* | 1 /* |
| 2 * SSL3 Protocol | 2 * SSL3 Protocol |
| 3 * | 3 * |
| 4 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
| 5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 7 | 7 |
| 8 /* ECC code moved here from ssl3con.c */ | 8 /* ECC code moved here from ssl3con.c */ |
| 9 | 9 |
| 10 #include "nss.h" | 10 #include "nss.h" |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 ssl3_DisableECCSuites(ss, ecdh_rsa_suites); | 1010 ssl3_DisableECCSuites(ss, ecdh_rsa_suites); |
| 1011 break; | 1011 break; |
| 1012 default: | 1012 default: |
| 1013 ssl3_DisableECCSuites(ss, ecdh_suites); | 1013 ssl3_DisableECCSuites(ss, ecdh_suites); |
| 1014 break; | 1014 break; |
| 1015 } | 1015 } |
| 1016 } | 1016 } |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 /* Ask: is ANY ECC cipher suite enabled on this socket? */ | 1019 /* Ask: is ANY ECC cipher suite enabled on this socket? */ |
| 1020 /* Order(N^2). Yuk. Also, this ignores export policy. */ | 1020 /* Order(N^2). Yuk. */ |
| 1021 PRBool | 1021 PRBool |
| 1022 ssl3_IsECCEnabled(sslSocket * ss) | 1022 ssl3_IsECCEnabled(sslSocket * ss) |
| 1023 { | 1023 { |
| 1024 const ssl3CipherSuite * suite; | 1024 const ssl3CipherSuite * suite; |
| 1025 PK11SlotInfo *slot; | 1025 PK11SlotInfo *slot; |
| 1026 | 1026 |
| 1027 /* make sure we can do ECC */ | 1027 /* make sure we can do ECC */ |
| 1028 slot = PK11_GetBestSlot(CKM_ECDH1_DERIVE, ss->pkcs11PinArg); | 1028 slot = PK11_GetBestSlot(CKM_ECDH1_DERIVE, ss->pkcs11PinArg); |
| 1029 if (!slot) { | 1029 if (!slot) { |
| 1030 return PR_FALSE; | 1030 return PR_FALSE; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); | 1267 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); |
| 1268 return SECFailure; | 1268 return SECFailure; |
| 1269 | 1269 |
| 1270 loser: | 1270 loser: |
| 1271 /* no common curve supported */ | 1271 /* no common curve supported */ |
| 1272 ssl3_DisableECCSuites(ss, ecSuites); | 1272 ssl3_DisableECCSuites(ss, ecSuites); |
| 1273 return SECFailure; | 1273 return SECFailure; |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 #endif /* NSS_ENABLE_ECC */ | 1276 #endif /* NSS_ENABLE_ECC */ |
| OLD | NEW |