Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: net/third_party/nss/ssl/ssl3ecc.c

Issue 23619044: net: add ChaCha20+Poly1305 support to libssl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing wtc's comments. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/third_party/nss/ssl/ssl3con.c ('k') | net/third_party/nss/ssl/sslenum.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_128_GCM_SHA256,
915 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, 915 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
916 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
916 TLS_ECDHE_ECDSA_WITH_NULL_SHA, 917 TLS_ECDHE_ECDSA_WITH_NULL_SHA,
917 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, 918 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
918 0 /* end of list marker */ 919 0 /* end of list marker */
919 }; 920 };
920 921
921 static const ssl3CipherSuite ecdhe_rsa_suites[] = { 922 static const ssl3CipherSuite ecdhe_rsa_suites[] = {
922 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 923 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
923 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, 924 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
924 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, 925 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
925 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 926 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
926 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, 927 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
928 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
927 TLS_ECDHE_RSA_WITH_NULL_SHA, 929 TLS_ECDHE_RSA_WITH_NULL_SHA,
928 TLS_ECDHE_RSA_WITH_RC4_128_SHA, 930 TLS_ECDHE_RSA_WITH_RC4_128_SHA,
929 0 /* end of list marker */ 931 0 /* end of list marker */
930 }; 932 };
931 933
932 /* List of all ECC cipher suites */ 934 /* List of all ECC cipher suites */
933 static const ssl3CipherSuite ecSuites[] = { 935 static const ssl3CipherSuite ecSuites[] = {
934 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, 936 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
935 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, 937 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
936 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 938 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
937 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 939 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
938 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, 940 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
941 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
939 TLS_ECDHE_ECDSA_WITH_NULL_SHA, 942 TLS_ECDHE_ECDSA_WITH_NULL_SHA,
940 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, 943 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
941 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 944 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
942 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, 945 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
943 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, 946 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
944 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 947 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
945 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, 948 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
949 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
946 TLS_ECDHE_RSA_WITH_NULL_SHA, 950 TLS_ECDHE_RSA_WITH_NULL_SHA,
947 TLS_ECDHE_RSA_WITH_RC4_128_SHA, 951 TLS_ECDHE_RSA_WITH_RC4_128_SHA,
948 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, 952 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
949 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, 953 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
950 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, 954 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
951 TLS_ECDH_ECDSA_WITH_NULL_SHA, 955 TLS_ECDH_ECDSA_WITH_NULL_SHA,
952 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, 956 TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
953 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, 957 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
954 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, 958 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
955 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, 959 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites); 1275 ssl3_DisableECCSuites(ss, ecdhe_ecdsa_suites);
1272 return SECFailure; 1276 return SECFailure;
1273 1277
1274 loser: 1278 loser:
1275 /* no common curve supported */ 1279 /* no common curve supported */
1276 ssl3_DisableECCSuites(ss, ecSuites); 1280 ssl3_DisableECCSuites(ss, ecSuites);
1277 return SECFailure; 1281 return SECFailure;
1278 } 1282 }
1279 1283
1280 #endif /* NSS_ENABLE_ECC */ 1284 #endif /* NSS_ENABLE_ECC */
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/ssl3con.c ('k') | net/third_party/nss/ssl/sslenum.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698