Clear the secret point in ecdh_simple_compute_key
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 17 Mar 2019 08:48:15 +0000 (09:48 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 18 Mar 2019 21:30:50 +0000 (22:30 +0100)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8501)

(cherry picked from commit 1ff2c992c24c330c0d40708b4169b862563d6aab)

crypto/ec/ecdh_ossl.c

index bd93793a180a31ce8a19fe3fe127501f1ec97926..254a1dc9c27fddfa48f965f9d992bf8289cb6854 100644 (file)
@@ -112,7 +112,7 @@ int ecdh_simple_compute_key(unsigned char **pout, size_t *poutlen,
     ret = 1;
 
  err:
-    EC_POINT_free(tmp);
+    EC_POINT_clear_free(tmp);
     if (ctx)
         BN_CTX_end(ctx);
     BN_CTX_free(ctx);