Skip to content

Commit 2752fbc

Browse files
author
tb
committed
Rename ret into b in BN_BLINDING_setup()
1 parent f92b0ae commit 2752fbc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/libcrypto/bn/bn_blind.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: bn_blind.c,v 1.34 2023/08/08 14:40:56 tb Exp $ */
1+
/* $OpenBSD: bn_blind.c,v 1.35 2023/08/08 15:10:34 tb Exp $ */
22
/* ====================================================================
33
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
44
*
@@ -179,7 +179,7 @@ BN_BLINDING_free(BN_BLINDING *r)
179179
}
180180

181181
static int
182-
BN_BLINDING_setup(BN_BLINDING *ret, BN_CTX *ctx)
182+
BN_BLINDING_setup(BN_BLINDING *b, BN_CTX *ctx)
183183
{
184184
int retry_counter = 32;
185185

@@ -188,9 +188,9 @@ BN_BLINDING_setup(BN_BLINDING *ret, BN_CTX *ctx)
188188
* we have basically factored mod = (p-1)(q-1)...
189189
*/
190190
do {
191-
if (!BN_rand_range(ret->A, ret->mod))
191+
if (!BN_rand_range(b->A, b->mod))
192192
return 0;
193-
if (BN_mod_inverse_ct(ret->Ai, ret->A, ret->mod, ctx) == NULL) {
193+
if (BN_mod_inverse_ct(b->Ai, b->A, b->mod, ctx) == NULL) {
194194
/* this should almost never happen for good RSA keys */
195195
unsigned long error = ERR_peek_last_error();
196196
if (ERR_GET_REASON(error) == BN_R_NO_INVERSE) {
@@ -205,12 +205,12 @@ BN_BLINDING_setup(BN_BLINDING *ret, BN_CTX *ctx)
205205
break;
206206
} while (1);
207207

208-
if (ret->bn_mod_exp != NULL && ret->m_ctx != NULL) {
209-
if (!ret->bn_mod_exp(ret->A, ret->A, ret->e, ret->mod,
210-
ctx, ret->m_ctx))
208+
if (b->bn_mod_exp != NULL && b->m_ctx != NULL) {
209+
if (!b->bn_mod_exp(b->A, b->A, b->e, b->mod,
210+
ctx, b->m_ctx))
211211
return 0;
212212
} else {
213-
if (!BN_mod_exp_ct(ret->A, ret->A, ret->e, ret->mod, ctx))
213+
if (!BN_mod_exp_ct(b->A, b->A, b->e, b->mod, ctx))
214214
return 0;
215215
}
216216

0 commit comments

Comments
 (0)