diff -up openssl-1.0.2k/crypto/rsa/rsa_gen.c.rsa-check openssl-1.0.2k/crypto/rsa/rsa_gen.c
--- openssl-1.0.2k/crypto/rsa/rsa_gen.c.rsa-check 2019-02-06 12:58:50.570844207 +0100
+++ openssl-1.0.2k/crypto/rsa/rsa_gen.c 2019-02-06 13:10:57.058468214 +0100
@@ -94,11 +94,11 @@ int fips_check_rsa(RSA *rsa)
/* Perform pairwise consistency signature test */
if (!fips_pkey_signature_test(pk, tbs, -1,
- NULL, 0, EVP_sha1(),
+ NULL, 0, EVP_sha256(),
EVP_MD_CTX_FLAG_PAD_PKCS1, NULL)
- || !fips_pkey_signature_test(pk, tbs, -1, NULL, 0, EVP_sha1(),
+ || !fips_pkey_signature_test(pk, tbs, -1, NULL, 0, EVP_sha256(),
EVP_MD_CTX_FLAG_PAD_X931, NULL)
- || !fips_pkey_signature_test(pk, tbs, -1, NULL, 0, EVP_sha1(),
+ || !fips_pkey_signature_test(pk, tbs, -1, NULL, 0, EVP_sha256(),
EVP_MD_CTX_FLAG_PAD_PSS, NULL))
goto err;
/* Now perform pairwise consistency encrypt/decrypt test */