pk.type = EVP_PKEY_DSA;
pk.pkey.dsa = dsa;
- if (!fips_pkey_signature_test(&pk, tbs, -1,
- NULL, 0, EVP_sha1(), 0, NULL))
+ if (!fips_pkey_signature_test(&pk, tbs, -1, NULL, 0, NULL, 0, NULL))
{
FIPSerr(FIPS_F_FIPS_CHECK_DSA,FIPS_R_PAIRWISE_TEST_FAILED);
fips_set_selftest_fail();
/* Perform pairwise consistency signature test */
if (!fips_pkey_signature_test(&pk, tbs, -1,
- NULL, 0, EVP_sha1(), RSA_PKCS1_PADDING, NULL)
+ NULL, 0, NULL, RSA_PKCS1_PADDING, NULL)
|| !fips_pkey_signature_test(&pk, tbs, -1,
- NULL, 0, EVP_sha1(), RSA_X931_PADDING, NULL)
+ NULL, 0, NULL, RSA_X931_PADDING, NULL)
|| !fips_pkey_signature_test(&pk, tbs, -1,
- NULL, 0, EVP_sha1(), RSA_PKCS1_PSS_PADDING, NULL))
+ NULL, 0, NULL, RSA_PKCS1_PSS_PADDING, NULL))
goto err;
/* Now perform pairwise consistency encrypt/decrypt test */
ctbuf = OPENSSL_malloc(RSA_size(rsa));
if (tbslen == -1)
tbslen = strlen((char *)tbs);
+ if (digest == NULL)
+ digest = EVP_sha256();
+
if (!FIPS_digestinit(&mctx, digest))
goto error;
if (!FIPS_digestupdate(&mctx, tbs, tbslen))