consttime flag changed
authorSamuel Weiser <samuel.weiser@iaik.tugraz.at>
Fri, 9 Feb 2018 13:11:47 +0000 (14:11 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 21 Mar 2018 17:37:29 +0000 (17:37 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5170)

(cherry picked from commit 7150a4720af7913cae16f2e4eaf768b578c0b298)

crypto/rsa/rsa_gen.c

index 610d82d..9ca5dfe 100644 (file)
@@ -156,7 +156,7 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
     if (BN_copy(rsa->e, e_value) == NULL)
         goto err;
 
-    BN_set_flags(rsa->e, BN_FLG_CONSTTIME);
+    BN_set_flags(r2, BN_FLG_CONSTTIME);
     /* generate p and q */
     for (;;) {
         if (!BN_generate_prime_ex(rsa->p, bitsp, 0, NULL, NULL, cb))