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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, | 904 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, |
905 TLS_ECDH_RSA_WITH_NULL_SHA, | 905 TLS_ECDH_RSA_WITH_NULL_SHA, |
906 TLS_ECDH_RSA_WITH_RC4_128_SHA, | 906 TLS_ECDH_RSA_WITH_RC4_128_SHA, |
907 0 /* end of list marker */ | 907 0 /* end of list marker */ |
908 }; | 908 }; |
909 | 909 |
910 static const ssl3CipherSuite ecdhe_ecdsa_suites[] = { | 910 static const ssl3CipherSuite ecdhe_ecdsa_suites[] = { |
911 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, | 911 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, |
912 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, | 912 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, |
913 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, | 913 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, |
| 914 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, |
914 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, | 915 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, |
915 TLS_ECDHE_ECDSA_WITH_NULL_SHA, | 916 TLS_ECDHE_ECDSA_WITH_NULL_SHA, |
916 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, | 917 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, |
917 0 /* end of list marker */ | 918 0 /* end of list marker */ |
918 }; | 919 }; |
919 | 920 |
920 static const ssl3CipherSuite ecdhe_rsa_suites[] = { | 921 static const ssl3CipherSuite ecdhe_rsa_suites[] = { |
921 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, | 922 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, |
922 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, | 923 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, |
923 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, | 924 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, |
| 925 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, |
924 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, | 926 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, |
925 TLS_ECDHE_RSA_WITH_NULL_SHA, | 927 TLS_ECDHE_RSA_WITH_NULL_SHA, |
926 TLS_ECDHE_RSA_WITH_RC4_128_SHA, | 928 TLS_ECDHE_RSA_WITH_RC4_128_SHA, |
927 0 /* end of list marker */ | 929 0 /* end of list marker */ |
928 }; | 930 }; |
929 | 931 |
930 /* List of all ECC cipher suites */ | 932 /* List of all ECC cipher suites */ |
931 static const ssl3CipherSuite ecSuites[] = { | 933 static const ssl3CipherSuite ecSuites[] = { |
932 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, | 934 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, |
933 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, | 935 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, |
934 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, | 936 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, |
| 937 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, |
935 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, | 938 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, |
936 TLS_ECDHE_ECDSA_WITH_NULL_SHA, | 939 TLS_ECDHE_ECDSA_WITH_NULL_SHA, |
937 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, | 940 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, |
938 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, | 941 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, |
939 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, | 942 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, |
940 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, | 943 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, |
| 944 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, |
941 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, | 945 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, |
942 TLS_ECDHE_RSA_WITH_NULL_SHA, | 946 TLS_ECDHE_RSA_WITH_NULL_SHA, |
943 TLS_ECDHE_RSA_WITH_RC4_128_SHA, | 947 TLS_ECDHE_RSA_WITH_RC4_128_SHA, |
944 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, | 948 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, |
945 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, | 949 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, |
946 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, | 950 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, |
947 TLS_ECDH_ECDSA_WITH_NULL_SHA, | 951 TLS_ECDH_ECDSA_WITH_NULL_SHA, |
948 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, | 952 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, |
949 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, | 953 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, |
950 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, | 954 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); | 1271 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); |
1268 return SECFailure; | 1272 return SECFailure; |
1269 | 1273 |
1270 loser: | 1274 loser: |
1271 /* no common curve supported */ | 1275 /* no common curve supported */ |
1272 ssl3_DisableECCSuites(ss, ecSuites); | 1276 ssl3_DisableECCSuites(ss, ecSuites); |
1273 return SECFailure; | 1277 return SECFailure; |
1274 } | 1278 } |
1275 | 1279 |
1276 #endif /* NSS_ENABLE_ECC */ | 1280 #endif /* NSS_ENABLE_ECC */ |
OLD | NEW |