diff options
author | Pauli <paul.dale@oracle.com> | 2020-06-09 08:53:05 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-06-11 11:16:37 +1000 |
commit | d9c2fd51e2e278bc3f7793a104ff7b4879f6d63a (patch) | |
tree | 222cd0cb2c3f7ef9d0e61c5b5d50ecfd3be5ba31 /test/bad_dtls_test.c | |
parent | 765d04c9460a304c8119f57941341a149498b9db (diff) |
The EVP_MAC functions have been renamed for consistency. The EVP_MAC_CTX_*
functions are now EVP_MAC functions, usually with ctx in their names.
Before 3.0 is released, the names are mutable and this prevents more
inconsistencies being introduced.
There are no functional or code changes.
Just the renaming and a little reformatting.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11997)
Diffstat (limited to 'test/bad_dtls_test.c')
-rw-r--r-- | test/bad_dtls_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c index bfbaa7953a..d2d6a6b426 100644 --- a/test/bad_dtls_test.c +++ b/test/bad_dtls_test.c @@ -305,14 +305,14 @@ static int send_record(BIO *rbio, unsigned char type, uint64_t seqnr, /* Append HMAC to data */ hmac = EVP_MAC_fetch(NULL, "HMAC", NULL); - ctx = EVP_MAC_CTX_new(hmac); + ctx = EVP_MAC_new_ctx(hmac); EVP_MAC_free(hmac); params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST, "SHA1", 0); params[1] = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, mac_key, 20); params[2] = OSSL_PARAM_construct_end(); - EVP_MAC_CTX_set_params(ctx, params); + EVP_MAC_set_ctx_params(ctx, params); EVP_MAC_init(ctx); EVP_MAC_update(ctx, epoch, 2); EVP_MAC_update(ctx, seq, 6); @@ -323,7 +323,7 @@ static int send_record(BIO *rbio, unsigned char type, uint64_t seqnr, EVP_MAC_update(ctx, lenbytes, 2); /* Length */ EVP_MAC_update(ctx, enc, len); /* Finally the data itself */ EVP_MAC_final(ctx, enc + len, NULL, SHA_DIGEST_LENGTH); - EVP_MAC_CTX_free(ctx); + EVP_MAC_free_ctx(ctx); /* Append padding bytes */ len += SHA_DIGEST_LENGTH; |