Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: net/third_party/nss/ssl/sslimpl.h

Issue 9982019: Implement RFC 5764 (DTLS-SRTP). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Avoid goto Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 SSL3HandshakeState hs; 948 SSL3HandshakeState hs;
947 ssl3CipherSpec specs[2]; /* one is current, one is pending. */ 949 ssl3CipherSpec specs[2]; /* one is current, one is pending. */
948 950
949 /* In a client: if the server supports Next Protocol Negotiation, then 951 /* In a client: if the server supports Next Protocol Negotiation, then
950 * this is the protocol that was negotiated. 952 * this is the protocol that was negotiated.
951 */ 953 */
952 SECItem nextProto; 954 SECItem nextProto;
953 SSLNextProtoState nextProtoState; 955 SSLNextProtoState nextProtoState;
954 956
955 PRUint16 mtu; /* Our estimate of the MTU */ 957 PRUint16 mtu; /* Our estimate of the MTU */
958
959 /* DTLS-SRTP cipher suite preferences (if any) */
960 PRUint16 dtlsSRTPCiphers[MAX_DTLS_SRTP_CIPHER_SUITES];
961 PRUint16 dtlsSRTPCipherCount;
962 PRUint16 dtlsSRTPCipherSuite; /* 0 if not selected */
956 }; 963 };
957 964
958 #define DTLS_MAX_MTU 1500 /* Ethernet MTU but without subtracting the 965 #define DTLS_MAX_MTU 1500 /* Ethernet MTU but without subtracting the
959 * headers, so slightly larger than expected */ 966 * headers, so slightly larger than expected */
960 #define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram) 967 #define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
961 968
962 typedef struct { 969 typedef struct {
963 SSL3ContentType type; 970 SSL3ContentType type;
964 SSL3ProtocolVersion version; 971 SSL3ProtocolVersion version;
965 SSL3SequenceNumber seq_num; /* DTLS only */ 972 SSL3SequenceNumber seq_num; /* DTLS only */
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 #elif defined(_WIN32_WCE) 1911 #elif defined(_WIN32_WCE)
1905 #define SSL_GETPID GetCurrentProcessId 1912 #define SSL_GETPID GetCurrentProcessId
1906 #elif defined(WIN32) 1913 #elif defined(WIN32)
1907 extern int __cdecl _getpid(void); 1914 extern int __cdecl _getpid(void);
1908 #define SSL_GETPID _getpid 1915 #define SSL_GETPID _getpid
1909 #else 1916 #else
1910 #define SSL_GETPID() 0 1917 #define SSL_GETPID() 0
1911 #endif 1918 #endif
1912 1919
1913 #endif /* __sslimpl_h_ */ 1920 #endif /* __sslimpl_h_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698