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 | 8 |
9 #ifndef __ssl3proto_h_ | 9 #ifndef __ssl3proto_h_ |
10 #define __ssl3proto_h_ | 10 #define __ssl3proto_h_ |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 SECItem Ys; | 211 SECItem Ys; |
212 } SSL3ServerDHParams; | 212 } SSL3ServerDHParams; |
213 | 213 |
214 typedef struct { | 214 typedef struct { |
215 union { | 215 union { |
216 SSL3ServerDHParams dh; | 216 SSL3ServerDHParams dh; |
217 SSL3ServerRSAParams rsa; | 217 SSL3ServerRSAParams rsa; |
218 } u; | 218 } u; |
219 } SSL3ServerParams; | 219 } SSL3ServerParams; |
220 | 220 |
221 /* This enum reflects HashAlgorithm enum from | |
222 * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 | |
223 * | |
224 * When updating, be sure to also update ssl3_TLSHashAlgorithmToOID. */ | |
225 enum { | |
226 tls_hash_md5 = 1, | |
227 tls_hash_sha1 = 2, | |
228 tls_hash_sha224 = 3, | |
229 tls_hash_sha256 = 4, | |
230 tls_hash_sha384 = 5, | |
231 tls_hash_sha512 = 6 | |
232 }; | |
233 | |
234 /* This enum reflects SignatureAlgorithm enum from | |
235 * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ | |
236 typedef enum { | |
237 tls_sig_rsa = 1, | |
238 tls_sig_dsa = 2, | |
239 tls_sig_ecdsa = 3 | |
240 } TLSSignatureAlgorithm; | |
241 | |
242 typedef struct { | |
243 SECOidTag hashAlg; | |
244 TLSSignatureAlgorithm sigAlg; | |
245 } SSL3SignatureAndHashAlgorithm; | |
246 | |
247 /* SSL3HashesIndividually contains a combination MD5/SHA1 hash, as used in TLS | 221 /* SSL3HashesIndividually contains a combination MD5/SHA1 hash, as used in TLS |
248 * prior to 1.2. */ | 222 * prior to 1.2. */ |
249 typedef struct { | 223 typedef struct { |
250 PRUint8 md5[16]; | 224 PRUint8 md5[16]; |
251 PRUint8 sha[20]; | 225 PRUint8 sha[20]; |
252 } SSL3HashesIndividually; | 226 } SSL3HashesIndividually; |
253 | 227 |
254 /* SSL3Hashes contains an SSL hash value. The digest is contained in |u.raw| | 228 /* SSL3Hashes contains an SSL hash value. The digest is contained in |u.raw| |
255 * which, if |hashAlg==SEC_OID_UNKNOWN| is also a SSL3HashesIndividually | 229 * which, if |hashAlg==ssl_hash_none| is also a SSL3HashesIndividually |
256 * struct. */ | 230 * struct. */ |
257 typedef struct { | 231 typedef struct { |
258 unsigned int len; | 232 unsigned int len; |
259 SECOidTag hashAlg; | 233 SSLHashType hashAlg; |
260 union { | 234 union { |
261 PRUint8 raw[64]; | 235 PRUint8 raw[64]; |
262 SSL3HashesIndividually s; | 236 SSL3HashesIndividually s; |
263 } u; | 237 } u; |
264 } SSL3Hashes; | 238 } SSL3Hashes; |
265 | 239 |
266 typedef struct { | 240 typedef struct { |
267 union { | 241 union { |
268 SSL3Opaque anonymous; | 242 SSL3Opaque anonymous; |
269 SSL3Hashes certified; | 243 SSL3Hashes certified; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 unsigned char *iv; | 335 unsigned char *iv; |
362 SECItem encrypted_state; | 336 SECItem encrypted_state; |
363 unsigned char *mac; | 337 unsigned char *mac; |
364 } EncryptedSessionTicket; | 338 } EncryptedSessionTicket; |
365 | 339 |
366 #define TLS_EX_SESS_TICKET_MAC_LENGTH 32 | 340 #define TLS_EX_SESS_TICKET_MAC_LENGTH 32 |
367 | 341 |
368 #define TLS_STE_NO_SERVER_NAME -1 | 342 #define TLS_STE_NO_SERVER_NAME -1 |
369 | 343 |
370 #endif /* __ssl3proto_h_ */ | 344 #endif /* __ssl3proto_h_ */ |
OLD | NEW |