mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +03:00
[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>
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user