public static OCSPResponse getInstance( ASN1TaggedObject obj, boolean explicit) { return getInstance(ASN1Sequence.getInstance(obj, explicit)); }
public static OCSPResponse getInstance( ASN1TaggedObject obj, boolean explicit) { return getInstance(ASN1Sequence.getInstance(obj, explicit)); }
private OCSPResp( ASN1InputStream aIn) throws IOException { try { this.resp = OCSPResponse.getInstance(aIn.readObject()); } catch (IllegalArgumentException e) { throw new IOException("malformed response: " + e.getMessage()); } catch (ClassCastException e) { throw new IOException("malformed response: " + e.getMessage()); } }
private static void validateInfoFormat(OtherRevocationInfoFormat infoFormat) { if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(infoFormat.getInfoFormat())) { OCSPResponse resp = OCSPResponse.getInstance(infoFormat.getInfo()); if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL) { throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData"); } } }
private static void validateInfoFormat(OtherRevocationInfoFormat infoFormat) { if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(infoFormat.getInfoFormat())) { OCSPResponse resp = OCSPResponse.getInstance(infoFormat.getInfo()); if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL) { throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData"); } } }
private OCSPResp( ASN1InputStream aIn) throws IOException { try { this.resp = OCSPResponse.getInstance(aIn.readObject()); } catch (IllegalArgumentException e) { throw new CertIOException("malformed response: " + e.getMessage(), e); } catch (ClassCastException e) { throw new CertIOException("malformed response: " + e.getMessage(), e); } catch (ASN1Exception e) { throw new CertIOException("malformed response: " + e.getMessage(), e); } if (resp == null) { throw new CertIOException("malformed response: no response data found"); } }
private OCSPResp( ASN1InputStream aIn) throws IOException { try { this.resp = OCSPResponse.getInstance(aIn.readObject()); } catch (IllegalArgumentException e) { throw new CertIOException("malformed response: " + e.getMessage(), e); } catch (ClassCastException e) { throw new CertIOException("malformed response: " + e.getMessage(), e); } catch (ASN1Exception e) { throw new CertIOException("malformed response: " + e.getMessage(), e); } if (resp == null) { throw new CertIOException("malformed response: no response data found"); } }
/** * Parse a {@link CertificateStatus} from an {@link InputStream}. * * @param input * the {@link InputStream} to parse from. * @return a {@link CertificateStatus} object. * @throws IOException */ public static CertificateStatus parse(InputStream input) throws IOException { short status_type = TlsUtils.readUint8(input); Object response; switch (status_type) { case CertificateStatusType.ocsp: { byte[] derEncoding = TlsUtils.readOpaque24(input); response = OCSPResponse.getInstance(TlsUtils.readDERObject(derEncoding)); break; } default: throw new TlsFatalAlert(AlertDescription.decode_error); } return new CertificateStatus(status_type, response); }
/** * Parse a {@link CertificateStatus} from an {@link InputStream}. * * @param input * the {@link InputStream} to parse from. * @return a {@link CertificateStatus} object. * @throws IOException */ public static CertificateStatus parse(InputStream input) throws IOException { short status_type = TlsUtils.readUint8(input); Object response; switch (status_type) { case CertificateStatusType.ocsp: { byte[] derEncoding = TlsUtils.readOpaque24(input); response = OCSPResponse.getInstance(TlsUtils.readDERObject(derEncoding)); break; } default: throw new TlsFatalAlert(AlertDescription.decode_error); } return new CertificateStatus(status_type, response); }
break; case TAG_OCSPRESPONSE: value = OCSPResponse.getInstance(choice, false); break; case TAG_CAPABILITIES: