summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-04-05 11:31:38 +0000
committertb <>2023-04-05 11:31:38 +0000
commit08c223a5e62a7d945c7fcb799b68086a283d786f (patch)
tree62c7111ae621ddd7631b3bc8997acb5f20a6efde /src/lib
parente8c1a52cfab8796d0aed6aead31cc8e12c4b09d3 (diff)
downloadopenbsd-08c223a5e62a7d945c7fcb799b68086a283d786f.tar.gz
openbsd-08c223a5e62a7d945c7fcb799b68086a283d786f.tar.bz2
openbsd-08c223a5e62a7d945c7fcb799b68086a283d786f.zip
Add a few missing braces
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c
index 089b8782d5..b307a8bd88 100644
--- a/src/lib/libcrypto/rsa/rsa_eay.c
+++ b/src/lib/libcrypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_eay.c,v 1.57 2023/04/05 11:30:12 tb Exp $ */ 1/* $OpenBSD: rsa_eay.c,v 1.58 2023/04/05 11:31:38 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -226,10 +226,11 @@ RSA_eay_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
226 goto err; 226 goto err;
227 } 227 }
228 228
229 if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) 229 if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) {
230 if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, 230 if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n,
231 CRYPTO_LOCK_RSA, rsa->n, ctx)) 231 CRYPTO_LOCK_RSA, rsa->n, ctx))
232 goto err; 232 goto err;
233 }
233 234
234 if (!rsa->meth->bn_mod_exp(ret, f, rsa->e, rsa->n, ctx, 235 if (!rsa->meth->bn_mod_exp(ret, f, rsa->e, rsa->n, ctx,
235 rsa->_method_mod_n)) 236 rsa->_method_mod_n))
@@ -656,10 +657,11 @@ RSA_eay_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
656 goto err; 657 goto err;
657 } 658 }
658 659
659 if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) 660 if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) {
660 if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, 661 if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n,
661 CRYPTO_LOCK_RSA, rsa->n, ctx)) 662 CRYPTO_LOCK_RSA, rsa->n, ctx))
662 goto err; 663 goto err;
664 }
663 665
664 if (!rsa->meth->bn_mod_exp(ret, f, rsa->e, rsa->n, ctx, 666 if (!rsa->meth->bn_mod_exp(ret, f, rsa->e, rsa->n, ctx,
665 rsa->_method_mod_n)) 667 rsa->_method_mod_n))
@@ -736,10 +738,11 @@ RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
736 } 738 }
737 } 739 }
738 740
739 if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) 741 if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) {
740 if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, 742 if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n,
741 CRYPTO_LOCK_RSA, rsa->n, ctx)) 743 CRYPTO_LOCK_RSA, rsa->n, ctx))
742 goto err; 744 goto err;
745 }
743 746
744 /* compute I mod q */ 747 /* compute I mod q */
745 BN_init(&c); 748 BN_init(&c);