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 * ***** BEGIN LICENSE BLOCK ***** | 4 * ***** BEGIN LICENSE BLOCK ***** |
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
6 * | 6 * |
7 * The contents of this file are subject to the Mozilla Public License Version | 7 * The contents of this file are subject to the Mozilla Public License Version |
8 * 1.1 (the "License"); you may not use this file except in compliance with | 8 * 1.1 (the "License"); you may not use this file except in compliance with |
9 * the License. You may obtain a copy of the License at | 9 * the License. You may obtain a copy of the License at |
10 * http://www.mozilla.org/MPL/ | 10 * http://www.mozilla.org/MPL/ |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 SSL_IMPORT SECStatus SSL_EnableDefault(int option, PRBool on); | 150 SSL_IMPORT SECStatus SSL_EnableDefault(int option, PRBool on); |
151 #endif | 151 #endif |
152 | 152 |
153 /* New function names */ | 153 /* New function names */ |
154 SSL_IMPORT SECStatus SSL_OptionSet(PRFileDesc *fd, PRInt32 option, PRBool on); | 154 SSL_IMPORT SECStatus SSL_OptionSet(PRFileDesc *fd, PRInt32 option, PRBool on); |
155 SSL_IMPORT SECStatus SSL_OptionGet(PRFileDesc *fd, PRInt32 option, PRBool *on); | 155 SSL_IMPORT SECStatus SSL_OptionGet(PRFileDesc *fd, PRInt32 option, PRBool *on); |
156 SSL_IMPORT SECStatus SSL_OptionSetDefault(PRInt32 option, PRBool on); | 156 SSL_IMPORT SECStatus SSL_OptionSetDefault(PRInt32 option, PRBool on); |
157 SSL_IMPORT SECStatus SSL_OptionGetDefault(PRInt32 option, PRBool *on); | 157 SSL_IMPORT SECStatus SSL_OptionGetDefault(PRInt32 option, PRBool *on); |
158 SSL_IMPORT SECStatus SSL_CertDBHandleSet(PRFileDesc *fd, CERTCertDBHandle *dbHan dle); | 158 SSL_IMPORT SECStatus SSL_CertDBHandleSet(PRFileDesc *fd, CERTCertDBHandle *dbHan dle); |
159 | 159 |
160 SSL_IMPORT SECStatus SSL_SetNextProtoNego(PRFileDesc *fd, | 160 #define SSL_NEXT_PROTO_NEGOTIATION_SUPPORTED 1 |
161 » » » » » const unsigned char *data, | 161 |
162 » » » » » unsigned short length); | 162 /* SSLNextProtoCallback is called, during the handshake, when the server has |
163 SSL_IMPORT SECStatus SSL_GetNextProto(PRFileDesc *fd, | 163 * sent a Next Protocol Negotiation extension. |protos| and |protosLen| define |
164 » » » » int *state, | 164 * a buffer which contains the server's advertisement. This data is guaranteed |
165 » » » » unsigned char *buf, | 165 * to be well formed per the NPN spec. |protoOut| is a buffer of length 255 |
166 » » » » unsigned *length, | 166 * (the maximum allowed by the protocol) which, on successful return, must |
167 » » » » unsigned buf_len); | 167 * contain the protocol to be announced to the server. */ |
168 #define SSL_NEXT_PROTO_NO_SUPPORT» 0 /* No peer support */ | 168 typedef SECStatus (PR_CALLBACK *SSLNextProtoCallback)( |
169 #define SSL_NEXT_PROTO_NEGOTIATED» 1 /* Mutual agreement */ | 169 void *arg, |
170 #define SSL_NEXT_PROTO_NO_OVERLAP» 2 /* No protocol overlap found */ | 170 PRFileDesc *fd, |
171 const unsigned char* protos, | |
172 unsigned short protosLen, | |
173 unsigned char* protoOut, | |
174 unsigned char* protoOutLen); | |
wtc
2011/10/11 23:43:04
On second thought, I think we should use
unsig
agl
2011/10/17 17:37:24
Done.
| |
175 | |
176 /* SSL_SetNextProtoCallback sets a callback function to handle Next Protocol | |
177 * Negotiation. It causes a client to advertise NPN. */ | |
wtc
2011/10/11 23:43:04
If you take my suggestion of keeping SSL_SetNextPr
agl
2011/10/17 17:37:24
Done.
| |
178 SSL_IMPORT SECStatus SSL_SetNextProtoCallback(PRFileDesc *fd, | |
179 SSLNextProtoCallback callback, | |
180 void *arg); | |
171 | 181 |
172 /* | 182 /* |
173 ** Control ciphers that SSL uses. If on is non-zero then the named cipher | 183 ** Control ciphers that SSL uses. If on is non-zero then the named cipher |
174 ** is enabled, otherwise it is disabled. | 184 ** is enabled, otherwise it is disabled. |
175 ** The "cipher" values are defined in sslproto.h (the SSL_EN_* values). | 185 ** The "cipher" values are defined in sslproto.h (the SSL_EN_* values). |
176 ** EnableCipher records user preferences. | 186 ** EnableCipher records user preferences. |
177 ** SetPolicy sets the policy according to the policy module. | 187 ** SetPolicy sets the policy according to the policy module. |
178 */ | 188 */ |
179 #ifdef SSL_DEPRECATED_FUNCTION | 189 #ifdef SSL_DEPRECATED_FUNCTION |
180 /* Old deprecated function names */ | 190 /* Old deprecated function names */ |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 SSLExtensionType extId, | 765 SSLExtensionType extId, |
756 PRBool *yes); | 766 PRBool *yes); |
757 | 767 |
758 SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, | 768 SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, |
759 PRBool *last_handshake_resumed) ; | 769 PRBool *last_handshake_resumed) ; |
760 | 770 |
761 | 771 |
762 SEC_END_PROTOS | 772 SEC_END_PROTOS |
763 | 773 |
764 #endif /* __ssl_h_ */ | 774 #endif /* __ssl_h_ */ |
OLD | NEW |