| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 /* clients). False start is a */ | 133 /* clients). False start is a */ |
| 134 /* mode where an SSL client will start sending application data before */ | 134 /* mode where an SSL client will start sending application data before */ |
| 135 /* verifying the server's Finished message. This means that we could end up */ | 135 /* verifying the server's Finished message. This means that we could end up */ |
| 136 /* sending data to an imposter. However, the data will be encrypted and */ | 136 /* sending data to an imposter. However, the data will be encrypted and */ |
| 137 /* only the true server can derive the session key. Thus, so long as the */ | 137 /* only the true server can derive the session key. Thus, so long as the */ |
| 138 /* cipher isn't broken this is safe. Because of this, False Start will only */ | 138 /* cipher isn't broken this is safe. Because of this, False Start will only */ |
| 139 /* occur on RSA or DH ciphersuites where the cipher's key length is >= 80 */ | 139 /* occur on RSA or DH ciphersuites where the cipher's key length is >= 80 */ |
| 140 /* bits. The advantage of False Start is that it saves a round trip for */ | 140 /* bits. The advantage of False Start is that it saves a round trip for */ |
| 141 /* client-speaks-first protocols when performing a full handshake. */ | 141 /* client-speaks-first protocols when performing a full handshake. */ |
| 142 #define SSL_ENABLE_OCSP_STAPLING 23 /* Request OCSP stapling (client) */ | 142 #define SSL_ENABLE_OCSP_STAPLING 23 /* Request OCSP stapling (client) */ |
| 143 #define SSL_ENABLE_CACHED_INFO 24 /* Enable TLS cached information */ |
| 144 /* extension, off by default. */ |
| 143 | 145 |
| 144 #ifdef SSL_DEPRECATED_FUNCTION | 146 #ifdef SSL_DEPRECATED_FUNCTION |
| 145 /* Old deprecated function names */ | 147 /* Old deprecated function names */ |
| 146 SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on); | 148 SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on); |
| 147 SSL_IMPORT SECStatus SSL_EnableDefault(int option, PRBool on); | 149 SSL_IMPORT SECStatus SSL_EnableDefault(int option, PRBool on); |
| 148 #endif | 150 #endif |
| 149 | 151 |
| 150 /* New function names */ | 152 /* New function names */ |
| 151 SSL_IMPORT SECStatus SSL_OptionSet(PRFileDesc *fd, PRInt32 option, PRBool on); | 153 SSL_IMPORT SECStatus SSL_OptionSet(PRFileDesc *fd, PRInt32 option, PRBool on); |
| 152 SSL_IMPORT SECStatus SSL_OptionGet(PRFileDesc *fd, PRInt32 option, PRBool *on); | 154 SSL_IMPORT SECStatus SSL_OptionGet(PRFileDesc *fd, PRInt32 option, PRBool *on); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 432 |
| 431 /* | 433 /* |
| 432 ** This is a callback for dealing with server certs that are not authenticated | 434 ** This is a callback for dealing with server certs that are not authenticated |
| 433 ** by the client. The client app can decide that it actually likes the | 435 ** by the client. The client app can decide that it actually likes the |
| 434 ** cert by some external means and restart the connection. | 436 ** cert by some external means and restart the connection. |
| 435 */ | 437 */ |
| 436 typedef SECStatus (PR_CALLBACK *SSLBadCertHandler)(void *arg, PRFileDesc *fd); | 438 typedef SECStatus (PR_CALLBACK *SSLBadCertHandler)(void *arg, PRFileDesc *fd); |
| 437 SSL_IMPORT SECStatus SSL_BadCertHook(PRFileDesc *fd, SSLBadCertHandler f, | 439 SSL_IMPORT SECStatus SSL_BadCertHook(PRFileDesc *fd, SSLBadCertHandler f, |
| 438 void *arg); | 440 void *arg); |
| 439 | 441 |
| 442 /* |
| 443 ** Set the predicted chain of certificates for the peer. This is used for the |
| 444 ** TLS Cached Info extension. Note that the SSL_ENABLE_CACHED_INFO option must |
| 445 ** be set for this to occur. |
| 446 ** |
| 447 ** This function takes a reference to each of the given certificates. |
| 448 */ |
| 449 SSL_IMPORT SECStatus SSL_SetPredictedPeerCertificates( |
| 450 PRFileDesc *fd, CERTCertificate **certs, |
| 451 unsigned int numCerts); |
| 452 |
| 440 /* | 453 /* |
| 441 ** Configure SSL socket for running a secure server. Needs the | 454 ** Configure SSL socket for running a secure server. Needs the |
| 442 ** certificate for the server and the servers private key. The arguments | 455 ** certificate for the server and the servers private key. The arguments |
| 443 ** are copied. | 456 ** are copied. |
| 444 */ | 457 */ |
| 445 SSL_IMPORT SECStatus SSL_ConfigSecureServer( | 458 SSL_IMPORT SECStatus SSL_ConfigSecureServer( |
| 446 PRFileDesc *fd, CERTCertificate *cert, | 459 PRFileDesc *fd, CERTCertificate *cert, |
| 447 SECKEYPrivateKey *key, SSLKEAType kea); | 460 SECKEYPrivateKey *key, SSLKEAType kea); |
| 448 | 461 |
| 449 /* | 462 /* |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 ** Did the handshake with the peer negotiate the given extension? | 713 ** Did the handshake with the peer negotiate the given extension? |
| 701 ** Output parameter valid only if function returns SECSuccess | 714 ** Output parameter valid only if function returns SECSuccess |
| 702 */ | 715 */ |
| 703 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, | 716 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, |
| 704 SSLExtensionType extId, | 717 SSLExtensionType extId, |
| 705 PRBool *yes); | 718 PRBool *yes); |
| 706 | 719 |
| 707 SEC_END_PROTOS | 720 SEC_END_PROTOS |
| 708 | 721 |
| 709 #endif /* __ssl_h_ */ | 722 #endif /* __ssl_h_ */ |
| OLD | NEW |