summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdsa/ecdsa.h
diff options
context:
space:
mode:
authortb <>2023-06-18 17:50:28 +0000
committertb <>2023-06-18 17:50:28 +0000
commited9558e47b61cf3390cda693f01afa48b775003a (patch)
treefe798daf9a9417a5e95118e774aa68b2ff748ab9 /src/lib/libcrypto/ecdsa/ecdsa.h
parent90d71a9e40be2f46f642829af37b1bd2b6d292f3 (diff)
downloadopenbsd-ed9558e47b61cf3390cda693f01afa48b775003a.tar.gz
openbsd-ed9558e47b61cf3390cda693f01afa48b775003a.tar.bz2
openbsd-ed9558e47b61cf3390cda693f01afa48b775003a.zip
tls_signer: reinstate the default EC_KEY methods
Previously, we would set the ECDSA_METHOD on the EC_KEY, which, by way of lovely indirection in our three crypto/ec* directories ended up having no effect on the default methods. Now that we set a new EC_KEY_METHOD, we need to make sure we still have the other handlers that we might need. Like so many things that were made opaque in the 1.1 re"design", the accessors were written without actual application code in mind. In particular, EC_KEY_METHOD lacks a dup(). This means we get to fetch the default methods with getters and then set them again on the new method. This is particularly awesome because once someone adds a new method to the opaque struct, all applications will have to adapt and do a get/set dance. So far this is very reminiscent of PostgreSQL with BIO_meth_* https://github.com/postgres/postgres/blob/a14e75eb0b6a73821e0d66c0d407372ec8376105/src/interfaces/libpq/fe-secure-openssl.c#L1921-L1928 Only it's worse here because someone wanted to be smart and save a few public functions, so we have to use getters that get several functions at once. Which in turn means we need to have function pointers with the precise signatures which are part of the struct that was made opaque. We will add a EC_KEY_METHOD_dup() in the next bump, but for now this is the best fix we can have. Whenever you think you've seen the worst turds in this code base, you find another one that could serve as an exemplar. ok jsing op
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecdsa.h')
0 files changed, 0 insertions, 0 deletions