summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2023-09-12 14:58:03 +0200
committerPauli <pauli@openssl.org>2023-09-14 09:07:29 +1000
commitdf9ecd2ef3907ec0a7bf9c54d9273d5342329bf9 (patch)
tree0df4482e5c855833c958842d958b58277b74398d /providers
parent70e809b08a3fe70fed7f7ecdad88e5bb9fc3af1c (diff)
Have legacy blake2 EVP structure use base blake2 implementation
For some reason, the code here was made to got through the provider specific init functions. This is very very dangerous if the provider specific functions were to change in any way (such as changes to the implementation context structure). Instead, use the init functions from the base blake2 implementations directly. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22079)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/digests/blake2_prov.c4
-rw-r--r--providers/implementations/include/prov/blake2.h3
2 files changed, 2 insertions, 5 deletions
diff --git a/providers/implementations/digests/blake2_prov.c b/providers/implementations/digests/blake2_prov.c
index 2288286bbe..298bc66de6 100644
--- a/providers/implementations/digests/blake2_prov.c
+++ b/providers/implementations/digests/blake2_prov.c
@@ -12,7 +12,7 @@
#include "prov/digestcommon.h"
#include "prov/implementations.h"
-int ossl_blake2s256_init(void *ctx)
+static int ossl_blake2s256_init(void *ctx)
{
BLAKE2S_PARAM P;
@@ -20,7 +20,7 @@ int ossl_blake2s256_init(void *ctx)
return ossl_blake2s_init((BLAKE2S_CTX *)ctx, &P);
}
-int ossl_blake2b512_init(void *ctx)
+static int ossl_blake2b512_init(void *ctx)
{
struct blake2b_md_data_st *mdctx = ctx;
diff --git a/providers/implementations/include/prov/blake2.h b/providers/implementations/include/prov/blake2.h
index 4ec780c21f..bcd0bb9bcd 100644
--- a/providers/implementations/include/prov/blake2.h
+++ b/providers/implementations/include/prov/blake2.h
@@ -88,9 +88,6 @@ struct blake2b_md_data_st {
BLAKE2B_PARAM params;
};
-int ossl_blake2s256_init(void *ctx);
-int ossl_blake2b512_init(void *ctx);
-
int ossl_blake2b_init(BLAKE2B_CTX *c, const BLAKE2B_PARAM *P);
int ossl_blake2b_init_key(BLAKE2B_CTX *c, const BLAKE2B_PARAM *P,
const void *key);