Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Private header file of libSSL. | 1 /* Private header file of libSSL. |
| 2 * Various and sundry protocol constants. DON'T CHANGE THESE. These | 2 * Various and sundry protocol constants. DON'T CHANGE THESE. These |
| 3 * values are defined by the SSL 3.0 protocol specification. | 3 * values are defined by the SSL 3.0 protocol specification. |
| 4 * | 4 * |
| 5 * This Source Code Form is subject to the terms of the Mozilla Public | 5 * This Source Code Form is subject to the terms of the Mozilla Public |
| 6 * License, v. 2.0. If a copy of the MPL was not distributed with this | 6 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 8 /* $Id$ */ | 8 /* $Id$ */ |
| 9 | 9 |
| 10 #ifndef __ssl3proto_h_ | 10 #ifndef __ssl3proto_h_ |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 SECItem Ys; | 205 SECItem Ys; |
| 206 } SSL3ServerDHParams; | 206 } SSL3ServerDHParams; |
| 207 | 207 |
| 208 typedef struct { | 208 typedef struct { |
| 209 union { | 209 union { |
| 210 SSL3ServerDHParams dh; | 210 SSL3ServerDHParams dh; |
| 211 SSL3ServerRSAParams rsa; | 211 SSL3ServerRSAParams rsa; |
| 212 } u; | 212 } u; |
| 213 } SSL3ServerParams; | 213 } SSL3ServerParams; |
| 214 | 214 |
| 215 /* This enum reflects HashAlgorithm enum from | |
| 216 * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 | |
| 217 * | |
| 218 * When updating, be sure to also update ssl3_TLSHashAlgorithmToOID. */ | |
| 219 enum { | |
| 220 tls_hash_md5 = 1, | |
| 221 tls_hash_sha1 = 2, | |
| 222 tls_hash_sha224 = 3, | |
| 223 tls_hash_sha256 = 4, | |
| 224 tls_hash_sha384 = 5, | |
| 225 tls_hash_sha512 = 6 | |
| 226 }; | |
| 227 | |
| 228 /* This enum reflects SignatureAlgorithm enum from | |
| 229 * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ | |
| 230 typedef enum { | |
| 231 tls_sig_rsa = 1, | |
| 232 tls_sig_dsa = 2, | |
| 233 tls_sig_ecdsa = 3 | |
| 234 } TLSSignatureAlgorithm; | |
|
wtc
2013/05/28 17:50:25
This type was named TLS12SignatureAlgorithm. I cha
| |
| 235 | |
| 236 typedef struct { | |
| 237 SECOidTag hashAlg; | |
| 238 TLSSignatureAlgorithm sigAlg; | |
|
wtc
2013/05/28 17:50:25
It was a little confusing at first why |hashAlg| i
| |
| 239 } SSL3SignatureAndHashAlgorithm; | |
| 240 | |
| 241 /* SSL3HashesIndividually contains a combination MD5/SHA1 hash, as used in TLS | |
| 242 * prior to 1.2. */ | |
| 215 typedef struct { | 243 typedef struct { |
| 216 uint8 md5[16]; | 244 uint8 md5[16]; |
| 217 uint8 sha[20]; | 245 uint8 sha[20]; |
| 246 } SSL3HashesIndividually; | |
| 247 | |
| 248 /* SSL3Hashes contains an SSL hash value. The digest is contained in |u.raw| | |
| 249 * which, if |hashAlg==SEC_OID_UNKNOWN| is also a SSL3HashesIndividually | |
| 250 * struct. */ | |
| 251 typedef struct { | |
| 252 unsigned int len; | |
| 253 SECOidTag hashAlg; | |
| 254 union { | |
| 255 PRUint8 raw[64]; | |
|
wtc
2013/05/28 17:50:25
The size of |raw| was 32 bytes. I increased it to
| |
| 256 SSL3HashesIndividually s; | |
| 257 } u; | |
| 218 } SSL3Hashes; | 258 } SSL3Hashes; |
| 219 | 259 |
| 220 typedef struct { | 260 typedef struct { |
| 221 union { | 261 union { |
| 222 SSL3Opaque anonymous; | 262 SSL3Opaque anonymous; |
| 223 SSL3Hashes certified; | 263 SSL3Hashes certified; |
| 224 } u; | 264 } u; |
| 225 } SSL3ServerKeyExchange; | 265 } SSL3ServerKeyExchange; |
| 226 | 266 |
| 227 typedef enum { | 267 typedef enum { |
| 228 ct_RSA_sign = 1, | 268 ct_RSA_sign = 1, |
| 229 ct_DSS_sign = 2, | 269 ct_DSS_sign = 2, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 | 307 |
| 268 typedef SSL3Hashes SSL3PreSignedCertificateVerify; | 308 typedef SSL3Hashes SSL3PreSignedCertificateVerify; |
| 269 | 309 |
| 270 typedef SECItem SSL3CertificateVerify; | 310 typedef SECItem SSL3CertificateVerify; |
| 271 | 311 |
| 272 typedef enum { | 312 typedef enum { |
| 273 sender_client = 0x434c4e54, | 313 sender_client = 0x434c4e54, |
| 274 sender_server = 0x53525652 | 314 sender_server = 0x53525652 |
| 275 } SSL3Sender; | 315 } SSL3Sender; |
| 276 | 316 |
| 277 typedef SSL3Hashes SSL3Finished; | 317 typedef SSL3HashesIndividually SSL3Finished; |
|
wtc
2013/05/28 17:50:25
This change means SSL3Finished can only be used fo
| |
| 278 | 318 |
| 279 typedef struct { | 319 typedef struct { |
| 280 SSL3Opaque verify_data[12]; | 320 SSL3Opaque verify_data[12]; |
| 281 } TLSFinished; | 321 } TLSFinished; |
| 282 | 322 |
| 283 /* | 323 /* |
| 284 * TLS extension related data structures and constants. | 324 * TLS extension related data structures and constants. |
| 285 */ | 325 */ |
| 286 | 326 |
| 287 /* SessionTicket extension related data structures. */ | 327 /* SessionTicket extension related data structures. */ |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 315 unsigned char *iv; | 355 unsigned char *iv; |
| 316 SECItem encrypted_state; | 356 SECItem encrypted_state; |
| 317 unsigned char *mac; | 357 unsigned char *mac; |
| 318 } EncryptedSessionTicket; | 358 } EncryptedSessionTicket; |
| 319 | 359 |
| 320 #define TLS_EX_SESS_TICKET_MAC_LENGTH 32 | 360 #define TLS_EX_SESS_TICKET_MAC_LENGTH 32 |
| 321 | 361 |
| 322 #define TLS_STE_NO_SERVER_NAME -1 | 362 #define TLS_STE_NO_SERVER_NAME -1 |
| 323 | 363 |
| 324 #endif /* __ssl3proto_h_ */ | 364 #endif /* __ssl3proto_h_ */ |
| OLD | NEW |