diff options
author | Richard Levitte <levitte@openssl.org> | 2018-10-24 21:40:00 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-10-30 05:34:50 +0100 |
commit | b8d77c9bd675b4128aeeafb4a738938460477a2e (patch) | |
tree | 853e3dda7e62a04095bbd43ad596322ef03d6665 /crypto/cmac | |
parent | e74a435f58441c6f1f6b4558c762e17d0ab67b7f (diff) |
Adapt other EVP code to use EVP_MAC instead of direct implementation calls
The EVP_PKEY methods for CMAC and HMAC needed a rework, although it
wasn't much change apart from name changes.
This also meant that EVP_PKEY_new_CMAC_key() needed an adjustment.
(the possibility to rewrite this function to work with any MAC is yet
to be explored)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7484)
Diffstat (limited to 'crypto/cmac')
-rw-r--r-- | crypto/cmac/cm_ameth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/cmac/cm_ameth.c b/crypto/cmac/cm_ameth.c index a58454a089..71265846e6 100644 --- a/crypto/cmac/cm_ameth.c +++ b/crypto/cmac/cm_ameth.c @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2010-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -10,7 +10,6 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/evp.h> -#include <openssl/cmac.h> #include "internal/asn1_int.h" /* @@ -25,8 +24,8 @@ static int cmac_size(const EVP_PKEY *pkey) static void cmac_key_free(EVP_PKEY *pkey) { - CMAC_CTX *cmctx = EVP_PKEY_get0(pkey); - CMAC_CTX_free(cmctx); + EVP_MAC_CTX *cmctx = EVP_PKEY_get0(pkey); + EVP_MAC_CTX_free(cmctx); } const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { |