diff options
author | jkim <jkim@FreeBSD.org> | 2013-02-13 23:07:20 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-02-13 23:07:20 +0000 |
commit | 754bee57763650b50ece26c6f026c1795b4132d8 (patch) | |
tree | 265bba8e82f9a88ce59fc212bc8bf5e01c270b16 /crypto/openssl/engines/ccgost/gost_eng.c | |
parent | a6d6a2787087806f8a0ae6290d1df47c9471a269 (diff) | |
parent | 9069337c8384d04bea914cdfac40b533e60cade6 (diff) | |
download | FreeBSD-src-754bee57763650b50ece26c6f026c1795b4132d8.zip FreeBSD-src-754bee57763650b50ece26c6f026c1795b4132d8.tar.gz |
Merge OpenSSL 1.0.1e.
Approved by: secteam (simon), benl (silence)
Diffstat (limited to 'crypto/openssl/engines/ccgost/gost_eng.c')
-rw-r--r-- | crypto/openssl/engines/ccgost/gost_eng.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/crypto/openssl/engines/ccgost/gost_eng.c b/crypto/openssl/engines/ccgost/gost_eng.c index d2cbe3b..8f29bf6 100644 --- a/crypto/openssl/engines/ccgost/gost_eng.c +++ b/crypto/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); |