53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
|
#pragma warning disable
|
|
using System;
|
|
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms
|
|
{
|
|
public class OriginatorInformation
|
|
{
|
|
private readonly OriginatorInfo originatorInfo;
|
|
|
|
internal OriginatorInformation(OriginatorInfo originatorInfo)
|
|
{
|
|
this.originatorInfo = originatorInfo;
|
|
}
|
|
|
|
/**
|
|
* Return the certificates stored in the underlying OriginatorInfo object.
|
|
*
|
|
* @return a Store of X509CertificateHolder objects.
|
|
*/
|
|
public virtual IStore<X509Certificate> GetCertificates()
|
|
{
|
|
return CmsSignedHelper.Instance.GetCertificates(originatorInfo.Certificates);
|
|
}
|
|
|
|
/**
|
|
* Return the CRLs stored in the underlying OriginatorInfo object.
|
|
*
|
|
* @return a Store of X509CRLHolder objects.
|
|
*/
|
|
public virtual IStore<X509Crl> GetCrls()
|
|
{
|
|
return CmsSignedHelper.Instance.GetCrls(originatorInfo.Crls);
|
|
}
|
|
|
|
/**
|
|
* Return the underlying ASN.1 object defining this SignerInformation object.
|
|
*
|
|
* @return a OriginatorInfo.
|
|
*/
|
|
public virtual OriginatorInfo ToAsn1Structure()
|
|
{
|
|
return originatorInfo;
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore
|
|
#endif
|