From 44715517e869afed7fb32419aecd7410b4ab458c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 30 Jul 2009 20:40:40 +0000 Subject: [PATCH] Use SSL_do_handshake in place of SSL_connect/SSL_accept svn:r1393 --- bufferevent_openssl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index b856cacf..5347b03e 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -776,10 +776,8 @@ do_handshake(struct bufferevent_openssl *bev_ssl) assert(0); break; case BUFFEREVENT_SSL_CONNECTING: - r = SSL_connect(bev_ssl->ssl); - break; case BUFFEREVENT_SSL_ACCEPTING: - r = SSL_accept(bev_ssl->ssl); + r = SSL_do_handshake(bev_ssl->ssl); break; } @@ -1046,9 +1044,11 @@ bufferevent_openssl_new_impl(struct event_base *base, switch (state) { case BUFFEREVENT_SSL_ACCEPTING: + SSL_set_accept_state(bev_ssl->ssl); set_handshake_callbacks(bev_ssl, fd); break; case BUFFEREVENT_SSL_CONNECTING: + SSL_set_connect_state(bev_ssl->ssl); set_handshake_callbacks(bev_ssl, fd); break; case BUFFEREVENT_SSL_OPEN: -- 2.40.0