X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_grasshopper_cipher.c;fp=gost_grasshopper_cipher.c;h=da68057e855777371a9ff09c7d20195b0de65c0a;hb=0ee4f8fc839278672e47213549bfb152ad3d2654;hp=e7c8dd6299de4e93001e53b08370dda259ee1c3d;hpb=bca47af46027b1b84c23af1c84aef1bf901778f8;p=openssl-gost%2Fengine.git diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index e7c8dd6..da68057 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -656,6 +656,20 @@ 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