Move md5_asm_src file information to build.info files
[oweals/openssl.git] / crypto / siphash / siphash_meth.c
index 37cb286ebf37216e5f84b6501f113d4ba2aba93e..5fcff2d1efca96d9a9f295903bb70c197a8d6f76 100644 (file)
@@ -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,