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