]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Report meaningful error when certificate chain validation fails
authorMichael Brown <mcb30@ipxe.org>
Fri, 10 May 2013 09:03:56 +0000 (10:03 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 10 May 2013 09:03:56 +0000 (10:03 +0100)
commitcb29cd4298f07c35ac2099f56bd9895a9160e3a2
tree58fe2b159ad70ccff4fc5d79402fe2f06f5e3857
parent8bc20c1aa09ec521476f4b35b0a09c21e2e1e5f3
[crypto] Report meaningful error when certificate chain validation fails

If a certificate chain contains no certificate which can be validated
as a standalone certificate (i.e. contains no trusted root
certificates or previously-validated certificates) then iPXE will
currently return a fixed error EACCES_UNTRUSTED.  This masks the
actual errors obtained when attempting to validate each certificate as
a standalone certificate, and so makes troubleshooting difficult for
the end user.

Fix by instead returning the error obtained when attempting to
validate the final certificate in the chain as a standalone
certificate.  This error is most likely (though not guaranteed) to
represent the "real" problem.

Reported-by: Sven Dreyer <sven@dreyer-net.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/x509.c