SingleResp[] singleResps = basicOCSPResp.getResponses();
List<ValidationError> errors = new ArrayList<ValidationError>();
for (SingleResp singleResp : singleResps) {
CertificateStatus status = singleResp.getCertStatus();
if (status != null) {
RevokeReason revokeReason = null;
if (status instanceof RevokedStatus) {
RevokedStatus revokedStatus = (RevokedStatus) status;
revokeReason = RevokeReason.getByCode(revokedStatus.getRevocationReason());
}
if (revokeReason != null) {
errors.add(new ValidationError(OCSPCertificateValidator.VALIDATOR_NAME, "Certificate revoked(" + revokeReason.name() + ")"));
} else {
errors.add(new ValidationError(OCSPCertificateValidator.VALIDATOR_NAME, "Certificate revoked(Unknow)"));
}
}
}