| 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 * ***** BEGIN LICENSE BLOCK ***** | 5 * ***** BEGIN LICENSE BLOCK ***** |
| 6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 7 * | 7 * |
| 8 * The contents of this file are subject to the Mozilla Public License Version | 8 * The contents of this file are subject to the Mozilla Public License Version |
| 9 * 1.1 (the "License"); you may not use this file except in compliance with | 9 * 1.1 (the "License"); you may not use this file except in compliance with |
| 10 * the License. You may obtain a copy of the License at | 10 * the License. You may obtain a copy of the License at |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 unsigned char isPresent : 1; | 321 unsigned char isPresent : 1; |
| 322 #endif | 322 #endif |
| 323 } ssl3CipherSuiteCfg; | 323 } ssl3CipherSuiteCfg; |
| 324 | 324 |
| 325 #ifdef NSS_ENABLE_ECC | 325 #ifdef NSS_ENABLE_ECC |
| 326 #define ssl_V3_SUITES_IMPLEMENTED 50 | 326 #define ssl_V3_SUITES_IMPLEMENTED 50 |
| 327 #else | 327 #else |
| 328 #define ssl_V3_SUITES_IMPLEMENTED 30 | 328 #define ssl_V3_SUITES_IMPLEMENTED 30 |
| 329 #endif /* NSS_ENABLE_ECC */ | 329 #endif /* NSS_ENABLE_ECC */ |
| 330 | 330 |
| 331 #define MAX_DTLS_SRTP_CIPHER_SUITES 4 |
| 332 |
| 331 typedef struct sslOptionsStr { | 333 typedef struct sslOptionsStr { |
| 332 /* If SSL_SetNextProtoNego has been called, then this contains the | 334 /* If SSL_SetNextProtoNego has been called, then this contains the |
| 333 * list of supported protocols. */ | 335 * list of supported protocols. */ |
| 334 SECItem nextProtoNego; | 336 SECItem nextProtoNego; |
| 335 | 337 |
| 336 unsigned int useSecurity : 1; /* 1 */ | 338 unsigned int useSecurity : 1; /* 1 */ |
| 337 unsigned int useSocks : 1; /* 2 */ | 339 unsigned int useSocks : 1; /* 2 */ |
| 338 unsigned int requestCertificate : 1; /* 3 */ | 340 unsigned int requestCertificate : 1; /* 3 */ |
| 339 unsigned int requireCertificate : 2; /* 4-5 */ | 341 unsigned int requireCertificate : 2; /* 4-5 */ |
| 340 unsigned int handshakeAsClient : 1; /* 6 */ | 342 unsigned int handshakeAsClient : 1; /* 6 */ |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 SSL3HandshakeState hs; | 946 SSL3HandshakeState hs; |
| 945 ssl3CipherSpec specs[2]; /* one is current, one is pending. */ | 947 ssl3CipherSpec specs[2]; /* one is current, one is pending. */ |
| 946 | 948 |
| 947 /* In a client: if the server supports Next Protocol Negotiation, then | 949 /* In a client: if the server supports Next Protocol Negotiation, then |
| 948 * this is the protocol that was negotiated. | 950 * this is the protocol that was negotiated. |
| 949 */ | 951 */ |
| 950 SECItem nextProto; | 952 SECItem nextProto; |
| 951 SSLNextProtoState nextProtoState; | 953 SSLNextProtoState nextProtoState; |
| 952 | 954 |
| 953 PRUint16 mtu; /* Our estimate of the MTU */ | 955 PRUint16 mtu; /* Our estimate of the MTU */ |
| 956 |
| 957 /* DTLS-SRTP cipher suite preferences (if any) */ |
| 958 PRUint16 dtlsSRTPCiphers[MAX_DTLS_SRTP_CIPHER_SUITES]; |
| 959 PRUint16 dtlsSRTPCipherCount; |
| 960 PRUint16 dtlsSRTPCipherSuite; /* 0 if not selected */ |
| 954 }; | 961 }; |
| 955 | 962 |
| 956 #define DTLS_MAX_MTU 1500 /* Ethernet MTU but without subtracting the | 963 #define DTLS_MAX_MTU 1500 /* Ethernet MTU but without subtracting the |
| 957 * headers, so slightly larger than expected */ | 964 * headers, so slightly larger than expected */ |
| 958 #define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram) | 965 #define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram) |
| 959 | 966 |
| 960 typedef struct { | 967 typedef struct { |
| 961 SSL3ContentType type; | 968 SSL3ContentType type; |
| 962 SSL3ProtocolVersion version; | 969 SSL3ProtocolVersion version; |
| 963 SSL3SequenceNumber seq_num; /* DTLS only */ | 970 SSL3SequenceNumber seq_num; /* DTLS only */ |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 #elif defined(_WIN32_WCE) | 1905 #elif defined(_WIN32_WCE) |
| 1899 #define SSL_GETPID GetCurrentProcessId | 1906 #define SSL_GETPID GetCurrentProcessId |
| 1900 #elif defined(WIN32) | 1907 #elif defined(WIN32) |
| 1901 extern int __cdecl _getpid(void); | 1908 extern int __cdecl _getpid(void); |
| 1902 #define SSL_GETPID _getpid | 1909 #define SSL_GETPID _getpid |
| 1903 #else | 1910 #else |
| 1904 #define SSL_GETPID() 0 | 1911 #define SSL_GETPID() 0 |
| 1905 #endif | 1912 #endif |
| 1906 | 1913 |
| 1907 #endif /* __sslimpl_h_ */ | 1914 #endif /* __sslimpl_h_ */ |
| OLD | NEW |