clearing the ecx private key memory
authorManishPatidar1 <mann.patidar@gmail.com>
Mon, 9 Sep 2019 13:32:56 +0000 (19:02 +0530)
committerMatt Caswell <matt@openssl.org>
Mon, 16 Sep 2019 13:40:26 +0000 (14:40 +0100)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9830)

(cherry picked from commit 6ef03ea98fac501e6d6e33bac6ad3c92ea074712)

crypto/ec/ecx_meth.c

index c87419b5db3880f3c1c2faf6d8fefa0baab26faa..55429642fd085f99bb363c067e075afe3e5b1671 100644 (file)
@@ -191,7 +191,7 @@ static int ecx_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8)
     }
 
     rv = ecx_key_op(pkey, pkey->ameth->pkey_id, palg, p, plen, KEY_OP_PRIVATE);
-    ASN1_OCTET_STRING_free(oct);
+    ASN1_STRING_clear_free(oct);
     return rv;
 }