ports/security/pks/files/patch-pgputil.c
Alexey Dokuchaev d3be3768fa security/pks: the port had been further improved (+)
- Simplify Berkeley DB detection (rather than completely deleting
  the corresponding configure script section, assume that if user
  passes DBHDR she knows what she's doing and trust that value)
- Fix a harmless typo RSA_get0_p() -> DSA_get0_p() in the previous
  commit 6074b736de
- GC some more needless variables (MAKE_ENV, LDFLAGS) and enable
  IPv6 while I'm here
2023-03-10 04:01:40 +00:00

20 lines
585 B
C

--- pgputil.c.orig 2003-04-30 04:13:38 UTC
+++ pgputil.c
@@ -221,14 +221,14 @@ decode_x509 (ddesc * data, long len, ddesc * keyid)
{
return (0);
}
- switch (pkey->type)
+ switch (EVP_PKEY_type(EVP_PKEY_id(pkey)))
{
case EVP_PKEY_RSA:
/* pkey->pkey.rsa->n is the modulus */
- b = BN_dup (pkey->pkey.rsa->n);
+ b = BN_dup (RSA_get0_n(EVP_PKEY_get0_RSA(pkey)));
break;
case EVP_PKEY_DSA:
- b = BN_dup (pkey->pkey.dsa->p);
+ b = BN_dup (DSA_get0_p(EVP_PKEY_get0_DSA(pkey)));
break;
}
EVP_PKEY_free (pkey);