OLD | NEW |
1 /* | 1 /* |
2 * This file is PRIVATE to SSL and should be the first thing included by | 2 * This file is PRIVATE to SSL and should be the first thing included by |
3 * any SSL implementation file. | 3 * any SSL implementation file. |
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: sslimpl.h,v 1.108 2012/09/28 01:46:45 wtc%google.com Exp $ */ | 8 /* $Id: sslimpl.h,v 1.108 2012/09/28 01:46:45 wtc%google.com Exp $ */ |
9 | 9 |
10 #ifndef __sslimpl_h_ | 10 #ifndef __sslimpl_h_ |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 PK11SymKey *write_key; | 523 PK11SymKey *write_key; |
524 PK11SymKey *write_mac_key; | 524 PK11SymKey *write_mac_key; |
525 PK11Context *write_mac_context; | 525 PK11Context *write_mac_context; |
526 SECItem write_key_item; | 526 SECItem write_key_item; |
527 SECItem write_iv_item; | 527 SECItem write_iv_item; |
528 SECItem write_mac_key_item; | 528 SECItem write_mac_key_item; |
529 SSL3Opaque write_iv[MAX_IV_LENGTH]; | 529 SSL3Opaque write_iv[MAX_IV_LENGTH]; |
530 PRUint64 cipher_context[MAX_CIPHER_CONTEXT_LLONGS]; | 530 PRUint64 cipher_context[MAX_CIPHER_CONTEXT_LLONGS]; |
531 } ssl3KeyMaterial; | 531 } ssl3KeyMaterial; |
532 | 532 |
| 533 /* The number of initial RC4 keystream bytes that have a statistical bias */ |
| 534 #define SSL3_BIASED_RC4_BYTES 256 |
| 535 |
533 /* The DTLS anti-replay window. Defined here because we need it in | 536 /* The DTLS anti-replay window. Defined here because we need it in |
534 * the cipher spec. Note that this is a ring buffer but left and | 537 * the cipher spec. Note that this is a ring buffer but left and |
535 * right represent the true window, with modular arithmetic used to | 538 * right represent the true window, with modular arithmetic used to |
536 * map them onto the buffer. | 539 * map them onto the buffer. |
537 */ | 540 */ |
538 #define DTLS_RECVD_RECORDS_WINDOW 1024 /* Packets; approximate | 541 #define DTLS_RECVD_RECORDS_WINDOW 1024 /* Packets; approximate |
539 * Must be divisible by 8 | 542 * Must be divisible by 8 |
540 */ | 543 */ |
541 typedef struct DTLSRecvdRecordsStr { | 544 typedef struct DTLSRecvdRecordsStr { |
542 unsigned char data[DTLS_RECVD_RECORDS_WINDOW/8]; | 545 unsigned char data[DTLS_RECVD_RECORDS_WINDOW/8]; |
(...skipping 18 matching lines...) Expand all Loading... |
561 void * decodeContext; | 564 void * decodeContext; |
562 SSLCompressor compressor; /* Don't name these fields compress */ | 565 SSLCompressor compressor; /* Don't name these fields compress */ |
563 SSLCompressor decompressor; /* and uncompress because zconf.h */ | 566 SSLCompressor decompressor; /* and uncompress because zconf.h */ |
564 /* may define them as macros. */ | 567 /* may define them as macros. */ |
565 SSLDestroy destroyCompressContext; | 568 SSLDestroy destroyCompressContext; |
566 void * compressContext; | 569 void * compressContext; |
567 SSLDestroy destroyDecompressContext; | 570 SSLDestroy destroyDecompressContext; |
568 void * decompressContext; | 571 void * decompressContext; |
569 PRBool bypassCiphers; /* did double bypass (at least) */ | 572 PRBool bypassCiphers; /* did double bypass (at least) */ |
570 PK11SymKey * master_secret; | 573 PK11SymKey * master_secret; |
| 574 unsigned int rc4EncryptedBytes; /* The number of bytes that have |
| 575 * been encrypted with RC4. Stop |
| 576 * counting after it exceeds |
| 577 * SSL3_BIASED_RC4_BYTES. */ |
571 SSL3SequenceNumber write_seq_num; | 578 SSL3SequenceNumber write_seq_num; |
572 SSL3SequenceNumber read_seq_num; | 579 SSL3SequenceNumber read_seq_num; |
573 SSL3ProtocolVersion version; | 580 SSL3ProtocolVersion version; |
574 ssl3KeyMaterial client; | 581 ssl3KeyMaterial client; |
575 ssl3KeyMaterial server; | 582 ssl3KeyMaterial server; |
576 SECItem msItem; | 583 SECItem msItem; |
577 unsigned char key_block[NUM_MIXERS * MD5_LENGTH]; | 584 unsigned char key_block[NUM_MIXERS * MD5_LENGTH]; |
578 unsigned char raw_master_secret[56]; | 585 unsigned char raw_master_secret[56]; |
579 SECItem srvVirtName; /* for server: name that was negotiated | 586 SECItem srvVirtName; /* for server: name that was negotiated |
580 * with a client. For client - is | 587 * with a client. For client - is |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 #elif defined(_WIN32_WCE) | 1881 #elif defined(_WIN32_WCE) |
1875 #define SSL_GETPID GetCurrentProcessId | 1882 #define SSL_GETPID GetCurrentProcessId |
1876 #elif defined(WIN32) | 1883 #elif defined(WIN32) |
1877 extern int __cdecl _getpid(void); | 1884 extern int __cdecl _getpid(void); |
1878 #define SSL_GETPID _getpid | 1885 #define SSL_GETPID _getpid |
1879 #else | 1886 #else |
1880 #define SSL_GETPID() 0 | 1887 #define SSL_GETPID() 0 |
1881 #endif | 1888 #endif |
1882 | 1889 |
1883 #endif /* __sslimpl_h_ */ | 1890 #endif /* __sslimpl_h_ */ |
OLD | NEW |