OLD | NEW |
---|---|
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 | 7 |
8 #ifndef __ssl_h_ | 8 #ifndef __ssl_h_ |
9 #define __ssl_h_ | 9 #define __ssl_h_ |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 * SSL_SetNextProtoCallback. It also causes a client to advertise NPN and | 201 * SSL_SetNextProtoCallback. It also causes a client to advertise NPN and |
202 * installs a default callback function which selects the first supported | 202 * installs a default callback function which selects the first supported |
203 * protocol in server-preference order. If no matching protocol is found it | 203 * protocol in server-preference order. If no matching protocol is found it |
204 * selects the first supported protocol. | 204 * selects the first supported protocol. |
205 * | 205 * |
206 * Using this function also allows the client to transparently support ALPN. | 206 * Using this function also allows the client to transparently support ALPN. |
207 * The same set of protocols will be advertised via ALPN and, if the server | 207 * The same set of protocols will be advertised via ALPN and, if the server |
208 * uses ALPN to select a protocol, SSL_GetNextProto will return | 208 * uses ALPN to select a protocol, SSL_GetNextProto will return |
209 * SSL_NEXT_PROTO_SELECTED as the state. | 209 * SSL_NEXT_PROTO_SELECTED as the state. |
210 * | 210 * |
211 * Since NPN uses the first protocol as the fallback protocol, when sending an | |
212 * ALPN extension, the first protocol is moved to the end of the list. This | |
213 * indicates that the protocol is the least preferred. | |
wtc
2013/08/06 18:08:56
Nit: the protocol => the fallback protocol ?
We s
| |
214 * | |
211 * The supported protocols are specified in |data| in wire-format (8-bit | 215 * The supported protocols are specified in |data| in wire-format (8-bit |
212 * length-prefixed). For example: "\010http/1.1\006spdy/2". */ | 216 * length-prefixed). For example: "\010http/1.1\006spdy/2". */ |
213 SSL_IMPORT SECStatus SSL_SetNextProtoNego(PRFileDesc *fd, | 217 SSL_IMPORT SECStatus SSL_SetNextProtoNego(PRFileDesc *fd, |
214 const unsigned char *data, | 218 const unsigned char *data, |
215 unsigned int length); | 219 unsigned int length); |
216 | 220 |
217 typedef enum SSLNextProtoState { | 221 typedef enum SSLNextProtoState { |
218 SSL_NEXT_PROTO_NO_SUPPORT = 0, /* No peer support */ | 222 SSL_NEXT_PROTO_NO_SUPPORT = 0, /* No peer support */ |
219 SSL_NEXT_PROTO_NEGOTIATED = 1, /* Mutual agreement */ | 223 SSL_NEXT_PROTO_NEGOTIATED = 1, /* Mutual agreement */ |
220 SSL_NEXT_PROTO_NO_OVERLAP = 2, /* No protocol overlap found */ | 224 SSL_NEXT_PROTO_NO_OVERLAP = 2, /* No protocol overlap found */ |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1096 * should continue using the connection. If the application passes a non-zero | 1100 * should continue using the connection. If the application passes a non-zero |
1097 * value for second argument (error), or if SSL_AuthCertificateComplete returns | 1101 * value for second argument (error), or if SSL_AuthCertificateComplete returns |
1098 * anything other than SECSuccess, then the application should close the | 1102 * anything other than SECSuccess, then the application should close the |
1099 * connection. | 1103 * connection. |
1100 */ | 1104 */ |
1101 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, | 1105 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, |
1102 PRErrorCode error); | 1106 PRErrorCode error); |
1103 SEC_END_PROTOS | 1107 SEC_END_PROTOS |
1104 | 1108 |
1105 #endif /* __ssl_h_ */ | 1109 #endif /* __ssl_h_ */ |
OLD | NEW |