| 1640 | } |
| 1641 | |
| 1642 | void |
| 1643 | SSLNetVConnection::reenable(int event) |
| 1644 | { |
| 1645 | Dbg(dbg_ctl_ssl, "Handshake reenable from state=%s", |
| 1646 | TLSEventSupport::get_ssl_handshake_hook_state_name(this->get_handshake_hook_state())); |
| 1647 | |
| 1648 | // Mark as error to stop the Handshake |
| 1649 | if (event == TS_EVENT_ERROR) { |
| 1650 | sslHandshakeStatus = SSLHandshakeStatus::SSL_HANDSHAKE_ERROR; |
| 1651 | } |
| 1652 | |
| 1653 | this->resume_tls_event(); |
| 1654 | |
| 1655 | // Reenabling from the handshake callback |
| 1656 | // |
| 1657 | // Originally, we would wait for the callback to go again to execute additional |
| 1658 | // hooks, but since the callbacks are associated with the context and the context |
| 1659 | // can be replaced by the plugin, it didn't seem reasonable to assume that the |
| 1660 | // callback would be executed again. So we walk through the rest of the hooks |
| 1661 | // here in the reenable. |
| 1662 | if (this->invoke_tls_event() == 2) { |
| 1663 | this->write.triggered = true; |
| 1664 | this->write.enabled = true; |
| 1665 | this->writeReschedule(nh); |
| 1666 | } |
| 1667 | |
| 1668 | this->readReschedule(nh); |
| 1669 | } |
| 1670 | |
| 1671 | Continuation * |
| 1672 | SSLNetVConnection::getContinuationForTLSEvents() |