summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/dsa/dsa_ossl.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2017-01-21 10:38:29 +0000
committerbeck <beck@openbsd.org>2017-01-21 10:38:29 +0000
commit44adc1eac90b19e731ed767b8523ee067b63713a (patch)
treead2d2fed1b8bb12b462bdabe3acea9519d5fff18 /lib/libcrypto/dsa/dsa_ossl.c
parentHaving a 'case 256:' in a switch (<uchar>) {} is bad on principle (diff)
downloadwireguard-openbsd-44adc1eac90b19e731ed767b8523ee067b63713a.tar.xz
wireguard-openbsd-44adc1eac90b19e731ed767b8523ee067b63713a.zip
Split out BN_div and BN_mod into ct and nonct versions for Internal use.
ok jsing@
Diffstat (limited to 'lib/libcrypto/dsa/dsa_ossl.c')
-rw-r--r--lib/libcrypto/dsa/dsa_ossl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcrypto/dsa/dsa_ossl.c b/lib/libcrypto/dsa/dsa_ossl.c
index 3f01a83a446..4177557d0ec 100644
--- a/lib/libcrypto/dsa/dsa_ossl.c
+++ b/lib/libcrypto/dsa/dsa_ossl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsa_ossl.c,v 1.27 2017/01/21 09:38:59 beck Exp $ */
+/* $OpenBSD: dsa_ossl.c,v 1.28 2017/01/21 10:38:29 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -244,7 +244,7 @@ dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
goto err;
}
- if (!BN_mod(r,r,dsa->q,ctx))
+ if (!BN_mod_ct(r,r,dsa->q,ctx))
goto err;
/* Compute part of 's = inv(k) (m + xr) mod q' */
@@ -351,10 +351,10 @@ dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa)
mont))
goto err;
}
-
+
/* BN_copy(&u1,&t1); */
/* let u1 = u1 mod q */
- if (!BN_mod(&u1, &t1, dsa->q, ctx))
+ if (!BN_mod_ct(&u1, &t1, dsa->q, ctx))
goto err;
/* V is now in u1. If the signature is correct, it will be