X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fsiphash%2Fsiphash_meth.c;h=5fcff2d1efca96d9a9f295903bb70c197a8d6f76;hp=37cb286ebf37216e5f84b6501f113d4ba2aba93e;hb=7ed66e2634e6cfbb16a1ef975572e79a479217a8;hpb=134148276b1d27342210974173ac8db2920e6245 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,