Support faulty X509 v1 certificates with extensions
(POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3)
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 49cda66..1fa779c 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -697,15 +697,19 @@
}
}
+#if !defined(POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3)
if( crt->version == 3 )
{
+#endif
ret = x509_get_crt_ext( &p, end, crt);
if( ret != 0 )
{
x509_crt_free( crt );
return( ret );
}
+#if !defined(POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3)
}
+#endif
if( p != end )
{