diff options
author | Michael Brown | 2012-05-22 00:00:08 +0200 |
---|---|---|
committer | Michael Brown | 2012-05-22 00:21:36 +0200 |
commit | c923d57663183da3b738dbc9f999d3e2e620305b (patch) | |
tree | 3d4be4c7b8f5183ee562f367370fa35edc1edecb /src/crypto | |
parent | [crypto] Accept UTCTime/GeneralizedTime with no "seconds" field (diff) | |
download | ipxe-c923d57663183da3b738dbc9f999d3e2e620305b.tar.gz ipxe-c923d57663183da3b738dbc9f999d3e2e620305b.tar.xz ipxe-c923d57663183da3b738dbc9f999d3e2e620305b.zip |
[crypto] Return a NULL X.509 certificate if construction fails
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/x509.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/x509.c b/src/crypto/x509.c index 18a8cebe..2180173b 100644 --- a/src/crypto/x509.c +++ b/src/crypto/x509.c @@ -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; } |