diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2018-12-19 00:36:40 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2019-06-06 17:41:42 +0200 |
commit | 7ed66e2634e6cfbb16a1ef975572e79a479217a8 (patch) | |
tree | cc09cf68cd6e72fe61d428842284a1f584a58a19 /crypto/siphash | |
parent | be5fc053ed40bb714944f93e2d35265d2096f71f (diff) |
Change EVP_MAC method from copy to dup
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
GH: #7651
Diffstat (limited to 'crypto/siphash')
-rw-r--r-- | crypto/siphash/siphash_meth.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crypto/siphash/siphash_meth.c b/crypto/siphash/siphash_meth.c index 37cb286ebf..5fcff2d1ef 100644 --- a/crypto/siphash/siphash_meth.c +++ b/crypto/siphash/siphash_meth.c @@ -31,10 +31,17 @@ static void siphash_free(EVP_MAC_IMPL *sctx) OPENSSL_free(sctx); } -static int siphash_copy(EVP_MAC_IMPL *sdst, EVP_MAC_IMPL *ssrc) +static EVP_MAC_IMPL *siphash_dup(const EVP_MAC_IMPL *ssrc) { + EVP_MAC_IMPL *sdst; + + sdst = siphash_new(); + if (sdst == NULL) + return NULL; + *sdst = *ssrc; - return 1; + + return sdst; } static size_t siphash_size(EVP_MAC_IMPL *sctx) @@ -128,7 +135,7 @@ static int siphash_ctrl_str(EVP_MAC_IMPL *ctx, const EVP_MAC siphash_meth = { EVP_MAC_SIPHASH, siphash_new, - siphash_copy, + siphash_dup, siphash_free, siphash_size, siphash_init, |