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

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

Issue 18346010: net: support ALPN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « net/third_party/nss/patches/applypatches.sh ('k') | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file contains prototypes for the public SSL functions. 2 * This file contains prototypes for the public SSL functions.
3 * 3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public 4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* $Id$ */ 7 /* $Id$ */
8 8
9 #ifndef __ssl_h_ 9 #ifndef __ssl_h_
10 #define __ssl_h_ 10 #define __ssl_h_
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 SSL_IMPORT SECStatus SSL_SetNextProtoCallback(PRFileDesc *fd, 197 SSL_IMPORT SECStatus SSL_SetNextProtoCallback(PRFileDesc *fd,
198 SSLNextProtoCallback callback, 198 SSLNextProtoCallback callback,
199 void *arg); 199 void *arg);
200 200
201 /* SSL_SetNextProtoNego can be used as an alternative to 201 /* SSL_SetNextProtoNego can be used as an alternative to
202 * SSL_SetNextProtoCallback. It also causes a client to advertise NPN and 202 * SSL_SetNextProtoCallback. It also causes a client to advertise NPN and
203 * installs a default callback function which selects the first supported 203 * installs a default callback function which selects the first supported
204 * protocol in server-preference order. If no matching protocol is found it 204 * protocol in server-preference order. If no matching protocol is found it
205 * selects the first supported protocol. 205 * selects the first supported protocol.
206 * 206 *
207 * In addition to SSL_SetNextProtoCallback, this allows the client to also
208 * support ALPN.
Ryan Sleevi 2013/07/02 00:41:43 nit: I'm not sure I fully parse this comment. Does
agl 2013/07/02 17:43:01 You're right, that was nonsense. " * Using this f
209 *
207 * The supported protocols are specified in |data| in wire-format (8-bit 210 * The supported protocols are specified in |data| in wire-format (8-bit
208 * length-prefixed). For example: "\010http/1.1\006spdy/2". */ 211 * length-prefixed). For example: "\010http/1.1\006spdy/2". */
209 SSL_IMPORT SECStatus SSL_SetNextProtoNego(PRFileDesc *fd, 212 SSL_IMPORT SECStatus SSL_SetNextProtoNego(PRFileDesc *fd,
210 const unsigned char *data, 213 const unsigned char *data,
211 unsigned int length); 214 unsigned int length);
212 215
213 typedef enum SSLNextProtoState { 216 typedef enum SSLNextProtoState {
214 SSL_NEXT_PROTO_NO_SUPPORT = 0, /* No peer support */ 217 SSL_NEXT_PROTO_NO_SUPPORT = 0, /* No peer support */
215 SSL_NEXT_PROTO_NEGOTIATED = 1, /* Mutual agreement */ 218 SSL_NEXT_PROTO_NEGOTIATED = 1, /* Mutual agreement */
216 SSL_NEXT_PROTO_NO_OVERLAP = 2 /* No protocol overlap found */ 219 SSL_NEXT_PROTO_NO_OVERLAP = 2, /* No protocol overlap found */
220 SSL_NEXT_PROTO_SELECTED = 3, /* Server selected proto (ALPN) */
217 } SSLNextProtoState; 221 } SSLNextProtoState;
218 222
219 /* SSL_GetNextProto can be used in the HandshakeCallback or any time after 223 /* SSL_GetNextProto can be used in the HandshakeCallback or any time after
220 * a handshake to retrieve the result of the Next Protocol negotiation. 224 * a handshake to retrieve the result of the Next Protocol negotiation.
221 * 225 *
222 * The length of the negotiated protocol, if any, is written into *bufLen. 226 * The length of the negotiated protocol, if any, is written into *bufLen.
223 * If the negotiated protocol is longer than bufLenMax, then SECFailure is 227 * If the negotiated protocol is longer than bufLenMax, then SECFailure is
224 * returned. Otherwise, the negotiated protocol, if any, is written into buf, 228 * returned. Otherwise, the negotiated protocol, if any, is written into buf,
225 * and SECSuccess is returned. */ 229 * and SECSuccess is returned. */
226 SSL_IMPORT SECStatus SSL_GetNextProto(PRFileDesc *fd, 230 SSL_IMPORT SECStatus SSL_GetNextProto(PRFileDesc *fd,
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 * should continue using the connection. If the application passes a non-zero 1096 * should continue using the connection. If the application passes a non-zero
1093 * value for second argument (error), or if SSL_AuthCertificateComplete returns 1097 * value for second argument (error), or if SSL_AuthCertificateComplete returns
1094 * anything other than SECSuccess, then the application should close the 1098 * anything other than SECSuccess, then the application should close the
1095 * connection. 1099 * connection.
1096 */ 1100 */
1097 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, 1101 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd,
1098 PRErrorCode error); 1102 PRErrorCode error);
1099 SEC_END_PROTOS 1103 SEC_END_PROTOS
1100 1104
1101 #endif /* __ssl_h_ */ 1105 #endif /* __ssl_h_ */
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/applypatches.sh ('k') | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698