aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2019-01-21 11:46:56 +0300
committerVitaly Chikunov <vt@altlinux.org>2019-01-21 11:58:20 +0300
commit1716316de77a041bd25bf6d0c87bd4a3b5d12010 (patch)
treedc4b64f346cb34a776f5e88d53f6b9425e97e101
parentc4bf9b2c07700d305524cf3c5d412ba58e609158 (diff)
downloadgost-engine-1716316de77a041bd25bf6d0c87bd4a3b5d12010.zip
gost-engine-1716316de77a041bd25bf6d0c87bd4a3b5d12010.tar.gz
gost-engine-1716316de77a041bd25bf6d0c87bd4a3b5d12010.tar.bz2
Export bind_gost to allow local engine init
Look at `test_params.c` for example.
-rw-r--r--gost_eng.c2
-rw-r--r--gost_lcl.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/gost_eng.c b/gost_eng.c
index 69f9975..74fe13e 100644
--- a/gost_eng.c
+++ b/gost_eng.c
@@ -164,7 +164,7 @@ static int gost_engine_destroy(ENGINE* e) {
return 1;
}
-static int bind_gost(ENGINE* e, const char* id) {
+int bind_gost(ENGINE* e, const char* id) {
int ret = 0;
if (id != NULL && strcmp(id, engine_gost_id) != 0)
return 0;
diff --git a/gost_lcl.h b/gost_lcl.h
index 6a6130a..512d947 100644
--- a/gost_lcl.h
+++ b/gost_lcl.h
@@ -302,4 +302,6 @@ int pack_sign_cp(ECDSA_SIG *s, int order, unsigned char *sig, size_t *siglen);
/* Returns pointer into EVP_PKEY structure */
BIGNUM *gost_get0_priv_key(const EVP_PKEY *pkey);
+int bind_gost(ENGINE* e, const char* id);
+
#endif