File openssl-fips_fix_selftests_return_value.patch of Package openssl-1_1.14217
Index: openssl-1.1.0i/crypto/fips/fips_dsa_selftest.c
===================================================================
--- openssl-1.1.0i.orig/crypto/fips/fips_dsa_selftest.c 2020-01-18 16:33:48.783598012 +0100
+++ openssl-1.1.0i/crypto/fips/fips_dsa_selftest.c 2020-02-13 11:44:16.209341725 +0100
@@ -150,7 +150,7 @@ int FIPS_selftest_dsa()
{
DSA *dsa = NULL;
EVP_PKEY *pk = NULL;
- int ret = -1;
+ int ret = 0;
BIGNUM *p = NULL, *q = NULL, *g = NULL, *pub_key = NULL, *priv_key = NULL;
fips_load_key_component(p, dsa_test_2048);
Index: openssl-1.1.0i/crypto/fips/fips_ecdh_selftest.c
===================================================================
--- openssl-1.1.0i.orig/crypto/fips/fips_ecdh_selftest.c 2020-01-18 16:33:48.783598012 +0100
+++ openssl-1.1.0i/crypto/fips/fips_ecdh_selftest.c 2020-02-13 11:51:44.879966841 +0100
@@ -221,6 +221,9 @@ int FIPS_selftest_ecdh(void)
}
err:
+ if (rv == -1) {
+ rv = 0;
+ }
if (x)
BN_clear_free(x);