diff --git a/README.md b/README.md index d108dcc0..7bb9f39e 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 | [`00b92f42b69af29a820b46049fd00be9cd3fb7d4`](https://github.com/libevent/libevent/commit/00b92f42b69af29a820b46049fd00be9cd3fb7d4) | -| openssl | 1.1.1-stable | [`f9398cc2b31858ddaaea3f5cfec2fce7f9b90347`](https://github.com/openssl/openssl/commit/f9398cc2b31858ddaaea3f5cfec2fce7f9b90347) | +| openssl | 1.1.1-stable | [`b402f00ee26157ad4e7e6e52f3a736743e3de46f`](https://github.com/openssl/openssl/commit/b402f00ee26157ad4e7e6e52f3a736743e3de46f) | | tor | 0.3.5.14-dev | [`1693b6151e1369ce0938761cac95e7a0a524f5f3`](https://gitweb.torproject.org/tor.git/commit/?id=1693b6151e1369ce0938761cac95e7a0a524f5f3) | The library is currently supported on: diff --git a/darwin/openssl/crypto/rand/rand_lib.c b/darwin/openssl/crypto/rand/rand_lib.c index ba3a29e5..46e83d07 100644 --- a/darwin/openssl/crypto/rand/rand_lib.c +++ b/darwin/openssl/crypto/rand/rand_lib.c @@ -432,9 +432,13 @@ int RAND_poll(void) RAND_POOL *rand_pool_new(int entropy_requested, int secure, size_t min_len, size_t max_len) { - RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool)); + RAND_POOL *pool; size_t min_alloc_size = RAND_POOL_MIN_ALLOCATION(secure); + if (!RUN_ONCE(&rand_init, do_rand_init)) + return NULL; + + pool = OPENSSL_zalloc(sizeof(*pool)); if (pool == NULL) { RANDerr(RAND_F_RAND_POOL_NEW, ERR_R_MALLOC_FAILURE); return NULL; diff --git a/linux/openssl/crypto/rand/rand_lib.c b/linux/openssl/crypto/rand/rand_lib.c index ba3a29e5..46e83d07 100644 --- a/linux/openssl/crypto/rand/rand_lib.c +++ b/linux/openssl/crypto/rand/rand_lib.c @@ -432,9 +432,13 @@ int RAND_poll(void) RAND_POOL *rand_pool_new(int entropy_requested, int secure, size_t min_len, size_t max_len) { - RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool)); + RAND_POOL *pool; size_t min_alloc_size = RAND_POOL_MIN_ALLOCATION(secure); + if (!RUN_ONCE(&rand_init, do_rand_init)) + return NULL; + + pool = OPENSSL_zalloc(sizeof(*pool)); if (pool == NULL) { RANDerr(RAND_F_RAND_POOL_NEW, ERR_R_MALLOC_FAILURE); return NULL; diff --git a/lock.json b/lock.json index 01b17c52..d3c9885e 100644 --- a/lock.json +++ b/lock.json @@ -1 +1 @@ -{"zlib":"cacf7f1d4e3d44d871b605da3b647f07d718623f","libevent":"00b92f42b69af29a820b46049fd00be9cd3fb7d4","openssl":"f9398cc2b31858ddaaea3f5cfec2fce7f9b90347","tor":"1693b6151e1369ce0938761cac95e7a0a524f5f3"} \ No newline at end of file +{"zlib":"cacf7f1d4e3d44d871b605da3b647f07d718623f","libevent":"00b92f42b69af29a820b46049fd00be9cd3fb7d4","openssl":"b402f00ee26157ad4e7e6e52f3a736743e3de46f","tor":"1693b6151e1369ce0938761cac95e7a0a524f5f3"} \ No newline at end of file diff --git a/openssl_config/buildinf.macos64.h b/openssl_config/buildinf.macos64.h index dfe63fdf..550e5759 100644 --- a/openssl_config/buildinf.macos64.h +++ b/openssl_config/buildinf.macos64.h @@ -11,7 +11,7 @@ */ #define PLATFORM "platform: darwin64-x86_64-cc" -#define DATE "built on: Thu Mar 18 21:25:10 2021 +1000" +#define DATE "built on: Sat Mar 20 10:26:00 2021 +1000" /* * Generate compiler_flags as an array of individual characters. This is a diff --git a/openssl_config/buildinf.x64.h b/openssl_config/buildinf.x64.h index f3f6d337..80a951fd 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 Mar 18 21:25:10 2021 +1000" +#define DATE "built on: Sat Mar 20 10:26:00 2021 +1000" /* * 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 ef31f3d3..ff2f1cb1 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 Mar 18 21:25:10 2021 +1000" +#define DATE "built on: Sat Mar 20 10:26:00 2021 +1000" /* * Generate compiler_flags as an array of individual characters. This is a