summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/sha256.c
diff options
context:
space:
mode:
authorjsing <>2023-05-28 10:34:17 +0000
committerjsing <>2023-05-28 10:34:17 +0000
commit5e6b0540238c981b8b8d04ce22ec411533860222 (patch)
tree63ba3aab3d0858fe20ca0250c3e68fb563dd2ea0 /src/lib/libcrypto/sha/sha256.c
parentce5a260afb8e68d35e4e7d5d0a4a86a2e0c94e84 (diff)
downloadopenbsd-5e6b0540238c981b8b8d04ce22ec411533860222.tar.gz
openbsd-5e6b0540238c981b8b8d04ce22ec411533860222.tar.bz2
openbsd-5e6b0540238c981b8b8d04ce22ec411533860222.zip
Rewrite BN_{asc,dec,hex}2bn() using CBS.
This gives us more readable and safer code. There are two intentional changes to behaviour - firstly, all three functions zero any BN that was passed in, prior to doing any further processing. This means that a passed BN is always in a known state, regardless of what happens later. Secondly, BN_asc2bn() now fails on NULL input, rather than crashing. This brings its behaviour inline with BN_dec2bn() and BN_hex2bn(). ok tb@
Diffstat (limited to 'src/lib/libcrypto/sha/sha256.c')
0 files changed, 0 insertions, 0 deletions