diff options
author | Pauli <ppzgs1@gmail.com> | 2021-02-25 13:51:03 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-02-28 17:25:49 +1000 |
commit | fbff75caaab25f028718990b716341a4de672954 (patch) | |
tree | d48f58587e1e79613994e3aa7176b2a353f579f7 /providers/fips | |
parent | b58e1f74905fe0a51f00cd0c2d8e9a9b0469326b (diff) |
fips: update to use the extra MAC init arguments
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)
Diffstat (limited to 'providers/fips')
-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) { |