summaryrefslogtreecommitdiffstats
path: root/providers/default/defltprov.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-05-07 12:40:25 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-15 22:12:25 +0200
commit55a0a117e7d911752bc7e3e00a67f7a5ad168159 (patch)
treec24df0ee56ed31816eefdd3b808f128627457651 /providers/default/defltprov.c
parentPrepare EVP_MAC infrastructure for moving all MACs to providers (diff)
downloadopenssl-55a0a117e7d911752bc7e3e00a67f7a5ad168159.tar.xz
openssl-55a0a117e7d911752bc7e3e00a67f7a5ad168159.zip
Move BLAKE2 MACs to the providers
This also moves the remaining parts of BLAKE2 digests to the default provider, and removes the legacy EVP implementation. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8877)
Diffstat (limited to 'providers/default/defltprov.c')
-rw-r--r--providers/default/defltprov.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/providers/default/defltprov.c b/providers/default/defltprov.c
index 2a0893e038..f4457a4d90 100644
--- a/providers/default/defltprov.c
+++ b/providers/default/defltprov.c
@@ -9,6 +9,7 @@
#include <string.h>
#include <stdio.h>
+#include <openssl/opensslconf.h>
#include <openssl/core.h>
#include <openssl/core_numbers.h>
#include <openssl/core_names.h>
@@ -122,6 +123,14 @@ static const OSSL_ALGORITHM deflt_ciphers[] = {
{ NULL, NULL, NULL }
};
+static const OSSL_ALGORITHM deflt_macs[] = {
+#ifndef OPENSSL_NO_BLAKE2
+ { "BLAKE2BMAC", "default=yes", blake2bmac_functions },
+ { "BLAKE2SMAC", "default=yes", blake2smac_functions },
+#endif
+ { NULL, NULL, NULL }
+};
+
static const OSSL_ALGORITHM deflt_keyexch[] = {
#ifndef OPENSSL_NO_DH
{ "dhKeyAgreement", "default=yes", dh_keyexch_functions },
@@ -146,6 +155,8 @@ static const OSSL_ALGORITHM *deflt_query(OSSL_PROVIDER *prov,
return deflt_digests;
case OSSL_OP_CIPHER:
return deflt_ciphers;
+ case OSSL_OP_MAC:
+ return deflt_macs;
case OSSL_OP_KEYMGMT:
return deflt_keymgmt;
case OSSL_OP_KEYEXCH: