| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  316 /* |  316 /* | 
|  317  * Set the client side callback for SSL to retrieve user's private key |  317  * Set the client side callback for SSL to retrieve user's private key | 
|  318  * and certificate. |  318  * and certificate. | 
|  319  *      fd - the file descriptor for the connection in question |  319  *      fd - the file descriptor for the connection in question | 
|  320  *      f - the application's callback that delivers the key and cert |  320  *      f - the application's callback that delivers the key and cert | 
|  321  *      a - application specific data |  321  *      a - application specific data | 
|  322  */ |  322  */ | 
|  323 SSL_IMPORT SECStatus SSL_GetClientAuthDataHook(PRFileDesc *fd,  |  323 SSL_IMPORT SECStatus SSL_GetClientAuthDataHook(PRFileDesc *fd,  | 
|  324                                                SSLGetClientAuthData f, void *a); |  324                                                SSLGetClientAuthData f, void *a); | 
|  325  |  325  | 
 |  326 /* | 
 |  327  * Prototype for SSL callback to get client auth data from the application, | 
 |  328  * when using the underlying platform's cryptographic primitives. Returning | 
 |  329  * SECFailure will cause the socket to send no client certificate. | 
 |  330  *      arg - application passed argument | 
 |  331  *      caNames - pointer to distinguished names of CAs that the server likes | 
 |  332  *      pRetCerts - pointer to pointer to list of certs, with the first being | 
 |  333  *                  the client cert, and any following being used for chain | 
 |  334  *                  building | 
 |  335  *      pRetKey - pointer to native key pointer, for return of key | 
 |  336  *          - Windows: pointer to HCRYPTPROV | 
 |  337  *          - Mac OS X: pointer to SecKeyRef | 
 |  338  */ | 
 |  339 typedef SECStatus (PR_CALLBACK *SSLGetPlatformClientAuthData)(void *arg, | 
 |  340                                 PRFileDesc *fd, | 
 |  341                                 CERTDistNames *caNames, | 
 |  342                                 CERTCertList **pRetCerts,/*return */ | 
 |  343                                 void **pRetKey);/* return */ | 
 |  344  | 
 |  345 /* | 
 |  346  * Set the client side callback for SSL to retrieve user's private key | 
 |  347  * and certificate. | 
 |  348  *      fd - the file descriptor for the connection in question | 
 |  349  *      f - the application's callback that delivers the key and cert | 
 |  350  *      a - application specific data | 
 |  351  */ | 
 |  352 SSL_IMPORT SECStatus | 
 |  353 SSL_GetPlatformClientAuthDataHook(PRFileDesc *fd, | 
 |  354                                   SSLGetPlatformClientAuthData f, void *a); | 
|  326  |  355  | 
|  327 /* |  356 /* | 
|  328 ** SNI extension processing callback function. |  357 ** SNI extension processing callback function. | 
|  329 ** It is called when SSL socket receives SNI extension in ClientHello message. |  358 ** It is called when SSL socket receives SNI extension in ClientHello message. | 
|  330 ** Upon this callback invocation, application is responsible to reconfigure the |  359 ** Upon this callback invocation, application is responsible to reconfigure the | 
|  331 ** socket with the data for a particular server name. |  360 ** socket with the data for a particular server name. | 
|  332 ** There are three potential outcomes of this function invocation: |  361 ** There are three potential outcomes of this function invocation: | 
|  333 **    * application does not recognize the name or the type and wants the |  362 **    * application does not recognize the name or the type and wants the | 
|  334 **    "unrecognized_name" alert be sent to the client. In this case the callback |  363 **    "unrecognized_name" alert be sent to the client. In this case the callback | 
|  335 **    function must return SSL_SNI_SEND_ALERT status. |  364 **    function must return SSL_SNI_SEND_ALERT status. | 
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  701 ** Did the handshake with the peer negotiate the given extension? |  730 ** Did the handshake with the peer negotiate the given extension? | 
|  702 ** Output parameter valid only if function returns SECSuccess |  731 ** Output parameter valid only if function returns SECSuccess | 
|  703 */ |  732 */ | 
|  704 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, |  733 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, | 
|  705                                                       SSLExtensionType extId, |  734                                                       SSLExtensionType extId, | 
|  706                                                       PRBool *yes); |  735                                                       PRBool *yes); | 
|  707  |  736  | 
|  708 SEC_END_PROTOS |  737 SEC_END_PROTOS | 
|  709  |  738  | 
|  710 #endif /* __ssl_h_ */ |  739 #endif /* __ssl_h_ */ | 
| OLD | NEW |