diff options
| author | tb <> | 2023-07-01 14:56:12 +0000 |
|---|---|---|
| committer | tb <> | 2023-07-01 14:56:12 +0000 |
| commit | 12fd3de06ad38568723233cced0ba2ddde315e49 (patch) | |
| tree | 83a1fbb34fe2b24430d449b48215ca90282fc3e4 /src | |
| parent | 7b99c85477208a79cacc07be7be57ffa5124a97f (diff) | |
| download | openbsd-12fd3de06ad38568723233cced0ba2ddde315e49.tar.gz openbsd-12fd3de06ad38568723233cced0ba2ddde315e49.tar.bz2 openbsd-12fd3de06ad38568723233cced0ba2ddde315e49.zip | |
Test and assign for EC_KEY_get0_private_key()
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ecdh/ech_key.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c index fc023af986..f4d20cd0ce 100644 --- a/src/lib/libcrypto/ecdh/ech_key.c +++ b/src/lib/libcrypto/ecdh/ech_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ech_key.c,v 1.24 2023/07/01 14:53:48 tb Exp $ */ | 1 | /* $OpenBSD: ech_key.c,v 1.25 2023/07/01 14:56:12 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 4 | * | 4 | * |
| @@ -115,8 +115,7 @@ ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, | |||
| 115 | if ((x = BN_CTX_get(ctx)) == NULL) | 115 | if ((x = BN_CTX_get(ctx)) == NULL) |
| 116 | goto err; | 116 | goto err; |
| 117 | 117 | ||
| 118 | priv_key = EC_KEY_get0_private_key(ecdh); | 118 | if ((priv_key = EC_KEY_get0_private_key(ecdh)) == NULL) { |
| 119 | if (priv_key == NULL) { | ||
| 120 | ECDHerror(ECDH_R_NO_PRIVATE_VALUE); | 119 | ECDHerror(ECDH_R_NO_PRIVATE_VALUE); |
| 121 | goto err; | 120 | goto err; |
| 122 | } | 121 | } |
