diff options
| author | tb <> | 2024-10-29 06:36:58 +0000 |
|---|---|---|
| committer | tb <> | 2024-10-29 06:36:58 +0000 |
| commit | ce051cb967424d433f6c495f7c82b2a7204e2d4f (patch) | |
| tree | 5bac78bb07a3a8b81348d54a6b2070bc0c287ccf /src | |
| parent | be8def6720ab4dae49c3fd9801115c4abc1e78c6 (diff) | |
| download | openbsd-ce051cb967424d433f6c495f7c82b2a7204e2d4f.tar.gz openbsd-ce051cb967424d433f6c495f7c82b2a7204e2d4f.tar.bz2 openbsd-ce051cb967424d433f6c495f7c82b2a7204e2d4f.zip | |
eckey_compute_pubkey: don't leak the public key
EC_KEY_set_public_key() sets a copy, so it doesn't take ownership and
hence pub_key must not be nulled out on success.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index 246da22450..754fabfb4d 100644 --- a/src/lib/libcrypto/ec/ec_ameth.c +++ b/src/lib/libcrypto/ec/ec_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_ameth.c,v 1.71 2024/10/28 18:01:26 tb Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.72 2024/10/29 06:36:58 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -328,7 +328,6 @@ eckey_compute_pubkey(EC_KEY *eckey) | |||
| 328 | goto err; | 328 | goto err; |
| 329 | if (!EC_KEY_set_public_key(eckey, pub_key)) | 329 | if (!EC_KEY_set_public_key(eckey, pub_key)) |
| 330 | goto err; | 330 | goto err; |
| 331 | pub_key = NULL; | ||
| 332 | 331 | ||
| 333 | ret = 1; | 332 | ret = 1; |
| 334 | 333 | ||
