diff options
-rw-r--r-- | bufferevent_mbedtls.c | 1 | ||||
-rw-r--r-- | bufferevent_openssl.c | 13 | ||||
-rw-r--r-- | bufferevent_ssl.c | 1 | ||||
-rw-r--r-- | ssl-compat.h | 1 |
4 files changed, 4 insertions, 12 deletions
diff --git a/bufferevent_mbedtls.c b/bufferevent_mbedtls.c index f1422019..c60b109c 100644 --- a/bufferevent_mbedtls.c +++ b/bufferevent_mbedtls.c @@ -313,7 +313,6 @@ static struct le_ssl_ops le_mbedtls_ops = { mbedtls_is_want_write, be_mbedtls_get_fd, be_mbedtls_bio_set_fd, - mbedtls_set_ssl_noops, (void (*)(struct bufferevent_ssl *))mbedtls_set_ssl_noops, (void (*)(struct bufferevent_ssl *))mbedtls_set_ssl_noops, conn_closed, diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index a88ae891..c50c022d 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -322,6 +322,10 @@ decrement_buckets(struct bufferevent_ssl *bev_ssl) static void * SSL_init(void *ssl) { + /* Don't explode if we decide to realloc a chunk we're writing from in + * the output buffer. */ + SSL_set_mode(ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); + return ssl; } @@ -350,14 +354,6 @@ SSL_is_want_write(int err) return err == SSL_ERROR_WANT_WRITE; } -static void -be_openssl_post_init(void *ssl) -{ - /* Don't explode if we decide to realloc a chunk we're writing from in - * the output buffer. */ - SSL_set_mode(ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); -} - static int openssl_read(void *ssl, unsigned char *buf, size_t len) { @@ -415,7 +411,6 @@ static struct le_ssl_ops le_openssl_ops = { SSL_is_want_write, (int (*)(void *))be_openssl_get_fd, be_openssl_bio_set_fd, - be_openssl_post_init, init_bio_counts, decrement_buckets, conn_closed, diff --git a/bufferevent_ssl.c b/bufferevent_ssl.c index be503819..5c6956d5 100644 --- a/bufferevent_ssl.c +++ b/bufferevent_ssl.c @@ -1007,7 +1007,6 @@ bufferevent_ssl_new_impl(struct event_base *base, bev_ssl->ssl_ops = ssl_ops; bev_ssl->ssl = bev_ssl->ssl_ops->init(ssl); - bev_ssl->ssl_ops->post_init(ssl); bev_ssl->underlying = underlying; diff --git a/ssl-compat.h b/ssl-compat.h index ee88b624..a19c457f 100644 --- a/ssl-compat.h +++ b/ssl-compat.h @@ -25,7 +25,6 @@ struct le_ssl_ops { int (*err_is_want_write)(int err); evutil_socket_t (*get_fd)(void *ssl); int (*bio_set_fd)(struct bufferevent_ssl *ssl, evutil_socket_t fd); - void (*post_init)(void *ssl); void (*init_bio_counts)(struct bufferevent_ssl *bev); void (*decrement_buckets)(struct bufferevent_ssl *bev); void (*conn_closed)( |