mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[crypto] Allow for X.509 certificates with no common name
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1399,7 +1399,8 @@ static int tls_new_certificate ( struct tls_session *tls,
|
||||
assert ( cert != NULL );
|
||||
|
||||
/* Verify server name */
|
||||
if ( strcmp ( tls->name, cert->subject.name ) != 0 ) {
|
||||
if ( ( cert->subject.name == NULL ) ||
|
||||
( strcmp ( cert->subject.name, tls->name ) != 0 ) ) {
|
||||
DBGC ( tls, "TLS %p server name incorrect (expected %s, got "
|
||||
"%s)\n", tls, tls->name, cert->subject.name );
|
||||
return -EACCES_WRONG_NAME;
|
||||
|
||||
Reference in New Issue
Block a user