[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sat Dec 18 04:04:26 UTC 2021


The branch master has been updated
       via  2437832be1d0e11e6a601c19a18d7247aff22f0e (commit)
      from  7ca3bf792a4a085e6f2426ad51a41fca4d0b1b8c (commit)


- Log -----------------------------------------------------------------
commit 2437832be1d0e11e6a601c19a18d7247aff22f0e
Author: Pauli <ppzgs1 at gmail.com>
Date:   Thu Dec 16 20:12:25 2021 +1100

    rsa exp: move declarations before code
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17287)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bn/rsaz_exp_x2.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/crypto/bn/rsaz_exp_x2.c b/crypto/bn/rsaz_exp_x2.c
index 3371b6c6d7..9969d45e40 100644
--- a/crypto/bn/rsaz_exp_x2.c
+++ b/crypto/bn/rsaz_exp_x2.c
@@ -412,6 +412,8 @@ int RSAZ_mod_exp_x2_ifma256(BN_ULONG *out,
         int exp_chunk_no = exp_bit_no / 64;
         int exp_chunk_shift = exp_bit_no % 64;
 
+        BN_ULONG red_table_idx_0, red_table_idx_1;
+
         /*
          * If rem == 0, then
          *      exp_bit_no = modulus_bitsize - exp_win_size
@@ -423,8 +425,9 @@ int RSAZ_mod_exp_x2_ifma256(BN_ULONG *out,
         OPENSSL_assert(rem != 0);
 
         /* Process 1-st exp window - just init result */
-        BN_ULONG red_table_idx_0 = expz[exp_chunk_no + 0 * (exp_digits + 1)];
-        BN_ULONG red_table_idx_1 = expz[exp_chunk_no + 1 * (exp_digits + 1)];
+        red_table_idx_0 = expz[exp_chunk_no + 0 * (exp_digits + 1)];
+        red_table_idx_1 = expz[exp_chunk_no + 1 * (exp_digits + 1)];
+
         /*
          * The function operates with fixed moduli sizes divisible by 64,
          * thus table index here is always in supported range [0, EXP_WIN_SIZE).


More information about the openssl-commits mailing list