[crypto] Add support for subjectAltName and wildcard certificates

Originally-implemented-by: Alex Chernyakhovsky <achernya@google.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2014-03-31 01:11:06 +01:00
parent f1c5f86eef
commit f10726c8bb
4 changed files with 160 additions and 8 deletions

View File

@@ -1023,7 +1023,16 @@ static void x509_test_exec ( void ) {
/* Check certificate names */
x509_check_name_ok ( &server_crt, "boot.test.ipxe.org" );
x509_check_name_ok ( &server_crt, "demo.test.ipxe.org" );
x509_check_name_fail_ok ( &server_crt, "incorrect.test.ipxe.org" );
x509_check_name_ok ( &server_crt, "anything.alt.test.ipxe.org" );
x509_check_name_ok ( &server_crt, "wildcard.alt.test.ipxe.org" );
x509_check_name_fail_ok ( &server_crt, "sub.domain.alt.test.ipxe.org" );
x509_check_name_fail_ok ( &server_crt, "alt.test.ipxe.org" );
x509_check_name_fail_ok ( &server_crt, "test.ipxe.org" );
x509_check_name_fail_ok ( &server_crt, "ipxe.org" );
x509_check_name_fail_ok ( &server_crt, "org" );
x509_check_name_fail_ok ( &server_crt, "" );
/* Parse all certificate chains */
x509_chain_ok ( &server_chain );