diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-01-14 22:13:37 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-01-15 22:38:09 +0000 |
commit | 25be7a0feacdbd3326774f0da8aaeb966c1f57f8 (patch) | |
tree | 17c8b363edf7d122361f7f6d2806fbf6ae55b4d7 /engines | |
parent | c864e7611f7bf0011fd0cb64b3fdfc42eb15e807 (diff) | |
download | openssl-25be7a0feacdbd3326774f0da8aaeb966c1f57f8.tar.gz |
free up gost ciphers
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r-- | engines/ccgost/gost_crypt.c | 8 | ||||
-rw-r--r-- | engines/ccgost/gost_eng.c | 1 | ||||
-rw-r--r-- | engines/ccgost/gost_lcl.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c index 9c6dcc53a0..63009a23d1 100644 --- a/engines/ccgost/gost_crypt.c +++ b/engines/ccgost/gost_crypt.c @@ -109,6 +109,14 @@ const EVP_CIPHER *cipher_gost_cpacnt(void) return _hidden_gost89_cnt; } +void cipher_gost_destroy(void) +{ + EVP_CIPHER_meth_free(_hidden_Gost28147_89_cipher); + _hidden_Gost28147_89_cipher = NULL; + EVP_CIPHER_meth_free(_hidden_gost89_cnt); + _hidden_gost89_cnt = NULL; +} + /* Implementation of GOST 28147-89 in MAC (imitovstavka) mode */ /* Init functions which set specific parameters */ static int gost_imit_init_cpa(EVP_MD_CTX *ctx); diff --git a/engines/ccgost/gost_eng.c b/engines/ccgost/gost_eng.c index bc43848b37..38ed25ca30 100644 --- a/engines/ccgost/gost_eng.c +++ b/engines/ccgost/gost_eng.c @@ -77,6 +77,7 @@ static int gost_engine_finish(ENGINE *e) static int gost_engine_destroy(ENGINE *e) { digest_gost_destroy(); + cipher_gost_destroy(); imit_gost_cpa_destroy(); gost_param_free(); diff --git a/engines/ccgost/gost_lcl.h b/engines/ccgost/gost_lcl.h index 895e2d66d7..61f657c833 100644 --- a/engines/ccgost/gost_lcl.h +++ b/engines/ccgost/gost_lcl.h @@ -145,6 +145,7 @@ struct ossl_gost_digest_ctx { /* EVP_MD structure for GOST R 34.11 */ EVP_MD *digest_gost(void); void digest_gost_destroy(void); +void cipher_gost_destroy(void); /* EVP_MD structure for GOST 28147 in MAC mode */ const EVP_MD *imit_gost_cpa(void); void imit_gost_cpa_destroy(void); |