// Select a method to check revocation status.
boolean useOCSP = OCSPClient.getOCSPURLs(certificate).size() > 0;
boolean useCRL = CRLDownloader.getCRLDistributionPoints(certificate).size() > 0;
if (!useOCSP && !useCRL) {
throw new NoRevocationStatusException(
String.format(messages.getString(
"Certificate_has_no_method_to_verify_revocation_status__%s"),
CertificateValidator.getCertificateName(certificate)));
}