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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 * in progress. */ | 857 * in progress. */ |
858 unsigned char cookie[32]; /* The cookie */ | 858 unsigned char cookie[32]; /* The cookie */ |
859 unsigned char cookieLen; /* The length of the cookie */ | 859 unsigned char cookieLen; /* The length of the cookie */ |
860 PRIntervalTime rtTimerStarted; /* When the timer was started */ | 860 PRIntervalTime rtTimerStarted; /* When the timer was started */ |
861 DTLSTimerCb rtTimerCb; /* The function to call on expiry */ | 861 DTLSTimerCb rtTimerCb; /* The function to call on expiry */ |
862 PRUint32 rtTimeoutMs; /* The length of the current timeout | 862 PRUint32 rtTimeoutMs; /* The length of the current timeout |
863 * used for backoff (in ms) */ | 863 * used for backoff (in ms) */ |
864 PRUint32 rtRetries; /* The retry counter */ | 864 PRUint32 rtRetries; /* The retry counter */ |
865 } SSL3HandshakeState; | 865 } SSL3HandshakeState; |
866 | 866 |
867 | 867 enum { |
| 868 /* The number of initial RC4 keystream bytes that have a statistical |
| 869 * bias */ |
| 870 SSL3_BIASED_RC4_BYTES = 256 |
| 871 }; |
868 | 872 |
869 /* | 873 /* |
870 ** This is the "ssl3" struct, as in "ss->ssl3". | 874 ** This is the "ssl3" struct, as in "ss->ssl3". |
871 ** note: | 875 ** note: |
872 ** usually, crSpec == cwSpec and prSpec == pwSpec. | 876 ** usually, crSpec == cwSpec and prSpec == pwSpec. |
873 ** Sometimes, crSpec == pwSpec and prSpec == cwSpec. | 877 ** Sometimes, crSpec == pwSpec and prSpec == cwSpec. |
874 ** But there are never more than 2 actual specs. | 878 ** But there are never more than 2 actual specs. |
875 ** No spec must ever be modified if either "current" pointer points to it. | 879 ** No spec must ever be modified if either "current" pointer points to it. |
876 */ | 880 */ |
877 struct ssl3StateStr { | 881 struct ssl3StateStr { |
(...skipping 25 matching lines...) Expand all Loading... |
903 */ | 907 */ |
904 PRArenaPool * peerCertArena; | 908 PRArenaPool * peerCertArena; |
905 /* These are used to keep track of the peer CA */ | 909 /* These are used to keep track of the peer CA */ |
906 void * peerCertChain; | 910 void * peerCertChain; |
907 /* chain while we are trying to validate it. */ | 911 /* chain while we are trying to validate it. */ |
908 CERTDistNames * ca_list; | 912 CERTDistNames * ca_list; |
909 /* used by server. trusted CAs for this socket. */ | 913 /* used by server. trusted CAs for this socket. */ |
910 PRBool initialized; | 914 PRBool initialized; |
911 SSL3HandshakeState hs; | 915 SSL3HandshakeState hs; |
912 ssl3CipherSpec specs[2]; /* one is current, one is pending. */ | 916 ssl3CipherSpec specs[2]; /* one is current, one is pending. */ |
| 917 /* The number of bytes that have been encrypted with RC4. Set to 0 at |
| 918 * the beginning of each handshake. Stop counting after it exceeds |
| 919 * SSL3_BIASED_RC4_BYTES. */ |
| 920 unsigned int rc4EncryptedBytes; |
913 | 921 |
914 /* In a client: if the server supports Next Protocol Negotiation, then | 922 /* In a client: if the server supports Next Protocol Negotiation, then |
915 * this is the protocol that was negotiated. | 923 * this is the protocol that was negotiated. |
916 */ | 924 */ |
917 SECItem nextProto; | 925 SECItem nextProto; |
918 SSLNextProtoState nextProtoState; | 926 SSLNextProtoState nextProtoState; |
919 | 927 |
920 PRUint16 mtu; /* Our estimate of the MTU */ | 928 PRUint16 mtu; /* Our estimate of the MTU */ |
921 | 929 |
922 /* DTLS-SRTP cipher suite preferences (if any) */ | 930 /* DTLS-SRTP cipher suite preferences (if any) */ |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 #elif defined(_WIN32_WCE) | 1882 #elif defined(_WIN32_WCE) |
1875 #define SSL_GETPID GetCurrentProcessId | 1883 #define SSL_GETPID GetCurrentProcessId |
1876 #elif defined(WIN32) | 1884 #elif defined(WIN32) |
1877 extern int __cdecl _getpid(void); | 1885 extern int __cdecl _getpid(void); |
1878 #define SSL_GETPID _getpid | 1886 #define SSL_GETPID _getpid |
1879 #else | 1887 #else |
1880 #define SSL_GETPID() 0 | 1888 #define SSL_GETPID() 0 |
1881 #endif | 1889 #endif |
1882 | 1890 |
1883 #endif /* __sslimpl_h_ */ | 1891 #endif /* __sslimpl_h_ */ |
OLD | NEW |