diff options
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index f14eab18a5..c6b11e9a6e 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -829,6 +829,9 @@ tor_tls_new(int sock, int isServer) if (!SSL_set_cipher_list(result->ssl, isServer ? SERVER_CIPHER_LIST : CLIENT_CIPHER_LIST)) { tls_log_errors(NULL, LOG_WARN, "setting ciphers"); +#ifdef SSL_set_tlsext_host_name + SSL_set_tlsext_host_name(result->ssl, NULL); +#endif SSL_free(result->ssl); tor_free(result); return NULL; @@ -839,6 +842,9 @@ tor_tls_new(int sock, int isServer) bio = BIO_new_socket(sock, BIO_NOCLOSE); if (! bio) { tls_log_errors(NULL, LOG_WARN, "opening BIO"); +#ifdef SSL_set_tlsext_host_name + SSL_set_tlsext_host_name(result->ssl, NULL); +#endif SSL_free(result->ssl); tor_free(result); return NULL; @@ -919,6 +925,9 @@ tor_tls_free(tor_tls_t *tls) if (!removed) { log_warn(LD_BUG, "Freeing a TLS that was not in the ssl->tls map."); } +#ifdef SSL_set_tlsext_host_name + SSL_set_tlsext_host_name(tls->ssl, NULL); +#endif SSL_free(tls->ssl); tls->ssl = NULL; tls->negotiated_callback = NULL; @@ -1443,8 +1452,8 @@ tor_tls_used_v1_handshake(tor_tls_t *tls) * buffer and *<b>wbuf_bytes</b> to the amount actually used. */ void tor_tls_get_buffer_sizes(tor_tls_t *tls, - int *rbuf_capacity, int *rbuf_bytes, - int *wbuf_capacity, int *wbuf_bytes) + size_t *rbuf_capacity, size_t *rbuf_bytes, + size_t *wbuf_capacity, size_t *wbuf_bytes) { if (tls->ssl->s3->rbuf.buf) *rbuf_capacity = tls->ssl->s3->rbuf.len; |