| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Various SSL functions. | 2 * Various 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 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 CERT_DestroyCertificateList(certChain); | 1528 CERT_DestroyCertificateList(certChain); |
| 1529 } | 1529 } |
| 1530 PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2); | 1530 PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2); |
| 1531 ret = SECFailure; | 1531 ret = SECFailure; |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 ssl_Release1stHandshakeLock(ss); /************************************/ | 1534 ssl_Release1stHandshakeLock(ss); /************************************/ |
| 1535 return ret; | 1535 return ret; |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 SECStatus |
| 1539 SSL_RestartHandshakeAfterChannelIDReq(PRFileDesc * fd, |
| 1540 SECKEYPublicKey * channelIDPub, |
| 1541 SECKEYPrivateKey *channelID) |
| 1542 { |
| 1543 sslSocket * ss = ssl_FindSocket(fd); |
| 1544 SECStatus ret; |
| 1545 |
| 1546 if (!ss) { |
| 1547 SSL_DBG(("%d: SSL[%d]: bad socket in" |
| 1548 " SSL_RestartHandshakeAfterChannelIDReq", |
| 1549 SSL_GETPID(), fd)); |
| 1550 goto loser; |
| 1551 } |
| 1552 |
| 1553 |
| 1554 ssl_Get1stHandshakeLock(ss); |
| 1555 |
| 1556 if (ss->version < SSL_LIBRARY_VERSION_3_0) { |
| 1557 PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2); |
| 1558 ssl_Release1stHandshakeLock(ss); |
| 1559 goto loser; |
| 1560 } |
| 1561 |
| 1562 ret = ssl3_RestartHandshakeAfterChannelIDReq(ss, channelIDPub, |
| 1563 channelID); |
| 1564 ssl_Release1stHandshakeLock(ss); |
| 1565 |
| 1566 return ret; |
| 1567 |
| 1568 loser: |
| 1569 SECKEY_DestroyPublicKey(channelIDPub); |
| 1570 SECKEY_DestroyPrivateKey(channelID); |
| 1571 return SECFailure; |
| 1572 } |
| 1573 |
| 1538 /* DO NOT USE. This function was exported in ssl.def with the wrong signature; | 1574 /* DO NOT USE. This function was exported in ssl.def with the wrong signature; |
| 1539 * this implementation exists to maintain link-time compatibility. | 1575 * this implementation exists to maintain link-time compatibility. |
| 1540 */ | 1576 */ |
| 1541 int | 1577 int |
| 1542 SSL_RestartHandshakeAfterServerCert(sslSocket * ss) | 1578 SSL_RestartHandshakeAfterServerCert(sslSocket * ss) |
| 1543 { | 1579 { |
| 1544 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); | 1580 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); |
| 1545 return -1; | 1581 return -1; |
| 1546 } | 1582 } |
| 1547 | 1583 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 if (!ss) { | 1622 if (!ss) { |
| 1587 SSL_DBG(("%d: SSL[%d]: bad socket in SNISocketConfigHook", | 1623 SSL_DBG(("%d: SSL[%d]: bad socket in SNISocketConfigHook", |
| 1588 SSL_GETPID(), fd)); | 1624 SSL_GETPID(), fd)); |
| 1589 return SECFailure; | 1625 return SECFailure; |
| 1590 } | 1626 } |
| 1591 | 1627 |
| 1592 ss->sniSocketConfig = func; | 1628 ss->sniSocketConfig = func; |
| 1593 ss->sniSocketConfigArg = arg; | 1629 ss->sniSocketConfigArg = arg; |
| 1594 return SECSuccess; | 1630 return SECSuccess; |
| 1595 } | 1631 } |
| OLD | NEW |