summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
authorjsing <>2023-01-14 15:23:27 +0000
committerjsing <>2023-01-14 15:23:27 +0000
commit084bc92f915a6224b074c53efb55f3f8b277d2e2 (patch)
treefe78146c3f1d3c3f0ea9d686c786d98adbffd2a5 /src/lib/libc
parentd6fac2b07b688bc81647b272f5fa500c41e3e68a (diff)
downloadopenbsd-084bc92f915a6224b074c53efb55f3f8b277d2e2.tar.gz
openbsd-084bc92f915a6224b074c53efb55f3f8b277d2e2.tar.bz2
openbsd-084bc92f915a6224b074c53efb55f3f8b277d2e2.zip
Rewrite BN_CTX.
The current BN_CTX implementation is an incredibly overengineered piece of code, which even includes its own debug system. Rewrite BN_CTX from scratch, simplifying things things considerably by having a "stack" of BIGNUM pointers and a matching array of group assignments. This means that BN_CTX_start() and BN_CTX_end() effectively do not fail. Unlike the previous implementation, if a failure occurs nothing will work and the BN_CTX must be freed/recreated, instead of trying to pick up at the point where the failure occurred (which does not make sense given its intended usage). Additionally, it has long been documented that BN_CTX_start() must be called before BN_CTX_get() can be used, however the previous implementation did not actually enforce this. Now that missing BN_CTX_start() and BN_CTX_end() calls have been added to DSA and EC, we can actually make this a hard requirement. ok tb@
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions