diff options
| author | tb <> | 2023-08-12 07:43:48 +0000 |
|---|---|---|
| committer | tb <> | 2023-08-12 07:43:48 +0000 |
| commit | ca959b67a4d1cc2713bf6ef88288116f17fcc8cc (patch) | |
| tree | 64b4906da67f40c6a74b53f10f0c1672b4b5633a /src/lib/libcrypto/dh | |
| parent | 5b2e27e38fbe101e45f8577af321c751af2b10ed (diff) | |
| download | openbsd-ca959b67a4d1cc2713bf6ef88288116f17fcc8cc.tar.gz openbsd-ca959b67a4d1cc2713bf6ef88288116f17fcc8cc.tar.bz2 openbsd-ca959b67a4d1cc2713bf6ef88288116f17fcc8cc.zip | |
Simplify and unify missing_parameters() for DH and DSA
ok jsing
Diffstat (limited to 'src/lib/libcrypto/dh')
| -rw-r--r-- | src/lib/libcrypto/dh/dh_ameth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index f0c20f9a43..88fec6bf4a 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dh_ameth.c,v 1.36 2023/08/11 13:57:24 tb Exp $ */ | 1 | /* $OpenBSD: dh_ameth.c,v 1.37 2023/08/12 07:43:48 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 | */ |
| @@ -432,11 +432,11 @@ dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | |||
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | static int | 434 | static int |
| 435 | dh_missing_parameters(const EVP_PKEY *a) | 435 | dh_missing_parameters(const EVP_PKEY *pkey) |
| 436 | { | 436 | { |
| 437 | if (!a->pkey.dh->p || !a->pkey.dh->g) | 437 | const DH *dh = pkey->pkey.dh; |
| 438 | return 1; | 438 | |
| 439 | return 0; | 439 | return dh->p == NULL || dh->g == NULL; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | static int | 442 | static int |
