X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;ds=inline;f=gost_prov.c;h=390275c5eaaad4ef85ba41eef76f5a12d58884ec;hb=1c34b3491fd1a83fa29f5d28d67cca62ef965d40;hp=fe65c4d14a686e99e89620ebbd7944793475be69;hpb=265d89dcbce7fce4fa2b560b70597132fd8eb3b2;p=openssl-gost%2Fengine.git diff --git a/gost_prov.c b/gost_prov.c index fe65c4d..390275c 100644 --- a/gost_prov.c +++ b/gost_prov.c @@ -86,6 +86,14 @@ static const OSSL_ALGORITHM *gost_operation(void *vprovctx, int operation_id, const int *no_cache) { + switch (operation_id) { + case OSSL_OP_CIPHER: + return GOST_prov_ciphers; + case OSSL_OP_DIGEST: + return GOST_prov_digests; + case OSSL_OP_MAC: + return GOST_prov_macs; + } return NULL; } @@ -105,6 +113,9 @@ static const OSSL_ITEM *gost_get_reason_strings(void *provctx) /* The function that tears down this provider */ static void gost_teardown(void *vprovctx) { + GOST_prov_deinit_ciphers(); + GOST_prov_deinit_digests(); + GOST_prov_deinit_mac_digests(); provider_ctx_free(vprovctx); } @@ -132,6 +143,7 @@ struct prov_ctx_st { # define OSSL_provider_init GOST_provider_init #endif +OPENSSL_EXPORT int OSSL_provider_init(const OSSL_CORE_HANDLE *core, const OSSL_DISPATCH *in, const OSSL_DISPATCH **out,