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:33:41 +0000 (14:33 +0100)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9830)

crypto/ec/ecx_meth.c

index 75ea96754fdd52a4b3a8ba856fd6b13853233632..b88139218af076cdc525e9f061ac06b84c2e5997 100644 (file)
@@ -195,7 +195,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;
 }