Skip to content

Commit 4f320b6

Browse files
committed
thread safe eutex in activate_openssl
1 parent c0cf162 commit 4f320b6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/crypto.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ typedef struct {
7171
} codec_ctx;
7272

7373
static void activate_openssl() {
74+
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
7475
if(EVP_get_cipherbyname(CIPHER) == NULL) {
7576
OpenSSL_add_all_algorithms();
7677
}
78+
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
7779
}
7880

7981
/*

0 commit comments

Comments
 (0)