aboutsummaryrefslogtreecommitdiff
path: root/gost_prov.c
diff options
context:
space:
mode:
authorRichard Levitte <richard@levitte.org>2021-04-05 08:08:10 +0200
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2021-10-11 19:34:09 +0300
commit0d53de14d01e8e079e5b5b4e08ec6e9f063139cc (patch)
tree9bb645b510faf4a06084c58138347684b75445f0 /gost_prov.c
parentdd645e71d12ec790dc6c2e1c44163e2683ae4c6a (diff)
downloadgost-engine-0d53de14d01e8e079e5b5b4e08ec6e9f063139cc.zip
gost-engine-0d53de14d01e8e079e5b5b4e08ec6e9f063139cc.tar.gz
gost-engine-0d53de14d01e8e079e5b5b4e08ec6e9f063139cc.tar.bz2
Making a gost provider - Add the macs
We add the macs for the provider as wrappers around the EVP_MD implementations designed for ENGINEs. This is not the most elegant, but it does the job. When an algorithm has an OID, it's included in the OSSL_ALGORITHM name as an alias. This is the way to avoid having to register the OIDs in OpenSSL proper.
Diffstat (limited to 'gost_prov.c')
-rw-r--r--gost_prov.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gost_prov.c b/gost_prov.c
index ba7120b..e7fdd96 100644
--- a/gost_prov.c
+++ b/gost_prov.c
@@ -91,6 +91,8 @@ static const OSSL_ALGORITHM *gost_operation(void *vprovctx,
return GOST_prov_ciphers;
case OSSL_OP_DIGEST:
return GOST_prov_digests;
+ case OSSL_OP_MAC:
+ return GOST_prov_macs;
}
return NULL;
}
@@ -113,6 +115,7 @@ static void gost_teardown(void *vprovctx)
{
GOST_prov_deinit_ciphers();
GOST_prov_deinit_digests();
+ GOST_prov_deinit_mac_digests();
provider_ctx_free(vprovctx);
}