code: public static RevocationStatus check(X509Certificate cert,
                                           X509Certificate issuerCert)
          throws IOException, CertPathValidatorException {
          CertId certId = null;
          URI responderURI = null;
          try {
              X509CertImpl certImpl = X509CertImpl.toImpl(cert);
              responderURI = getResponderURI(certImpl);
              if (responderURI == null) {
                  throw new CertPathValidatorException
                      ("No OCSP Responder URI in certificate");
              }
              certId = new CertId(issuerCert, certImpl.getSerialNumberObject());
          } catch (CertificateException | IOException e) {
              throw new CertPathValidatorException
                  ("Exception while encoding OCSPRequest", e);
          }
          OCSPResponse ocspResponse = check(Collections.singletonList(certId),
              responderURI, issuerCert, null, null,
              Collections.<Extension>emptyList());
          return (RevocationStatus)ocspResponse.getSingleResponse(certId);
      }
docs: Obtains the revocation status of a certificate using OCSP using the most
  common defaults. The OCSP responder URI is retrieved from the
  certificate's AIA extension. The OCSP responder certificate is assumed
  to be the issuer's certificate (or issued by the issuer CA).
  
  @param cert the certificate to be checked
  @param issuerCert the issuer certificate
  @return the RevocationStatus
  @throws IOException if there is an exception connecting to or
  communicating with the OCSP responder
  @throws CertPathValidatorException if an exception occurs while
  encoding the OCSP Request or validating the OCSP Response