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)
const EVP_MAC siphash_meth = {
EVP_MAC_SIPHASH,
siphash_new,
- siphash_copy,
+ siphash_dup,
siphash_free,
siphash_size,
siphash_init,