2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Refactor OpenSSL ECDSA to use pkeypair

- Use separate EVP_PKEY for public and private keys
- On private key load, generate public key allowing better consistency
- Support OpenSSL3 providers
- Clean up key construction abstraction
- Various other clean ups
This commit is contained in:
Timo Teräs
2022-12-28 17:13:41 +02:00
committed by Ondřej Surý
parent f6f807319c
commit a3b6729a88
2 changed files with 263 additions and 625 deletions

View File

@@ -56,6 +56,13 @@ EVP_PKEY_get0_RSA(const EVP_PKEY *pkey) {
} }
#endif #endif
#if !HAVE_EVP_PKEY_GET0_EC_KEY && OPENSSL_VERSION_NUMBER < 0x10100000L
static inline const EC_KEY *
EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey) {
return (pkey->type == EVP_PKEY_EC ? pkey->pkey.ec : NULL);
}
#endif
#if !HAVE_RSA_SET0_KEY && OPENSSL_VERSION_NUMBER < 0x30000000L #if !HAVE_RSA_SET0_KEY && OPENSSL_VERSION_NUMBER < 0x30000000L
int int
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);

File diff suppressed because it is too large Load Diff