]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_grasshopper_cipher.c
Merge branch 'magma_impl' into openssl_1_0_2_alt
[openssl-gost/engine.git] / gost_grasshopper_cipher.c
index e7c8dd6299de4e93001e53b08370dda259ee1c3d..da68057e855777371a9ff09c7d20195b0de65c0a 100644 (file)
@@ -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