Clarify documentation about missing CRLs
Also tune up some working while at it.
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 6dc5ad3..0606eb9 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -1600,7 +1600,8 @@
}
/*
- * Check that the given certificate is valid according to the CRL.
+ * Check that the given certificate is not revoked according to the CRL.
+ * Skip validation is no CRL for the given CA is present.
*/
static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
mbedtls_x509_crl *crl_list,
@@ -1613,12 +1614,6 @@
if( ca == NULL )
return( flags );
- /*
- * TODO: What happens if no CRL is present?
- * Suggestion: Revocation state should be unknown if no CRL is present.
- * For backwards compatibility this is not yet implemented.
- */
-
while( crl_list != NULL )
{
if( crl_list->version == 0 ||