OLD | NEW |
1 /* | 1 /* |
2 * vtables (and methods that call through them) for the 4 types of | 2 * vtables (and methods that call through them) for the 4 types of |
3 * SSLSockets supported. Only one type is still supported. | 3 * SSLSockets supported. Only one type is still supported. |
4 * Various other functions. | 4 * Various other functions. |
5 * | 5 * |
6 * This Source Code Form is subject to the terms of the Mozilla Public | 6 * This Source Code Form is subject to the terms of the Mozilla Public |
7 * License, v. 2.0. If a copy of the MPL was not distributed with this | 7 * License, v. 2.0. If a copy of the MPL was not distributed with this |
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
9 #include "seccomon.h" | 9 #include "seccomon.h" |
10 #include "cert.h" | 10 #include "cert.h" |
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 return SECFailure; | 1322 return SECFailure; |
1323 } | 1323 } |
1324 if (SSL_IS_SSL2_CIPHER(which)) { | 1324 if (SSL_IS_SSL2_CIPHER(which)) { |
1325 rv = ssl2_CipherPrefSet(ss, which, enabled); | 1325 rv = ssl2_CipherPrefSet(ss, which, enabled); |
1326 } else { | 1326 } else { |
1327 rv = ssl3_CipherPrefSet(ss, (ssl3CipherSuite)which, enabled); | 1327 rv = ssl3_CipherPrefSet(ss, (ssl3CipherSuite)which, enabled); |
1328 } | 1328 } |
1329 return rv; | 1329 return rv; |
1330 } | 1330 } |
1331 | 1331 |
| 1332 SECStatus |
| 1333 SSL_CipherOrderSet(PRFileDesc *fd, const PRUint16 *ciphers, unsigned int len) |
| 1334 { |
| 1335 sslSocket *ss = ssl_FindSocket(fd); |
| 1336 |
| 1337 if (!ss) { |
| 1338 SSL_DBG(("%d: SSL[%d]: bad socket in CipherOrderSet", SSL_GETPID(), |
| 1339 fd)); |
| 1340 return SECFailure; |
| 1341 } |
| 1342 return ssl3_CipherOrderSet(ss, ciphers, len); |
| 1343 } |
| 1344 |
1332 SECStatus | 1345 SECStatus |
1333 SSL_CipherPrefGet(PRFileDesc *fd, PRInt32 which, PRBool *enabled) | 1346 SSL_CipherPrefGet(PRFileDesc *fd, PRInt32 which, PRBool *enabled) |
1334 { | 1347 { |
1335 SECStatus rv; | 1348 SECStatus rv; |
1336 sslSocket *ss = ssl_FindSocket(fd); | 1349 sslSocket *ss = ssl_FindSocket(fd); |
1337 | 1350 |
1338 if (!enabled) { | 1351 if (!enabled) { |
1339 PORT_SetError(SEC_ERROR_INVALID_ARGS); | 1352 PORT_SetError(SEC_ERROR_INVALID_ARGS); |
1340 return SECFailure; | 1353 return SECFailure; |
1341 } | 1354 } |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3127 loser: | 3140 loser: |
3128 ssl_DestroySocketContents(ss); | 3141 ssl_DestroySocketContents(ss); |
3129 ssl_DestroyLocks(ss); | 3142 ssl_DestroyLocks(ss); |
3130 PORT_Free(ss); | 3143 PORT_Free(ss); |
3131 ss = NULL; | 3144 ss = NULL; |
3132 } | 3145 } |
3133 } | 3146 } |
3134 return ss; | 3147 return ss; |
3135 } | 3148 } |
3136 | 3149 |
OLD | NEW |