diff options
Diffstat (limited to 'Source/lib/crypto/x509.c')
-rwxr-xr-x | Source/lib/crypto/x509.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/lib/crypto/x509.c b/Source/lib/crypto/x509.c index 28e7d1898..86a595618 100755 --- a/Source/lib/crypto/x509.c +++ b/Source/lib/crypto/x509.c @@ -883,7 +883,8 @@ x509_t *x509_create_from_chunk(chunk_t chunk) /* we do not use a per-instance logger right now, since its not always accessible */ logger = logger_manager->get_logger(logger_manager, ASN1); - if (!parse_x509cert(chunk, 0, this)) + if (!is_asn1(chunk) || + !parse_x509cert(chunk, 0, this)) { destroy(this); return NULL; |