From a37314343f9c98b9bf85b6460591eee77f461204 Mon Sep 17 00:00:00 2001 From: merlokk Date: Mon, 4 Dec 2017 19:56:04 +0200 Subject: [PATCH] crypto_hash_polarssl_close works --- client/emv/crypto_polarssl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/emv/crypto_polarssl.c b/client/emv/crypto_polarssl.c index 3612286e..53034854 100644 --- a/client/emv/crypto_polarssl.c +++ b/client/emv/crypto_polarssl.c @@ -30,15 +30,15 @@ struct crypto_hash_polarssl { struct crypto_hash ch; -// gcry_md_hd_t md; + rsa_context *ctx; }; static void crypto_hash_polarssl_close(struct crypto_hash *_ch) { -// struct crypto_hash_polarssl *ch = container_of(_ch, struct crypto_hash_libgcrypt, ch); + struct crypto_hash_polarssl *ch = (struct crypto_hash_polarssl *)_ch; -// gcry_md_close(ch->md); -// free(ch); + rsa_free(ch->ctx); + free(ch); } static void crypto_hash_polarssl_write(struct crypto_hash *_ch, const unsigned char *buf, size_t len)