diff options
author | tb <> | 2023-08-12 07:43:48 +0000 |
---|---|---|
committer | tb <> | 2023-08-12 07:43:48 +0000 |
commit | d41a567de0fd7170b5310581914561415f1aa46e (patch) | |
tree | 64b4906da67f40c6a74b53f10f0c1672b4b5633a /src/lib/libcrypto/dh/dh_ameth.c | |
parent | ee8f35a481544e1c6c9d242ebca90dff32e0a3c2 (diff) | |
download | openbsd-d41a567de0fd7170b5310581914561415f1aa46e.tar.gz openbsd-d41a567de0fd7170b5310581914561415f1aa46e.tar.bz2 openbsd-d41a567de0fd7170b5310581914561415f1aa46e.zip |
Simplify and unify missing_parameters() for DH and DSA
ok jsing
Diffstat (limited to 'src/lib/libcrypto/dh/dh_ameth.c')
-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 |