| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 /* Macro to tell which ciphers in table are SSL2 vs SSL3/TLS. */ | 73 /* Macro to tell which ciphers in table are SSL2 vs SSL3/TLS. */ |
| 74 #define SSL_IS_SSL2_CIPHER(which) (((which) & 0xfff0) == 0xff00) | 74 #define SSL_IS_SSL2_CIPHER(which) (((which) & 0xfff0) == 0xff00) |
| 75 | 75 |
| 76 /* | 76 /* |
| 77 ** Imports fd into SSL, returning a new socket. Copies SSL configuration | 77 ** Imports fd into SSL, returning a new socket. Copies SSL configuration |
| 78 ** from model. | 78 ** from model. |
| 79 */ | 79 */ |
| 80 SSL_IMPORT PRFileDesc *SSL_ImportFD(PRFileDesc *model, PRFileDesc *fd); | 80 SSL_IMPORT PRFileDesc *SSL_ImportFD(PRFileDesc *model, PRFileDesc *fd); |
| 81 | 81 |
| 82 /* | 82 /* |
| 83 ** Imports fd into DTLS, returning a new socket. Copies DTLS configuration |
| 84 ** from model. |
| 85 */ |
| 86 SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd); |
| 87 |
| 88 /* |
| 83 ** Enable/disable an ssl mode | 89 ** Enable/disable an ssl mode |
| 84 ** | 90 ** |
| 85 ** SSL_SECURITY: | 91 ** SSL_SECURITY: |
| 86 ** enable/disable use of SSL security protocol before connect | 92 ** enable/disable use of SSL security protocol before connect |
| 87 ** | 93 ** |
| 88 ** SSL_SOCKS: | 94 ** SSL_SOCKS: |
| 89 ** enable/disable use of socks before connect | 95 ** enable/disable use of socks before connect |
| 90 ** (No longer supported). | 96 ** (No longer supported). |
| 91 ** | 97 ** |
| 92 ** SSL_REQUEST_CERTIFICATE: | 98 ** SSL_REQUEST_CERTIFICATE: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 * application_data records. Also, we only split application_data records and | 187 * application_data records. Also, we only split application_data records and |
| 182 * not other types of records, because some implementations will not accept | 188 * not other types of records, because some implementations will not accept |
| 183 * fragmented records of some other types (e.g. some versions of NSS do not | 189 * fragmented records of some other types (e.g. some versions of NSS do not |
| 184 * accept fragmented alerts). | 190 * accept fragmented alerts). |
| 185 */ | 191 */ |
| 186 #define SSL_CBC_RANDOM_IV 23 | 192 #define SSL_CBC_RANDOM_IV 23 |
| 187 #define SSL_ENABLE_OCSP_STAPLING 24 /* Request OCSP stapling (client) */ | 193 #define SSL_ENABLE_OCSP_STAPLING 24 /* Request OCSP stapling (client) */ |
| 188 #define SSL_ENABLE_OB_CERTS 25 /* Enable origin bound certs. */ | 194 #define SSL_ENABLE_OB_CERTS 25 /* Enable origin bound certs. */ |
| 189 #define SSL_ENCRYPT_CLIENT_CERTS 26 /* Enable encrypted client certs. */ | 195 #define SSL_ENCRYPT_CLIENT_CERTS 26 /* Enable encrypted client certs. */ |
| 190 | 196 |
| 197 |
| 191 #ifdef SSL_DEPRECATED_FUNCTION | 198 #ifdef SSL_DEPRECATED_FUNCTION |
| 192 /* Old deprecated function names */ | 199 /* Old deprecated function names */ |
| 193 SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on); | 200 SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on); |
| 194 SSL_IMPORT SECStatus SSL_EnableDefault(int option, PRBool on); | 201 SSL_IMPORT SECStatus SSL_EnableDefault(int option, PRBool on); |
| 195 #endif | 202 #endif |
| 196 | 203 |
| 197 /* New function names */ | 204 /* New function names */ |
| 198 SSL_IMPORT SECStatus SSL_OptionSet(PRFileDesc *fd, PRInt32 option, PRBool on); | 205 SSL_IMPORT SECStatus SSL_OptionSet(PRFileDesc *fd, PRInt32 option, PRBool on); |
| 199 SSL_IMPORT SECStatus SSL_OptionGet(PRFileDesc *fd, PRInt32 option, PRBool *on); | 206 SSL_IMPORT SECStatus SSL_OptionGet(PRFileDesc *fd, PRInt32 option, PRBool *on); |
| 200 SSL_IMPORT SECStatus SSL_OptionSetDefault(PRInt32 option, PRBool on); | 207 SSL_IMPORT SECStatus SSL_OptionSetDefault(PRInt32 option, PRBool on); |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 ** Did the handshake with the peer negotiate the given extension? | 941 ** Did the handshake with the peer negotiate the given extension? |
| 935 ** Output parameter valid only if function returns SECSuccess | 942 ** Output parameter valid only if function returns SECSuccess |
| 936 */ | 943 */ |
| 937 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, | 944 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, |
| 938 SSLExtensionType extId, | 945 SSLExtensionType extId, |
| 939 PRBool *yes); | 946 PRBool *yes); |
| 940 | 947 |
| 941 SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, | 948 SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, |
| 942 PRBool *last_handshake_resumed)
; | 949 PRBool *last_handshake_resumed)
; |
| 943 | 950 |
| 951 |
| 952 /* |
| 953 ** How long should we wait before retransmitting the next flight of |
| 954 ** the DTLS handshake? Returns SECFailure if not DTLS or not |
| 955 ** in a handshake. |
| 956 */ |
| 957 SSL_IMPORT SECStatus DTLS_GetTimeout(PRFileDesc *socket, PRIntervalTime *timeout
); |
| 958 |
| 944 /* | 959 /* |
| 945 * Return a boolean that indicates whether the underlying library | 960 * Return a boolean that indicates whether the underlying library |
| 946 * will perform as the caller expects. | 961 * will perform as the caller expects. |
| 947 * | 962 * |
| 948 * The only argument is a string, which should be the version | 963 * The only argument is a string, which should be the version |
| 949 * identifier of the NSS library. That string will be compared | 964 * identifier of the NSS library. That string will be compared |
| 950 * against a string that represents the actual build version of | 965 * against a string that represents the actual build version of |
| 951 * the SSL library. It also invokes the version checking functions | 966 * the SSL library. It also invokes the version checking functions |
| 952 * of the dependent libraries such as NSPR. | 967 * of the dependent libraries such as NSPR. |
| 953 */ | 968 */ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 * should continue using the connection. If the application passes a non-zero | 1032 * should continue using the connection. If the application passes a non-zero |
| 1018 * value for second argument (error), or if SSL_AuthCertificateComplete returns | 1033 * value for second argument (error), or if SSL_AuthCertificateComplete returns |
| 1019 * anything other than SECSuccess, then the application should close the | 1034 * anything other than SECSuccess, then the application should close the |
| 1020 * connection. | 1035 * connection. |
| 1021 */ | 1036 */ |
| 1022 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, | 1037 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, |
| 1023 PRErrorCode error); | 1038 PRErrorCode error); |
| 1024 SEC_END_PROTOS | 1039 SEC_END_PROTOS |
| 1025 | 1040 |
| 1026 #endif /* __ssl_h_ */ | 1041 #endif /* __ssl_h_ */ |
| OLD | NEW |