private OcspResponse(Asn1Sequence seq) { responseStatus = new OcspResponseStatus(DerEnumerated.GetInstance(seq[0])); if (seq.Count == 2) { responseBytes = ResponseBytes.GetInstance((Asn1TaggedObject)seq[1], explicitly: true); } }
public OcspResponse(OcspResponseStatus responseStatus, ResponseBytes responseBytes) { if (responseStatus == null) { throw new ArgumentNullException("responseStatus"); } this.responseStatus = responseStatus; this.responseBytes = responseBytes; }
/// <exception cref="System.IO.IOException"/> private static byte[] BuildOCSPResponse(byte[] basicOcspResponse) { DerOctetString doctet = new DerOctetString(basicOcspResponse); OcspResponseStatus respStatus = new OcspResponseStatus(Org.BouncyCastle.Asn1.Ocsp.OcspResponseStatus.Successful ); ResponseBytes responseBytes = new ResponseBytes(OcspObjectIdentifiers.PkixOcspBasic, doctet); OcspResponse ocspResponse = new OcspResponse(respStatus, responseBytes); return(new OcspResp(ocspResponse).GetEncoded()); }