summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_lib.c
diff options
context:
space:
mode:
authorjsing <>2023-01-31 05:16:52 +0000
committerjsing <>2023-01-31 05:16:52 +0000
commit4fa795073d8bd6eef6356b0a3cee6eaa70c93988 (patch)
tree89342ff559044bab73963cc74c1c24831e4c6592 /src/lib/libcrypto/dsa/dsa_lib.c
parentf778e2dfb38549abc1d2b20ea58318a0056beca0 (diff)
downloadopenbsd-4fa795073d8bd6eef6356b0a3cee6eaa70c93988.tar.gz
openbsd-4fa795073d8bd6eef6356b0a3cee6eaa70c93988.tar.bz2
openbsd-4fa795073d8bd6eef6356b0a3cee6eaa70c93988.zip
Correctly detect b < a in BN_usub().
BN_usub() requires that a >= b and should return an error in the case that b < a. This is currently only detected by checking the number of words in a versus b - if they have the same number of words, the top word is not checked and b < a, which then succeeds and produces an incorrect result. Fix this by checking for the case where a and b have an equal number of words, yet there is a borrow returned from bn_sub_words(). ok miod@ tb@
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_lib.c')
0 files changed, 0 insertions, 0 deletions