OLD | NEW |
---|---|
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 Loading... | |
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_chacha20 | |
wtc
2013/09/13 21:32:26
Nit: C_C20P1305 => C_CHACHA20
agl
2013/09/16 22:19:07
Done.
| |
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 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 {0,CS(TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA), S_ECDSA, K_ECDH, C_3DES, B_3DES, M _SHA, 1, 0, 0, }, | 190 {0,CS(TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA), S_ECDSA, K_ECDH, C_3DES, B_3DES, M _SHA, 1, 0, 0, }, |
190 {0,CS(TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA), S_ECDSA, K_ECDH, C_AES, B_128, M_S HA, 1, 0, 0, }, | 191 {0,CS(TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA), S_ECDSA, K_ECDH, C_AES, B_128, M_S HA, 1, 0, 0, }, |
191 {0,CS(TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA), S_ECDSA, K_ECDH, C_AES, B_256, M_S HA, 1, 0, 0, }, | 192 {0,CS(TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA), S_ECDSA, K_ECDH, C_AES, B_256, M_S HA, 1, 0, 0, }, |
192 | 193 |
193 {0,CS(TLS_ECDHE_ECDSA_WITH_NULL_SHA), S_ECDSA, K_ECDHE, C_NULL, B_0, M_S HA, 0, 0, 0, }, | 194 {0,CS(TLS_ECDHE_ECDSA_WITH_NULL_SHA), S_ECDSA, K_ECDHE, C_NULL, B_0, M_S HA, 0, 0, 0, }, |
194 {0,CS(TLS_ECDHE_ECDSA_WITH_RC4_128_SHA), S_ECDSA, K_ECDHE, C_RC4, B_128, M_ SHA, 0, 0, 0, }, | 195 {0,CS(TLS_ECDHE_ECDSA_WITH_RC4_128_SHA), S_ECDSA, K_ECDHE, C_RC4, B_128, M_ SHA, 0, 0, 0, }, |
195 {0,CS(TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA), S_ECDSA, K_ECDHE, C_3DES, B_3DES, M_SHA, 1, 0, 0, }, | 196 {0,CS(TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA), S_ECDSA, K_ECDHE, C_3DES, B_3DES, M_SHA, 1, 0, 0, }, |
196 {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_128, M_ SHA, 1, 0, 0, }, | 197 {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_128, M_ SHA, 1, 0, 0, }, |
197 {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), S_ECDSA, K_ECDHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, | 198 {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), S_ECDSA, K_ECDHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, |
198 {0,CS(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_256, M_ SHA, 1, 0, 0, }, | 199 {0,CS(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_256, M_ SHA, 1, 0, 0, }, |
200 {0,CS(TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305),S_ECDSA,K_ECDHE,C_C20P1305,B_256,M _AEAD_128,0, 0, 0, }, | |
199 | 201 |
200 {0,CS(TLS_ECDH_RSA_WITH_NULL_SHA), S_RSA, K_ECDH, C_NULL, B_0, M_SHA, 0, 0, 0, }, | 202 {0,CS(TLS_ECDH_RSA_WITH_NULL_SHA), S_RSA, K_ECDH, C_NULL, B_0, M_SHA, 0, 0, 0, }, |
201 {0,CS(TLS_ECDH_RSA_WITH_RC4_128_SHA), S_RSA, K_ECDH, C_RC4, B_128, M_SHA , 0, 0, 0, }, | 203 {0,CS(TLS_ECDH_RSA_WITH_RC4_128_SHA), S_RSA, K_ECDH, C_RC4, B_128, M_SHA , 0, 0, 0, }, |
202 {0,CS(TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA), S_RSA, K_ECDH, C_3DES, B_3DES, M_S HA, 1, 0, 0, }, | 204 {0,CS(TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA), S_RSA, K_ECDH, C_3DES, B_3DES, M_S HA, 1, 0, 0, }, |
203 {0,CS(TLS_ECDH_RSA_WITH_AES_128_CBC_SHA), S_RSA, K_ECDH, C_AES, B_128, M_SHA , 1, 0, 0, }, | 205 {0,CS(TLS_ECDH_RSA_WITH_AES_128_CBC_SHA), S_RSA, K_ECDH, C_AES, B_128, M_SHA , 1, 0, 0, }, |
204 {0,CS(TLS_ECDH_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_ECDH, C_AES, B_256, M_SHA , 1, 0, 0, }, | 206 {0,CS(TLS_ECDH_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_ECDH, C_AES, B_256, M_SHA , 1, 0, 0, }, |
207 {0,CS(TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305), S_RSA,K_ECDHE,C_C20P1305,B_256,M_A EAD_128, 0, 0, 0, }, | |
205 | 208 |
206 {0,CS(TLS_ECDHE_RSA_WITH_NULL_SHA), S_RSA, K_ECDHE, C_NULL, B_0, M_SHA , 0, 0, 0, }, | 209 {0,CS(TLS_ECDHE_RSA_WITH_NULL_SHA), S_RSA, K_ECDHE, C_NULL, B_0, M_SHA , 0, 0, 0, }, |
207 {0,CS(TLS_ECDHE_RSA_WITH_RC4_128_SHA), S_RSA, K_ECDHE, C_RC4, B_128, M_SH A, 0, 0, 0, }, | 210 {0,CS(TLS_ECDHE_RSA_WITH_RC4_128_SHA), S_RSA, K_ECDHE, C_RC4, B_128, M_SH A, 0, 0, 0, }, |
208 {0,CS(TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA), S_RSA, K_ECDHE, C_3DES, B_3DES, M_ SHA, 1, 0, 0, }, | 211 {0,CS(TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA), S_RSA, K_ECDHE, C_3DES, B_3DES, M_ SHA, 1, 0, 0, }, |
209 {0,CS(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA), S_RSA, K_ECDHE, C_AES, B_128, M_SH A, 1, 0, 0, }, | 212 {0,CS(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA), S_RSA, K_ECDHE, C_AES, B_128, M_SH A, 1, 0, 0, }, |
210 {0,CS(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256), S_RSA, K_ECDHE, C_AES, B_128, M_SH A256, 1, 0, 0, }, | 213 {0,CS(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256), S_RSA, K_ECDHE, C_AES, B_128, M_SH A256, 1, 0, 0, }, |
211 {0,CS(TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_ECDHE, C_AES, B_256, M_SH A, 1, 0, 0, }, | 214 {0,CS(TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_ECDHE, C_AES, B_256, M_SH A, 1, 0, 0, }, |
212 #endif /* NSS_ENABLE_ECC */ | 215 #endif /* NSS_ENABLE_ECC */ |
213 | 216 |
214 /* SSL 2 table */ | 217 /* SSL 2 table */ |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 } |
OLD | NEW |