diff -Naur sqlcipher-3.4.2/src/crypto_openssl.c sqlcipher-3.4.2_patched/src/crypto_openssl.c --- sqlcipher-3.4.2/src/crypto_openssl.c 2017-12-21 22:31:28.000000000 +0300 +++ sqlcipher-3.4.2_patched/src/crypto_openssl.c 2018-03-19 15:31:31.675017876 +0300 @@ -47,29 +47,6 @@ static unsigned int openssl_init_count = 0; static sqlite3_mutex* openssl_rand_mutex = NULL; -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -static HMAC_CTX *HMAC_CTX_new(void) -{ - HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx)); - if (ctx != NULL) { - HMAC_CTX_init(ctx); - } - return ctx; -} - -// Per 1.1.0 (https://wiki.openssl.org/index.php/1.1_API_Changes) -// HMAC_CTX_free should call HMAC_CTX_cleanup, then EVP_MD_CTX_Cleanup. -// HMAC_CTX_cleanup internally calls EVP_MD_CTX_cleanup so these -// calls are not needed. -static void HMAC_CTX_free(HMAC_CTX *ctx) -{ - if (ctx != NULL) { - HMAC_CTX_cleanup(ctx); - OPENSSL_free(ctx); - } -} -#endif - static int sqlcipher_openssl_add_random(void *ctx, void *buffer, int length) { #ifndef SQLCIPHER_OPENSSL_NO_MUTEX_RAND CODEC_TRACE_MUTEX("sqlcipher_openssl_add_random: entering openssl_rand_mutex %p\n", openssl_rand_mutex);