aboutsummaryrefslogtreecommitdiff
path: root/openssl/engines/ccgost/gost_eng.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-13 09:55:16 +0100
committermarha <marha@users.sourceforge.net>2013-02-13 09:55:16 +0100
commit88bcd02cfecbf8ba9cf726b0d337c56f9c9b2bc4 (patch)
treeded42639873b943c7ec97b06961ad067228652d1 /openssl/engines/ccgost/gost_eng.c
parent3247a4e031a7d5160332c0d7ca2a91a516c082bb (diff)
parentaaf21968deb85b635cb6aa6544df233ea5981346 (diff)
downloadvcxsrv-88bcd02cfecbf8ba9cf726b0d337c56f9c9b2bc4.tar.gz
vcxsrv-88bcd02cfecbf8ba9cf726b0d337c56f9c9b2bc4.tar.bz2
vcxsrv-88bcd02cfecbf8ba9cf726b0d337c56f9c9b2bc4.zip
Merge remote-tracking branch 'origin/released'
* origin/released: Update to following packages: Conflicts: freetype/src/autofit/afhints.c freetype/src/autofit/afmodule.c freetype/src/psaux/psconv.c freetype/src/sfnt/sfntpic.h openssl/Makefile openssl/util/pl/VC-32.pl
Diffstat (limited to 'openssl/engines/ccgost/gost_eng.c')
-rw-r--r--openssl/engines/ccgost/gost_eng.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/openssl/engines/ccgost/gost_eng.c b/openssl/engines/ccgost/gost_eng.c
index d2cbe3b83..8f29bf6f8 100644
--- a/openssl/engines/ccgost/gost_eng.c
+++ b/openssl/engines/ccgost/gost_eng.c
@@ -64,6 +64,13 @@ static int gost_engine_finish(ENGINE *e)
static int gost_engine_destroy(ENGINE *e)
{
gost_param_free();
+
+ pmeth_GostR3410_94 = NULL;
+ pmeth_GostR3410_2001 = NULL;
+ pmeth_Gost28147_MAC = NULL;
+ ameth_GostR3410_94 = NULL;
+ ameth_GostR3410_2001 = NULL;
+ ameth_Gost28147_MAC = NULL;
return 1;
}
@@ -71,6 +78,11 @@ static int bind_gost (ENGINE *e,const char *id)
{
int ret = 0;
if (id && strcmp(id, engine_gost_id)) return 0;
+ if (ameth_GostR3410_94)
+ {
+ printf("GOST engine already loaded\n");
+ goto end;
+ }
if (!ENGINE_set_id(e, engine_gost_id))
{
@@ -263,7 +275,10 @@ static ENGINE *engine_gost(void)
void ENGINE_load_gost(void)
{
- ENGINE *toadd =engine_gost();
+ ENGINE *toadd;
+ if (pmeth_GostR3410_94)
+ return;
+ toadd = engine_gost();
if (!toadd) return;
ENGINE_add(toadd);
ENGINE_free(toadd);