diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-05-08 10:36:09 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-05-08 12:49:01 +0100 |
commit | 0ad8b601dd190912b1338155b000d577205c4e02 (patch) | |
tree | cdcbaa7520dd84b640aa0b576aab77c532791e96 /src/crypto/x509.c | |
parent | 6ba7fb7c5cdcdfa6f32dd1a97c3ab235ffe54616 (diff) | |
download | ipxe-0ad8b601dd190912b1338155b000d577205c4e02.tar.gz |
[crypto] Allow for X.509 certificates with no common name
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto/x509.c')
-rw-r--r-- | src/crypto/x509.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/x509.c b/src/crypto/x509.c index be2e1009d..3261b8eb6 100644 --- a/src/crypto/x509.c +++ b/src/crypto/x509.c @@ -570,7 +570,7 @@ static int x509_parse_common_name ( struct x509_certificate *cert, char **name, return rc; } - /* Allocate name */ + /* Allocate and copy name */ *name = zalloc ( name_cursor.len + 1 /* NUL */ ); if ( ! *name ) return -ENOMEM; @@ -578,9 +578,9 @@ static int x509_parse_common_name ( struct x509_certificate *cert, char **name, return 0; } + /* Certificates may not have a commonName */ DBGC ( cert, "X509 %p no commonName found:\n", cert ); - DBGC_HDA ( cert, 0, raw->data, raw->len ); - return -ENOENT; + return 0; } /** |