Commit 2980b0c3 authored by Sergei Golubchik's avatar Sergei Golubchik

fix crashes with openssl fips builds

Apparently openssl ignores CRYPTO_set_mem_functions() in fips mode,
so we cannot detect structure sizes. Don't freak out when
no mallocs were detected.
parent bde397b3
......@@ -56,13 +56,13 @@ int check_openssl_compatibility()
allocated_size= allocated_count= 0;
evp_ctx= EVP_CIPHER_CTX_new();
EVP_CIPHER_CTX_free(evp_ctx);
if (allocated_count != 1 || allocated_size > EVP_CIPHER_CTX_SIZE)
if (allocated_count > 1 || allocated_size > EVP_CIPHER_CTX_SIZE)
return 1;
allocated_size= allocated_count= 0;
md5_ctx= EVP_MD_CTX_create();
EVP_MD_CTX_destroy(md5_ctx);
if (allocated_count != 1 || allocated_size > EVP_MD_CTX_SIZE)
if (allocated_count > 1 || allocated_size > EVP_MD_CTX_SIZE)
return 1;
CRYPTO_set_mem_functions(CRYPTO_malloc, CRYPTO_realloc, CRYPTO_free);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment