]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Generalise X.509 cache to a full certificate store
authorMichael Brown <mcb30@ipxe.org>
Fri, 28 Mar 2014 15:45:10 +0000 (15:45 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 28 Mar 2014 17:09:40 +0000 (17:09 +0000)
commitbc8ca6b8cea325e6507839e576d0d7eaa44e2af1
treed74ee501d55b6dbaa5f5842c697e57295776b82e
parent2dd3fffe18577baa9619623e627adacefd51fca9
[crypto] Generalise X.509 cache to a full certificate store

Expand the concept of the X.509 cache to provide the functionality of
a certificate store.  Certificates in the store will be automatically
used to complete certificate chains where applicable.

The certificate store may be prepopulated at build time using the
CERT=... build command line option.  For example:

  make bin/ipxe.usb CERT=mycert1.crt,mycert2.crt

Certificates within the certificate store are not implicitly trusted;
the trust list is specified using TRUST=... as before.  For example:

  make bin/ipxe.usb CERT=root.crt TRUST=root.crt

This can be used to embed the full trusted root certificate within the
iPXE binary, which is potentially useful in an HTTPS-only environment
in which there is no HTTP server from which to automatically download
cross-signed certificates or other certificate chain fragments.

This usage of CERT= extends the existing use of CERT= to specify the
client certificate.  The client certificate is now identified
automatically by checking for a match against the private key.  For
example:

  make bin/ipxe.usb CERT=root.crt,client.crt TRUST=root.crt KEY=client.key

Signed-off-by: Michael Brown <mcb30@ipxe.org>
18 files changed:
src/Makefile
src/Makefile.housekeeping
src/crypto/certstore.c [new file with mode: 0644]
src/crypto/clientcert.c [deleted file]
src/crypto/cms.c
src/crypto/privkey.c [new file with mode: 0644]
src/crypto/x509.c
src/include/ipxe/certstore.h [new file with mode: 0644]
src/include/ipxe/clientcert.h [deleted file]
src/include/ipxe/cms.h
src/include/ipxe/privkey.h [new file with mode: 0644]
src/include/ipxe/tls.h
src/include/ipxe/x509.h
src/net/tls.c
src/net/validator.c
src/tests/cms_test.c
src/tests/x509_test.c
src/usr/imgtrust.c