add all
This commit is contained in:
57
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs
vendored
Normal file
57
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
|
||||
{
|
||||
/**
|
||||
* <pre>GenMsgContent ::= SEQUENCE OF InfoTypeAndValue</pre>
|
||||
*/
|
||||
public class GenMsgContent
|
||||
: Asn1Encodable
|
||||
{
|
||||
public static GenMsgContent GetInstance(object obj)
|
||||
{
|
||||
if (obj is GenMsgContent genMsgContent)
|
||||
return genMsgContent;
|
||||
|
||||
if (obj != null)
|
||||
return new GenMsgContent(Asn1Sequence.GetInstance(obj));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private readonly Asn1Sequence m_content;
|
||||
|
||||
private GenMsgContent(Asn1Sequence seq)
|
||||
{
|
||||
m_content = seq;
|
||||
}
|
||||
|
||||
public GenMsgContent(InfoTypeAndValue itv)
|
||||
{
|
||||
m_content = new DerSequence(itv);
|
||||
}
|
||||
|
||||
public GenMsgContent(params InfoTypeAndValue[] itvs)
|
||||
{
|
||||
m_content = new DerSequence(itvs);
|
||||
}
|
||||
|
||||
public virtual InfoTypeAndValue[] ToInfoTypeAndValueArray()
|
||||
{
|
||||
return m_content.MapElements(InfoTypeAndValue.GetInstance);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
|
||||
* </pre>
|
||||
* @return a basic ASN.1 object representation.
|
||||
*/
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
return m_content;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user