You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.1 KiB
62 lines
1.1 KiB
2 months ago
|
using System;
|
||
|
using System.Collections;
|
||
|
|
||
|
using Org.BouncyCastle.Asn1;
|
||
|
using Org.BouncyCastle.Asn1.Ocsp;
|
||
|
using Org.BouncyCastle.Asn1.X509;
|
||
|
using Org.BouncyCastle.X509;
|
||
|
|
||
|
namespace Org.BouncyCastle.Ocsp
|
||
|
{
|
||
|
public class RespData
|
||
|
: X509ExtensionBase
|
||
|
{
|
||
|
internal readonly ResponseData data;
|
||
|
|
||
|
public RespData(
|
||
|
ResponseData data)
|
||
|
{
|
||
|
this.data = data;
|
||
|
}
|
||
|
|
||
|
public int Version
|
||
|
{
|
||
|
get { return data.Version.IntValueExact + 1; }
|
||
|
}
|
||
|
|
||
|
public RespID GetResponderId()
|
||
|
{
|
||
|
return new RespID(data.ResponderID);
|
||
|
}
|
||
|
|
||
|
[Obsolete]
|
||
|
public DateTime ProducedAt
|
||
|
{
|
||
|
get { return data.ProducedAt.ToDateTime(); }
|
||
|
}
|
||
|
|
||
|
public SingleResp[] GetResponses()
|
||
|
{
|
||
|
Asn1Sequence s = data.Responses;
|
||
|
SingleResp[] rs = new SingleResp[s.Count];
|
||
|
|
||
|
for (int i = 0; i != rs.Length; i++)
|
||
|
{
|
||
|
rs[i] = new SingleResp(SingleResponse.GetInstance(s[i]));
|
||
|
}
|
||
|
|
||
|
return rs;
|
||
|
}
|
||
|
|
||
|
public X509Extensions ResponseExtensions
|
||
|
{
|
||
|
get { return data.ResponseExtensions; }
|
||
|
}
|
||
|
|
||
|
protected override X509Extensions GetX509Extensions()
|
||
|
{
|
||
|
return ResponseExtensions;
|
||
|
}
|
||
|
}
|
||
|
}
|