-/* $OpenBSD: dh_ameth.c,v 1.36 2023/08/11 13:57:24 tb Exp $ */
+/* $OpenBSD: dh_ameth.c,v 1.37 2023/08/12 07:43:48 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
}
static int
-dh_missing_parameters(const EVP_PKEY *a)
+dh_missing_parameters(const EVP_PKEY *pkey)
{
- if (!a->pkey.dh->p || !a->pkey.dh->g)
- return 1;
- return 0;
+ const DH *dh = pkey->pkey.dh;
+
+ return dh->p == NULL || dh->g == NULL;
}
static int
-/* $OpenBSD: dsa_ameth.c,v 1.51 2023/08/11 13:57:24 tb Exp $ */
+/* $OpenBSD: dsa_ameth.c,v 1.52 2023/08/12 07:43:48 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
static int
dsa_missing_parameters(const EVP_PKEY *pkey)
{
- DSA *dsa;
+ const DSA *dsa = pkey->pkey.dsa;
- dsa = pkey->pkey.dsa;
- if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL)
- return 1;
- return 0;
+ return dsa->p == NULL || dsa->q == NULL || dsa->g == NULL;
}
static int