Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
4ad3f17c
Commit
4ad3f17c
authored
Mar 18, 2020
by
Nick Mathewson
👁
Browse files
Merge branch 'maint-0.3.5' into maint-0.4.1
parents
57b1d084
0526801e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/crypt_ops/crypto_rsa_openssl.c
View file @
4ad3f17c
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment