acme-client: simplify elliptic curve signatures
authortb <tb@openbsd.org>
Sun, 18 Dec 2022 12:27:58 +0000 (12:27 +0000)
committertb <tb@openbsd.org>
Sun, 18 Dec 2022 12:27:58 +0000 (12:27 +0000)
commiteb2dd7b0e9be57a0de8eac4ca8def554feb53022
treeb63746f918f827d41d68dd2a86d196ff1d6e949a
parent5ab53ec13d7374bb9c8bdc5443775672917af9ab
acme-client: simplify elliptic curve signatures

We can get the correct size of the signature using EVP_PKEY_bits() which
uses the order instead of the (strictly speaking incorrect) degree. Grab
the (r, s) out of the ECDSA signature with ECDSA_SIG_get0_{r,s}(), which
is a saner interface than EVP_SIG_get0(). Finally, do the zero padding
using BN_bn2binpad() which is simpler than the currently rather fiddly
solution.

ok jsing
usr.sbin/acme-client/acctproc.c