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

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

Issue 8156001: net: rework the NPN patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 #endif 315 #endif
316 } ssl3CipherSuiteCfg; 316 } ssl3CipherSuiteCfg;
317 317
318 #ifdef NSS_ENABLE_ECC 318 #ifdef NSS_ENABLE_ECC
319 #define ssl_V3_SUITES_IMPLEMENTED 50 319 #define ssl_V3_SUITES_IMPLEMENTED 50
320 #else 320 #else
321 #define ssl_V3_SUITES_IMPLEMENTED 30 321 #define ssl_V3_SUITES_IMPLEMENTED 30
322 #endif /* NSS_ENABLE_ECC */ 322 #endif /* NSS_ENABLE_ECC */
323 323
324 typedef struct sslOptionsStr { 324 typedef struct sslOptionsStr {
325 /* For clients, this is a validated list of protocols in preference order 325 /* If SSL_SetNextProtoNego has been called, then this contains the
326 * and wire format. For servers, this is the list of support protocols, 326 * list of supported protocols. */
wtc 2011/10/18 00:58:08 Unless this comment would also be correct for the
agl 2011/10/18 16:44:43 I believe that it would apply to the server side c
327 * also in wire format. */
328 SECItem nextProtoNego; 327 SECItem nextProtoNego;
329 328
330 unsigned int useSecurity : 1; /* 1 */ 329 unsigned int useSecurity : 1; /* 1 */
331 unsigned int useSocks : 1; /* 2 */ 330 unsigned int useSocks : 1; /* 2 */
332 unsigned int requestCertificate : 1; /* 3 */ 331 unsigned int requestCertificate : 1; /* 3 */
333 unsigned int requireCertificate : 2; /* 4-5 */ 332 unsigned int requireCertificate : 2; /* 4-5 */
334 unsigned int handshakeAsClient : 1; /* 6 */ 333 unsigned int handshakeAsClient : 1; /* 6 */
335 unsigned int handshakeAsServer : 1; /* 7 */ 334 unsigned int handshakeAsServer : 1; /* 7 */
336 unsigned int enableSSL2 : 1; /* 8 */ 335 unsigned int enableSSL2 : 1; /* 8 */
337 unsigned int enableSSL3 : 1; /* 9 */ 336 unsigned int enableSSL3 : 1; /* 9 */
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 sslBuffer messages; /* Accumulated handshake messages */ 819 sslBuffer messages; /* Accumulated handshake messages */
821 PRUint16 finishedBytes; /* size of single finished below */ 820 PRUint16 finishedBytes; /* size of single finished below */
822 union { 821 union {
823 TLSFinished tFinished[2]; /* client, then server */ 822 TLSFinished tFinished[2]; /* client, then server */
824 SSL3Hashes sFinished[2]; 823 SSL3Hashes sFinished[2];
825 SSL3Opaque data[72]; 824 SSL3Opaque data[72];
826 } finishedMsgs; 825 } finishedMsgs;
827 #ifdef NSS_ENABLE_ECC 826 #ifdef NSS_ENABLE_ECC
828 PRUint32 negotiatedECCurves; /* bit mask */ 827 PRUint32 negotiatedECCurves; /* bit mask */
829 #endif /* NSS_ENABLE_ECC */ 828 #endif /* NSS_ENABLE_ECC */
830 PRBool nextProtoNego;/* Our peer has sent this extension */
831 } SSL3HandshakeState; 829 } SSL3HandshakeState;
832 830
833 831
834 832
835 /* 833 /*
836 ** This is the "ssl3" struct, as in "ss->ssl3". 834 ** This is the "ssl3" struct, as in "ss->ssl3".
837 ** note: 835 ** note:
838 ** usually, crSpec == cwSpec and prSpec == pwSpec. 836 ** usually, crSpec == cwSpec and prSpec == pwSpec.
839 ** Sometimes, crSpec == pwSpec and prSpec == cwSpec. 837 ** Sometimes, crSpec == pwSpec and prSpec == cwSpec.
840 ** But there are never more than 2 actual specs. 838 ** But there are never more than 2 actual specs.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 * does not include the leaf cert. It is actually a 877 * does not include the leaf cert. It is actually a
880 * linked list of ssl3CertNode structs. 878 * linked list of ssl3CertNode structs.
881 */ 879 */
882 CERTDistNames * ca_list; 880 CERTDistNames * ca_list;
883 /* used by server. trusted CAs for this socket. */ 881 /* used by server. trusted CAs for this socket. */
884 PRBool initialized; 882 PRBool initialized;
885 SSL3HandshakeState hs; 883 SSL3HandshakeState hs;
886 ssl3CipherSpec specs[2]; /* one is current, one is pending. */ 884 ssl3CipherSpec specs[2]; /* one is current, one is pending. */
887 885
888 /* In a client: if the server supports Next Protocol Negotiation, then 886 /* In a client: if the server supports Next Protocol Negotiation, then
889 * this is the protocol that was requested. 887 * this is the protocol that was negotiated.
890 * In a server: this is the protocol that the client requested via Next
891 * Protocol Negotiation.
892 * 888 *
893 * In either case, if the data pointer is non-NULL, then it is malloced 889 * If the data pointer is non-NULL, then it is malloced data. */
894 * data. */
895 SECItem nextProto; 890 SECItem nextProto;
896 int»» » nextProtoState;»/* See SSL_NEXT_PROTO_* defines */ 891 int»» » nextProtoState; /* See NEXT_PROTO_* defines */
897 }; 892 };
898 893
899 typedef struct { 894 typedef struct {
900 SSL3ContentType type; 895 SSL3ContentType type;
901 SSL3ProtocolVersion version; 896 SSL3ProtocolVersion version;
902 sslBuffer * buf; 897 sslBuffer * buf;
903 } SSL3Ciphertext; 898 } SSL3Ciphertext;
904 899
905 struct ssl3KeyPairStr { 900 struct ssl3KeyPairStr {
906 SECKEYPrivateKey * privKey; 901 SECKEYPrivateKey * privKey;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 SSLGetPlatformClientAuthData getPlatformClientAuthData; 1117 SSLGetPlatformClientAuthData getPlatformClientAuthData;
1123 void *getPlatformClientAuthDataArg; 1118 void *getPlatformClientAuthDataArg;
1124 #endif /* NSS_PLATFORM_CLIENT_AUTH */ 1119 #endif /* NSS_PLATFORM_CLIENT_AUTH */
1125 SSLSNISocketConfig sniSocketConfig; 1120 SSLSNISocketConfig sniSocketConfig;
1126 void *sniSocketConfigArg; 1121 void *sniSocketConfigArg;
1127 SSLBadCertHandler handleBadCert; 1122 SSLBadCertHandler handleBadCert;
1128 void *badCertArg; 1123 void *badCertArg;
1129 SSLHandshakeCallback handshakeCallback; 1124 SSLHandshakeCallback handshakeCallback;
1130 void *handshakeCallbackData; 1125 void *handshakeCallbackData;
1131 void *pkcs11PinArg; 1126 void *pkcs11PinArg;
1127 SSLNextProtoCallback nextProtoCallback;
1128 void *nextProtoArg;
1132 1129
1133 PRIntervalTime rTimeout; /* timeout for NSPR I/O */ 1130 PRIntervalTime rTimeout; /* timeout for NSPR I/O */
1134 PRIntervalTime wTimeout; /* timeout for NSPR I/O */ 1131 PRIntervalTime wTimeout; /* timeout for NSPR I/O */
1135 PRIntervalTime cTimeout; /* timeout for NSPR I/O */ 1132 PRIntervalTime cTimeout; /* timeout for NSPR I/O */
1136 1133
1137 PZLock * recvLock; /* lock against multiple reader threads. */ 1134 PZLock * recvLock; /* lock against multiple reader threads. */
1138 PZLock * sendLock; /* lock against multiple sender threads. */ 1135 PZLock * sendLock; /* lock against multiple sender threads. */
1139 1136
1140 PZMonitor * recvBufLock; /* locks low level recv buffers. */ 1137 PZMonitor * recvBufLock; /* locks low level recv buffers. */
1141 PZMonitor * xmitBufLock; /* locks low level xmit buffers. */ 1138 PZMonitor * xmitBufLock; /* locks low level xmit buffers. */
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 #elif defined(_WIN32_WCE) 1746 #elif defined(_WIN32_WCE)
1750 #define SSL_GETPID GetCurrentProcessId 1747 #define SSL_GETPID GetCurrentProcessId
1751 #elif defined(WIN32) 1748 #elif defined(WIN32)
1752 extern int __cdecl _getpid(void); 1749 extern int __cdecl _getpid(void);
1753 #define SSL_GETPID _getpid 1750 #define SSL_GETPID _getpid
1754 #else 1751 #else
1755 #define SSL_GETPID() 0 1752 #define SSL_GETPID() 0
1756 #endif 1753 #endif
1757 1754
1758 #endif /* __sslimpl_h_ */ 1755 #endif /* __sslimpl_h_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698