tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 7059c329682d70f1b2de4c774971745b0a917073
parent 3d8c97a9883d295a898b6d32be0b5be3b569b704
Author: Nick Mathewson <nickm@torproject.org>
Date:   Wed, 18 Mar 2020 08:20:38 -0400

Merge branch 'maint-0.4.3'

Diffstat:
Msrc/lib/crypt_ops/crypto_rsa_openssl.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/lib/crypt_ops/crypto_rsa_openssl.c b/src/lib/crypt_ops/crypto_rsa_openssl.c @@ -573,6 +573,8 @@ rsa_private_key_too_long(RSA *rsa, int max_bits) { const BIGNUM *n, *e, *p, *q, *d, *dmp1, *dmq1, *iqmp; #ifdef OPENSSL_1_1_API + +#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,1) n = RSA_get0_n(rsa); e = RSA_get0_e(rsa); p = RSA_get0_p(rsa); @@ -581,6 +583,11 @@ rsa_private_key_too_long(RSA *rsa, int max_bits) dmp1 = RSA_get0_dmp1(rsa); dmq1 = RSA_get0_dmq1(rsa); iqmp = RSA_get0_iqmp(rsa); +#else + /* The accessors above did not exist in openssl 1.1.0. */ + p = q = dmp1 = dmq1 = iqmp = NULL; + RSA_get0_key(rsa, &n, &e, &d); +#endif if (RSA_bits(rsa) > max_bits) return true;