title: how to get x 509 certificate status by bouncy castle
body: <p>hi all i am trying to get x 509 certificate status by bouncy castle
  i am following following steps:-</p>
  
  <p>1) Read user Certificate
  2) Get path of user certificate to test it is good or revoked
  3) Read CA Certificate
  4) Read CA Certificate to connect to ocsp responder..");
  5) Generate OCSP Request
  6) OCSP Resonder URL
  7) Check errors in response:</p>
  
  <pre><code>                // check if response code is other than 200 then throw
                  // exception
                  if (con.getResponseCode() / 100 != 2) {
                      throw new Exception("***Error***");
                  }
  
                  // Get Response
                  InputStream in = (InputStream) con.getContent();
                  OCSPResp ocspResponse = new OCSPResp(in);
  
                  System.out.println(ocspResponse.getStatus());
  </code></pre>
  
  <p>// here we are getting response code 6 for all types of user certificates both revoked certificate as well as good certificate.
  Can anyone help?</p>