aboutsummaryrefslogtreecommitdiff
path: root/src/conn.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-19 19:11:58 -0400
committerDeterminant <[email protected]>2019-06-19 19:11:58 -0400
commit4f41e23016dc316334e7d6cc8765bdf334b96f3e (patch)
tree560ad5144e9bc4d7193b0db1ffebb86aca1d0d68 /src/conn.cpp
parent8f42d0581a8e0cd77bde459db6b61fd957e19c1b (diff)
more openssl wrappers
Diffstat (limited to 'src/conn.cpp')
-rw-r--r--src/conn.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conn.cpp b/src/conn.cpp
index 3ec4284..60d5835 100644
--- a/src/conn.cpp
+++ b/src/conn.cpp
@@ -211,19 +211,21 @@ void ConnPool::Conn::_recv_data_tls(const ConnPool::conn_t &conn, int fd, int ev
conn->on_read();
}
-void ConnPool::Conn::_send_data_tls_handshake(const ConnPool::conn_t &conn, int fd, int events) {
+void ConnPool::Conn::_send_data_tls_handshake(const ConnPool::conn_t &conn, int, int) {
int ret;
if (conn->tls->do_handshake(ret))
{
+ /* finishing TLS handshake */
conn->send_data_func = _send_data_tls;
conn->recv_data_func = _recv_data_tls;
+ conn->peer_cert = new X509(conn->tls->get_peer_cert());
conn->cpool->update_conn(conn, true);
}
else
{
conn->ev_socket.del();
conn->ev_socket.add(ret == 0 ? FdEvent::READ : FdEvent::WRITE);
- SALTICIDAE_LOG_INFO("tls handshake %d", ret);
+ SALTICIDAE_LOG_DEBUG("tls handshake %s", ret == 0 ? "read" : "write");
}
}