summaryrefslogtreecommitdiffstats
path: root/src/net/validator.c
diff options
context:
space:
mode:
authorMichael Brown2014-03-25 16:01:32 +0100
committerMichael Brown2014-03-25 17:30:43 +0100
commit01fa7efa38060c010103d444b47a2cd3ff684f82 (patch)
treeaa9eaf98352260b208691559165696b71fb05812 /src/net/validator.c
parent[ocsp] Handle OCSP responses that don't provide certificates (diff)
downloadipxe-01fa7efa38060c010103d444b47a2cd3ff684f82.tar.gz
ipxe-01fa7efa38060c010103d444b47a2cd3ff684f82.tar.xz
ipxe-01fa7efa38060c010103d444b47a2cd3ff684f82.zip
[crypto] Remove dynamically-allocated storage for certificate name
iPXE currently allocates a copy the certificate's common name as a string. This string is used by the TLS and CMS code to check certificate names against an expected name, and also appears in debugging messages. Provide a function x509_check_name() to centralise certificate name checking (in preparation for adding subjectAlternativeName support), and a function x509_name() to provide a name to be used in debugging messages, and remove the dynamically allocated string. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/validator.c')
-rw-r--r--src/net/validator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/validator.c b/src/net/validator.c
index 1de3bb9d..7913ed64 100644
--- a/src/net/validator.c
+++ b/src/net/validator.c
@@ -179,7 +179,7 @@ static int validator_append ( struct validator *validator,
}
cert = x509_last ( certs );
DBGC ( validator, "VALIDATOR %p found certificate %s\n",
- validator, cert->subject.name );
+ validator, x509_name ( cert ) );
/* Move to next certificate */
asn1_skip_any ( &cursor );