mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-11 16:23:47 +00:00
[crypto] Return a NULL X.509 certificate if construction fails
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
f20c3742e7
commit
c923d57663
@ -1068,6 +1068,7 @@ int x509_certificate ( const void *data, size_t len,
|
||||
/* Parse certificate */
|
||||
if ( ( rc = x509_parse ( *cert, &cursor ) ) != 0 ) {
|
||||
x509_put ( *cert );
|
||||
*cert = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user