- Initial commit
This commit is contained in:
52
Runtime/3rdParty/BouncyCastle/cms/OriginatorInformation.cs
vendored
Normal file
52
Runtime/3rdParty/BouncyCastle/cms/OriginatorInformation.cs
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
|
||||
|
||||
namespace Best.HTTP.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
|
||||
Reference in New Issue
Block a user