Fix CRL printing to correctly show when there are no revoked certificates.
[openssl.git] / crypto / asn1 / t_crl.c
index f7b938bde2ec011174f0d53ca6a1607618214946..ab9cd8fcffa5d5bde934a8b889067caf974bfc3d 100644 (file)
@@ -112,7 +112,7 @@ int X509_CRL_print(BIO *out, X509_CRL *x)
 
        rev = X509_CRL_get_REVOKED(x);
 
-       if(sk_X509_REVOKED_num(rev))
+       if(sk_X509_REVOKED_num(rev) > 0)
            BIO_printf(out, "Revoked Certificates:\n");
        else BIO_printf(out, "No Revoked Certificates.\n");