diff options
Diffstat (limited to 'providers')
-rw-r--r-- | providers/fips/self_test.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/providers/fips/self_test.c b/providers/fips/self_test.c index 1848686ae3..b20af1bd6c 100644 --- a/providers/fips/self_test.c +++ b/providers/fips/self_test.c @@ -171,7 +171,7 @@ static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_FUNC_BIO_read_ex_fn read_ex size_t bytes_read = 0, out_len = 0; EVP_MAC *mac = NULL; EVP_MAC_CTX *ctx = NULL; - OSSL_PARAM params[3], *p = params; + OSSL_PARAM params[2], *p = params; OSSL_SELF_TEST_onbegin(ev, event_type, OSSL_SELF_TEST_DESC_INTEGRITY_HMAC); @@ -183,12 +183,9 @@ static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_FUNC_BIO_read_ex_fn read_ex goto err; *p++ = OSSL_PARAM_construct_utf8_string("digest", DIGEST_NAME, 0); - *p++ = OSSL_PARAM_construct_octet_string("key", fixed_key, - sizeof(fixed_key)); *p = OSSL_PARAM_construct_end(); - if (EVP_MAC_CTX_set_params(ctx, params) <= 0 - || !EVP_MAC_init(ctx)) + if (!EVP_MAC_init(ctx, fixed_key, sizeof(fixed_key), params)) goto err; while (1) { |