rsa/rsa_ossl.c: cache MONT_CTX for public modulus earlier.
authorAndy Polyakov <appro@openssl.org>
Wed, 7 Nov 2018 21:07:22 +0000 (22:07 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 22 Nov 2018 09:49:48 +0000 (09:49 +0000)
commit5970d48093ecf5bc62b398c97e6ed030620dee30
tree0f2d5a92d77b2876d156d54ed496a3ce2241212e
parent49fabf6b4d3b53f0f1871be10c5b28e15e7d33d3
rsa/rsa_ossl.c: cache MONT_CTX for public modulus earlier.

Blinding is performed more efficiently and securely if MONT_CTX for public
modulus is available by the time blinding parameter are instantiated. So
make sure it's the case.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7586)

(cherry picked from commit 2cc3f68cde77af23c61fbad65470602ee86f2575)
crypto/rsa/rsa_ossl.c