summaryrefslogtreecommitdiff
path: root/bufferevent_openssl.c
diff options
context:
space:
mode:
authorWilliam Marlow <william.marlow@ibm.com>2022-06-18 21:43:31 +0100
committerAzat Khuzhin <azat@libevent.org>2022-07-09 23:24:53 +0300
commit29c420c418aeb497e5e8b7abd45dee39194ca5fc (patch)
treef2858d903feacf8b5c6322c213ed4ffaaea8090e /bufferevent_openssl.c
parent20977eae0d67f3b4f02aca2b891391517749b121 (diff)
downloadlibevent-29c420c418aeb497e5e8b7abd45dee39194ca5fc.tar.gz
Initial OpenSSL 3.0 support
* Don't use deprecated functions when building against OpenSSL 3.0. * Recognise that OpenSSL 3.0 can signal a dirty shutdown as a protocol. error in addition to the expected IO error produced by OpenSSL 1.1.1 * Update regress_mbedtls.c for compatibility with OpenSSL 3
Diffstat (limited to 'bufferevent_openssl.c')
-rw-r--r--bufferevent_openssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index 6ace1e3a..1e851749 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -259,7 +259,9 @@ conn_closed(struct bufferevent_ssl *bev_ssl, int when, int errcode, int ret)
bufferevent_ssl_put_error(bev_ssl, errcode);
break;
case SSL_ERROR_SSL:
- /* Protocol error. */
+ /* Protocol error; possibly a dirty shutdown. */
+ if (ret == 0 && SSL_is_init_finished(bev_ssl->ssl) == 0)
+ dirty_shutdown = 1;
bufferevent_ssl_put_error(bev_ssl, errcode);
break;
case SSL_ERROR_WANT_X509_LOOKUP: