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)); }
/** * This method allows to create a {@code OCSPResp} from a {@code DERSequence}. * * @param otherRevocationInfoMatch {@code DERSequence} to convert to {@code OCSPResp} * @return {@code OCSPResp} */ public static OCSPResp getOcspResp(final DERSequence otherRevocationInfoMatch) { OCSPResp ocspResp = null; try { final OCSPResponse ocspResponse = OCSPResponse.getInstance(otherRevocationInfoMatch); ocspResp = new OCSPResp(ocspResponse); } catch (Exception e) { LOG.error("Impossible to create OCSPResp from DERSequence!", e); } return ocspResp; }
/** * 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:
break; case TAG_OCSPRESPONSE: value = OCSPResponse.getInstance(choice, false); break; case TAG_CAPABILITIES: