From 5803c739af12e91f0f3b657bb93cb720f3d1a651 Mon Sep 17 00:00:00 2001 From: Pter Szilgyi Date: Sat, 9 Jan 2021 04:30:16 +0000 Subject: [PATCH] Updated libtor dependencies --- README.md | 2 +- openssl/ssl/d1_lib.c | 9 +++++---- openssl/ssl/record/rec_layer_d1.c | 3 +++ openssl/ssl/statem/extensions.c | 3 ++- openssl_config/buildinf.x64.h | 2 +- openssl_config/buildinf.x86.h | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bb9d754f..2ca65c0e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The `go-libtor` project is a self-contained, fully statically linked Tor library |:--------:|:-------:|:------:| | zlib | 1.2.11 | [`cacf7f1d4e3d44d871b605da3b647f07d718623f`](https://github.com/madler/zlib/commit/cacf7f1d4e3d44d871b605da3b647f07d718623f) | | libevent | 2.2.0-alpha-dev | [`c5e4391b86ab0198c9878620d566a66043bd1f43`](https://github.com/libevent/libevent/commit/c5e4391b86ab0198c9878620d566a66043bd1f43) | -| openssl | 1.1.1-stable | [`a953f26dba5dadf8ac69c6fcbf71ebe3efba9407`](https://github.com/openssl/openssl/commit/a953f26dba5dadf8ac69c6fcbf71ebe3efba9407) | +| openssl | 1.1.1-stable | [`212d7118a788e332dae4123d40f65ea6e24044d2`](https://github.com/openssl/openssl/commit/212d7118a788e332dae4123d40f65ea6e24044d2) | | tor | 0.3.5.12-dev | [`6cd23b29d262da3ecd07208804804d66550a6c9a`](https://gitweb.torproject.org/tor.git/commit/?id=6cd23b29d262da3ecd07208804804d66550a6c9a) | The library is currently supported on: diff --git a/openssl/ssl/d1_lib.c b/openssl/ssl/d1_lib.c index 2a15ee8a..8874bed3 100644 --- a/openssl/ssl/d1_lib.c +++ b/openssl/ssl/d1_lib.c @@ -142,10 +142,11 @@ void dtls1_free(SSL *s) ssl3_free(s); - dtls1_clear_queues(s); - - pqueue_free(s->d1->buffered_messages); - pqueue_free(s->d1->sent_messages); + if (s->d1 != NULL) { + dtls1_clear_queues(s); + pqueue_free(s->d1->buffered_messages); + pqueue_free(s->d1->sent_messages); + } OPENSSL_free(s->d1); s->d1 = NULL; diff --git a/openssl/ssl/record/rec_layer_d1.c b/openssl/ssl/record/rec_layer_d1.c index e56c6b95..d0cb72d7 100644 --- a/openssl/ssl/record/rec_layer_d1.c +++ b/openssl/ssl/record/rec_layer_d1.c @@ -46,6 +46,9 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) void DTLS_RECORD_LAYER_free(RECORD_LAYER *rl) { + if (rl->d == NULL) + return; + DTLS_RECORD_LAYER_clear(rl); pqueue_free(rl->d->unprocessed_rcds.q); pqueue_free(rl->d->processed_rcds.q); diff --git a/openssl/ssl/statem/extensions.c b/openssl/ssl/statem/extensions.c index c785ab78..e24b1b0e 100644 --- a/openssl/ssl/statem/extensions.c +++ b/openssl/ssl/statem/extensions.c @@ -966,7 +966,8 @@ static int final_server_name(SSL *s, unsigned int context, int sent) * context, to avoid the confusing situation of having sess_accept_good * exceed sess_accept (zero) for the new context. */ - if (SSL_IS_FIRST_HANDSHAKE(s) && s->ctx != s->session_ctx) { + if (SSL_IS_FIRST_HANDSHAKE(s) && s->ctx != s->session_ctx + && s->hello_retry_request == SSL_HRR_NONE) { tsan_counter(&s->ctx->stats.sess_accept); tsan_decr(&s->session_ctx->stats.sess_accept); } diff --git a/openssl_config/buildinf.x64.h b/openssl_config/buildinf.x64.h index 851d1cf8..9a3ac5ec 100644 --- a/openssl_config/buildinf.x64.h +++ b/openssl_config/buildinf.x64.h @@ -11,7 +11,7 @@ */ #define PLATFORM "platform: linux-x86_64" -#define DATE "built on: Thu Jan 7 09:58:25 2021 +0100" +#define DATE "built on: Sat Jan 9 01:05:24 2021 +0200" /* * Generate compiler_flags as an array of individual characters. This is a diff --git a/openssl_config/buildinf.x86.h b/openssl_config/buildinf.x86.h index 9110d688..c4d6bd17 100644 --- a/openssl_config/buildinf.x86.h +++ b/openssl_config/buildinf.x86.h @@ -11,7 +11,7 @@ */ #define PLATFORM "platform: linux-x86" -#define DATE "built on: Thu Jan 7 09:58:25 2021 +0100" +#define DATE "built on: Sat Jan 9 01:05:24 2021 +0200" /* * Generate compiler_flags as an array of individual characters. This is a