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

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

Issue 23619044: net: add ChaCha20+Poly1305 support to libssl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... 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
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 #include "ssl.h" 4 #include "ssl.h"
5 #include "sslimpl.h" 5 #include "sslimpl.h"
6 #include "sslproto.h" 6 #include "sslproto.h"
7 7
8 static const char * 8 static const char *
9 ssl_GetCompressionMethodName(SSLCompressionMethod compression) 9 ssl_GetCompressionMethodName(SSLCompressionMethod compression)
10 { 10 {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #define C_SEED "SEED", calg_seed 111 #define C_SEED "SEED", calg_seed
112 #define C_CAMELLIA "CAMELLIA", calg_camellia 112 #define C_CAMELLIA "CAMELLIA", calg_camellia
113 #define C_AES "AES", calg_aes 113 #define C_AES "AES", calg_aes
114 #define C_RC4 "RC4", calg_rc4 114 #define C_RC4 "RC4", calg_rc4
115 #define C_RC2 "RC2", calg_rc2 115 #define C_RC2 "RC2", calg_rc2
116 #define C_DES "DES", calg_des 116 #define C_DES "DES", calg_des
117 #define C_3DES "3DES", calg_3des 117 #define C_3DES "3DES", calg_3des
118 #define C_NULL "NULL", calg_null 118 #define C_NULL "NULL", calg_null
119 #define C_SJ "SKIPJACK", calg_sj 119 #define C_SJ "SKIPJACK", calg_sj
120 #define C_AESGCM "AES-GCM", calg_aes_gcm 120 #define C_AESGCM "AES-GCM", calg_aes_gcm
121 #define C_C20P1305 "CHACHA20POLY1305", calg_c20p1305
121 122
122 #define B_256 256, 256, 256 123 #define B_256 256, 256, 256
123 #define B_128 128, 128, 128 124 #define B_128 128, 128, 128
124 #define B_3DES 192, 156, 112 125 #define B_3DES 192, 156, 112
125 #define B_SJ 96, 80, 80 126 #define B_SJ 96, 80, 80
126 #define B_DES 64, 56, 56 127 #define B_DES 64, 56, 56
127 #define B_56 128, 56, 56 128 #define B_56 128, 56, 56
128 #define B_40 128, 40, 40 129 #define B_40 128, 40, 40
129 #define B_0 0, 0, 0 130 #define B_0 0, 0, 0
130 131
131 #define M_AEAD_128 "AEAD", ssl_mac_aead, 128 132 #define M_AEAD_128 "AEAD", ssl_mac_aead, 128
132 #define M_SHA256 "SHA256", ssl_hmac_sha256, 256 133 #define M_SHA256 "SHA256", ssl_hmac_sha256, 256
133 #define M_SHA "SHA1", ssl_mac_sha, 160 134 #define M_SHA "SHA1", ssl_mac_sha, 160
134 #define M_MD5 "MD5", ssl_mac_md5, 128 135 #define M_MD5 "MD5", ssl_mac_md5, 128
135 #define M_NULL "NULL", ssl_mac_null, 0 136 #define M_NULL "NULL", ssl_mac_null, 0
136 137
137 static const SSLCipherSuiteInfo suiteInfo[] = { 138 static const SSLCipherSuiteInfo suiteInfo[] = {
138 /* <------ Cipher suite --------------------> <auth> <KEA> <bulk cipher> <MAC> <FIPS> */ 139 /* <------ Cipher suite --------------------> <auth> <KEA> <bulk cipher> <MAC> <FIPS> */
140 {0,CS(TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305),S_ECDSA,K_ECDHE,C_C20P1305,B_256,M _AEAD_128,$0, 0, 0, },
wtc 2013/09/13 17:29:14 There is a "$0" in this line. It should be "0".
agl 2013/09/13 20:51:45 Thanks! A vim movement command that slipped in.
141 {0,CS(TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305), S_RSA,K_ECDHE,C_C20P1305,B_256,M_A EAD_128, 0, 0, 0, },
wtc 2013/09/13 17:29:14 Move these to the ECDHE_ECDSA and ECDHE_RSA sectio
agl 2013/09/13 20:51:45 Done.
139 {0,CS(TLS_RSA_WITH_AES_128_GCM_SHA256), S_RSA, K_RSA, C_AESGCM, B_128, M_A EAD_128, 1, 0, 0, }, 142 {0,CS(TLS_RSA_WITH_AES_128_GCM_SHA256), S_RSA, K_RSA, C_AESGCM, B_128, M_A EAD_128, 1, 0, 0, },
140 143
141 {0,CS(TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA), S_RSA, K_DHE, C_CAMELLIA, B_256, M _SHA, 0, 0, 0, }, 144 {0,CS(TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA), S_RSA, K_DHE, C_CAMELLIA, B_256, M _SHA, 0, 0, 0, },
142 {0,CS(TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA), S_DSA, K_DHE, C_CAMELLIA, B_256, M _SHA, 0, 0, 0, }, 145 {0,CS(TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA), S_DSA, K_DHE, C_CAMELLIA, B_256, M _SHA, 0, 0, 0, },
143 {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_DHE, C_AES, B_256, M_SHA2 56, 1, 0, 0, }, 146 {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_DHE, C_AES, B_256, M_SHA2 56, 1, 0, 0, },
144 {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, }, 147 {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, },
145 {0,CS(TLS_DHE_DSS_WITH_AES_256_CBC_SHA), S_DSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, }, 148 {0,CS(TLS_DHE_DSS_WITH_AES_256_CBC_SHA), S_DSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, },
146 {0,CS(TLS_RSA_WITH_CAMELLIA_256_CBC_SHA), S_RSA, K_RSA, C_CAMELLIA, B_256, M _SHA, 0, 0, 0, }, 149 {0,CS(TLS_RSA_WITH_CAMELLIA_256_CBC_SHA), S_RSA, K_RSA, C_CAMELLIA, B_256, M _SHA, 0, 0, 0, },
147 {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_RSA, C_AES, B_256, M_SHA2 56, 1, 0, 0, }, 150 {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_RSA, C_AES, B_256, M_SHA2 56, 1, 0, 0, },
148 {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_RSA, C_AES, B_256, M_SHA, 1, 0, 0, }, 151 {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_RSA, C_AES, B_256, M_SHA, 1, 0, 0, },
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 rv = ssl3_TLSPRFWithMasterSecret(ss->ssl3.cwSpec, label, labelLen, val, 408 rv = ssl3_TLSPRFWithMasterSecret(ss->ssl3.cwSpec, label, labelLen, val,
406 valLen, out, outLen); 409 valLen, out, outLen);
407 } 410 }
408 ssl_ReleaseSpecReadLock(ss); 411 ssl_ReleaseSpecReadLock(ss);
409 ssl_ReleaseSSL3HandshakeLock(ss); 412 ssl_ReleaseSSL3HandshakeLock(ss);
410 ssl_ReleaseRecvBufLock(ss); 413 ssl_ReleaseRecvBufLock(ss);
411 414
412 PORT_ZFree(val, valLen); 415 PORT_ZFree(val, valLen);
413 return rv; 416 return rv;
414 } 417 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698