]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Pass asymmetric keys as ASN.1 cursors
authorMichael Brown <mcb30@ipxe.org>
Sun, 18 Aug 2024 09:43:52 +0000 (10:43 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sun, 18 Aug 2024 14:44:38 +0000 (15:44 +0100)
commit53f089b723e16eecb4fd2e2a59b74b3932431b30
treeb18d3ae4d8de119a6afb23c01ea3e9df069a0173
parent950f6b5861d8d6b247b37e4e1401d26d8f908ee8
[crypto] Pass asymmetric keys as ASN.1 cursors

Asymmetric keys are invariably encountered within ASN.1 structures
such as X.509 certificates, and the various large integers within an
RSA key are themselves encoded using ASN.1.

Simplify all code handling asymmetric keys by passing keys as a single
ASN.1 cursor, rather than separate data and length pointers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/cms.c
src/crypto/crypto_null.c
src/crypto/ocsp.c
src/crypto/rsa.c
src/crypto/x509.c
src/drivers/net/iphone.c
src/include/ipxe/crypto.h
src/net/tls.c
src/tests/pubkey_test.h
src/tests/rsa_test.c