X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gost_grasshopper_cipher.c;h=cc59dafb52ded8dc5bf9a8cce8a08c8888739bfa;hb=697e4faa6ce5a42a08ca922bbb379776cc8eb4f2;hp=92be9917be27660f4e3559731e337b9fa355a6aa;hpb=ed191fe63d7ac2c4906d828eb4ea673f3004c847;p=openssl-gost%2Fengine.git diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index 92be991..cc59daf 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -624,6 +624,19 @@ const GRASSHOPPER_INLINE EVP_CIPHER* cipher_gost_grasshopper_ctr() { return cipher_gost_grasshopper(EVP_CIPH_CTR_MODE, GRASSHOPPER_CIPHER_CTR); } +void cipher_gost_grasshopper_destroy(void) +{ + EVP_CIPHER_meth_free(gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_ECB]); + gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_ECB] = NULL; + EVP_CIPHER_meth_free(gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_CBC]); + gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_CBC] = NULL; + EVP_CIPHER_meth_free(gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_OFB]); + gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_OFB] = NULL; + EVP_CIPHER_meth_free(gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_CFB]); + gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_CFB] = NULL; + EVP_CIPHER_meth_free(gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_CTR]); + gost_grasshopper_ciphers[GRASSHOPPER_CIPHER_CTR] = NULL; +} #if defined(__cplusplus) } #endif