2018-01-09 19:28:29 +01:00
|
|
|
PATCH-P1-SUSE: Fix running with our patched openssl
|
|
|
|
|
|
|
|
- Disable openssl compatibility checking
|
|
|
|
* the check uses CRYPTO_set_mem_functions() to set debugging
|
|
|
|
memory allocation function. The setting only succeeds if no allocation
|
|
|
|
was done before. Our fips self-tests, which are run from the library
|
|
|
|
constructor, however, do allocate memory, so the subsequent call to
|
|
|
|
CRYPTO_set_mem_functions causes the compatibility check to fail
|
|
|
|
|
|
|
|
Maintainer: Vitezslav Cizek <vcizek@suse.com>
|
|
|
|
|
|
|
|
Index: mariadb-10.2.10/mysys_ssl/openssl.c
|
|
|
|
===================================================================
|
|
|
|
--- mariadb-10.2.10.orig/mysys_ssl/openssl.c 2017-10-30 09:10:45.000000000 +0100
|
|
|
|
+++ mariadb-10.2.10/mysys_ssl/openssl.c 2017-11-29 13:43:20.022236791 +0100
|
|
|
|
@@ -47,26 +47,6 @@ static void *coc_malloc(size_t size, con
|
|
|
|
|
|
|
|
int check_openssl_compatibility()
|
|
|
|
{
|
|
|
|
- EVP_CIPHER_CTX *evp_ctx;
|
|
|
|
- EVP_MD_CTX *md5_ctx;
|
|
|
|
-
|
|
|
|
- if (!CRYPTO_set_mem_functions(coc_malloc, NULL, NULL))
|
2018-02-24 00:02:16 +01:00
|
|
|
- return 0;
|
2018-01-09 19:28:29 +01:00
|
|
|
-
|
|
|
|
- testing= 1;
|
|
|
|
- alloc_size= alloc_count= 0;
|
|
|
|
- evp_ctx= EVP_CIPHER_CTX_new();
|
|
|
|
- EVP_CIPHER_CTX_free(evp_ctx);
|
|
|
|
- if (alloc_count != 1 || !alloc_size || alloc_size > EVP_CIPHER_CTX_SIZE)
|
|
|
|
- return 1;
|
|
|
|
-
|
|
|
|
- alloc_size= alloc_count= 0;
|
|
|
|
- md5_ctx= EVP_MD_CTX_create();
|
|
|
|
- EVP_MD_CTX_destroy(md5_ctx);
|
|
|
|
- if (alloc_count != 1 || !alloc_size || alloc_size > EVP_MD_CTX_SIZE)
|
|
|
|
- return 1;
|
|
|
|
-
|
|
|
|
- testing= 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|