summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/rsa/rsa_method_test.c
diff options
context:
space:
mode:
authortb <>2025-01-05 16:07:08 +0000
committertb <>2025-01-05 16:07:08 +0000
commit26c9248a10bd0d95f47397e21bc2f056e53e19c8 (patch)
tree01052cd554006bd8d0b366164df08e22b7dd6d57 /src/regress/lib/libcrypto/rsa/rsa_method_test.c
parent7d80fee84377d3dd9365558712de411fc7f8356b (diff)
downloadopenbsd-26c9248a10bd0d95f47397e21bc2f056e53e19c8.tar.gz
openbsd-26c9248a10bd0d95f47397e21bc2f056e53e19c8.tar.bz2
openbsd-26c9248a10bd0d95f47397e21bc2f056e53e19c8.zip
Move BIGNUMs in EC_GROUP and EC_POINT to the heap
The only way to get an EC_GROUP or an EC_POINT is by calling the relevant _new() function and to get rid of it, something must call _free(). Thus we can establish the invariant that every group has Weierstrass coefficients p, a, b as well as order and cofactor hanging off it. Similarly, Every point has allocated BIGNUMs for its Jacobian projective coordinates. Unfortunately, a group has the generator as an optional component in addition to seed and montgomery context/one (where optionality makes more sense). This is a mostly mechanical diff and only drops a few silly comments and a couple of unnecessary NULL checks since in our part of the wrold the word invariant has a meaning. This should also appease Coverity who likes to throw fits at calling BN_free() for BIGNUM on the stack (yes, this is actually a thing). ok jsing
Diffstat (limited to 'src/regress/lib/libcrypto/rsa/rsa_method_test.c')
0 files changed, 0 insertions, 0 deletions