]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_prov.c
MSVC: Add dllexport to OSSL_provider_init
[openssl-gost/engine.git] / gost_prov.c
index fe65c4d14a686e99e89620ebbd7944793475be69..390275c5eaaad4ef85ba41eef76f5a12d58884ec 100644 (file)
@@ -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,