code: public boolean verifyRevocationStatus(javax.security.cert.X509Certificate[] peerCertificates)
              throws CertificateVerificationException {
  
          X509Certificate[] convertedCertificates = convert(peerCertificates);
  
          long start = System.currentTimeMillis();
          // If not set by the user, default cache size will be 50 and default cache delay will be 15 mins.
          OCSPCache ocspCache = OCSPCache.getCache();
          ocspCache.init(cacheSize, cacheDelayMins);
          CRLCache crlCache = CRLCache.getCache();
          crlCache.init(cacheSize, cacheDelayMins);
  
          RevocationVerifier[] verifiers = { new OCSPVerifier(ocspCache), new CRLVerifier(crlCache) };
  
          for (RevocationVerifier verifier : verifiers) {
              try {
                  CertificatePathValidator pathValidator = new CertificatePathValidator(convertedCertificates, verifier);
                  pathValidator.validatePath();
                  if (LOG.isInfoEnabled()) {
                      LOG.info("Path verification is successful. Took {} ms.", System.currentTimeMillis() - start);
                  }
                  return true;
              } catch (Exception e) {
                  if (LOG.isDebugEnabled()) {
                      LOG.debug("{} failed.", verifier.getClass().getSimpleName());
                      LOG.debug("Certificate verification with {} failed. ", verifier.getClass().getSimpleName(), e);
                  }
              }
          }
          throw new CertificateVerificationException("Path verification failed for both OCSP and CRL");
      }
docs: This method first tries to verify the given certificate chain using OCSP since OCSP verification is
  faster. If that fails it tries to do the verification using CRL.
  
  @param peerCertificates javax.security.cert.X509Certificate[] array of peer certificate chain from peer/client.
  @throws CertificateVerificationException Occurs when certificate fails to be validated from both OCSP and CRL.
  @return true If the process of certificate revocation becomes successful.