]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - providers/implementations/digests/blake2b_prov.c
Copyright year updates
[thirdparty/openssl.git] / providers / implementations / digests / blake2b_prov.c
index 970549ed0c2f4e38697a5fee1086c6af0777e9a3..6ef7fac008cc592ef516c20cd3288c3bb89d8259 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -324,8 +324,10 @@ int ossl_blake2b_final(unsigned char *md, BLAKE2B_CTX *c)
     for (i = 0; i < iter; ++i)
         store64(target + sizeof(c->h[i]) * i, c->h[i]);
 
-    if (target != md)
+    if (target != md) {
         memcpy(md, target, c->outlen);
+        OPENSSL_cleanse(target, sizeof(outbuffer));
+    }
 
     OPENSSL_cleanse(c, sizeof(BLAKE2B_CTX));
     return 1;