public static OCSPResponse getInstance( ASN1TaggedObject obj, boolean explicit) { return getInstance(ASN1Sequence.getInstance(obj, explicit)); }
public static OCSPResponse getInstance( Object obj) { if (obj instanceof OCSPResponse) { return (OCSPResponse)obj; } else if (obj != null) { return new OCSPResponse(ASN1Sequence.getInstance(obj)); } return null; }
/** * return the ASN.1 encoded representation of this object. */ public byte[] getEncoded() throws IOException { return resp.getEncoded(); }
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"); } } }
public int hashCode() { return resp.hashCode(); } }
public int getStatus() { return this.resp.getResponseStatus().getValue().intValue(); }
public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof OCSPResp)) { return false; } OCSPResp r = (OCSPResp)o; return resp.equals(r.resp); }
public Object getResponseObject() throws OCSPException { ResponseBytes rb = this.resp.getResponseBytes(); if (rb == null) { return null; } if (rb.getResponseType().equals(OCSPObjectIdentifiers.id_pkix_ocsp_basic)) { try { ASN1Primitive obj = ASN1Primitive.fromByteArray(rb.getResponse().getOctets()); return new BasicOCSPResp(BasicOCSPResponse.getInstance(obj)); } catch (Exception e) { throw new OCSPException("problem decoding object: " + e, e); } } return rb.getResponse(); }
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"); } } }
public int hashCode() { return resp.hashCode(); }
public int getStatus() { return this.resp.getResponseStatus().getValue().intValue(); }
public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof OCSPResp)) { return false; } OCSPResp r = (OCSPResp)o; return resp.equals(r.resp); }
public Object getResponseObject() throws OCSPException { ResponseBytes rb = this.resp.getResponseBytes(); if (rb == null) { return null; } if (rb.getResponseType().equals(OCSPObjectIdentifiers.id_pkix_ocsp_basic)) { try { ASN1Primitive obj = ASN1Primitive.fromByteArray(rb.getResponse().getOctets()); return new BasicOCSPResp(BasicOCSPResponse.getInstance(obj)); } catch (Exception e) { throw new OCSPException("problem decoding object: " + e, e); } } return rb.getResponse(); }
public static OCSPResponse getInstance( ASN1TaggedObject obj, boolean explicit) { return getInstance(ASN1Sequence.getInstance(obj, explicit)); }
/** * return the ASN.1 encoded representation of this object. */ public byte[] getEncoded() throws IOException { return resp.getEncoded(); }
public static OCSPResponse getInstance( Object obj) { if (obj instanceof OCSPResponse) { return (OCSPResponse)obj; } else if (obj != null) { return new OCSPResponse(ASN1Sequence.getInstance(obj)); } return null; }
public int hashCode() { return resp.hashCode(); }
public int getStatus() { return this.resp.getResponseStatus().getValue().intValue(); }
public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof OCSPResp)) { return false; } OCSPResp r = (OCSPResp)o; return resp.equals(r.resp); }
public Object getResponseObject() throws OCSPException { ResponseBytes rb = this.resp.getResponseBytes(); if (rb == null) { return null; } if (rb.getResponseType().equals(OCSPObjectIdentifiers.id_pkix_ocsp_basic)) { try { ASN1Primitive obj = ASN1Primitive.fromByteArray(rb.getResponse().getOctets()); return new BasicOCSPResp(BasicOCSPResponse.getInstance(obj)); } catch (Exception e) { throw new OCSPException("problem decoding object: " + e, e); } } return rb.getResponse(); }