add all
This commit is contained in:
78
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs
vendored
Normal file
78
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
|
||||
{
|
||||
public class Cast5CbcParameters
|
||||
: Asn1Encodable
|
||||
{
|
||||
private readonly DerInteger keyLength;
|
||||
private readonly Asn1OctetString iv;
|
||||
|
||||
public static Cast5CbcParameters GetInstance(
|
||||
object o)
|
||||
{
|
||||
if (o is Cast5CbcParameters)
|
||||
{
|
||||
return (Cast5CbcParameters) o;
|
||||
}
|
||||
|
||||
if (o is Asn1Sequence)
|
||||
{
|
||||
return new Cast5CbcParameters((Asn1Sequence) o);
|
||||
}
|
||||
|
||||
throw new ArgumentException("unknown object in Cast5CbcParameters factory");
|
||||
}
|
||||
|
||||
public Cast5CbcParameters(
|
||||
byte[] iv,
|
||||
int keyLength)
|
||||
{
|
||||
this.iv = new DerOctetString(iv);
|
||||
this.keyLength = new DerInteger(keyLength);
|
||||
}
|
||||
|
||||
private Cast5CbcParameters(
|
||||
Asn1Sequence seq)
|
||||
{
|
||||
if (seq.Count != 2)
|
||||
throw new ArgumentException("Wrong number of elements in sequence", "seq");
|
||||
|
||||
iv = (Asn1OctetString) seq[0];
|
||||
keyLength = (DerInteger) seq[1];
|
||||
}
|
||||
|
||||
public byte[] GetIV()
|
||||
{
|
||||
return Arrays.Clone(iv.GetOctets());
|
||||
}
|
||||
|
||||
public int KeyLength
|
||||
{
|
||||
get { return keyLength.IntValueExact; }
|
||||
}
|
||||
|
||||
/**
|
||||
* Produce an object suitable for an Asn1OutputStream.
|
||||
* <pre>
|
||||
* cast5CBCParameters ::= Sequence {
|
||||
* iv OCTET STRING DEFAULT 0,
|
||||
* -- Initialization vector
|
||||
* keyLength Integer
|
||||
* -- Key length, in bits
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
return new DerSequence(iv, keyLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f69b0269ba180c45ad3c00555a60398
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
67
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs
vendored
Normal file
67
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
|
||||
{
|
||||
public class IdeaCbcPar
|
||||
: Asn1Encodable
|
||||
{
|
||||
internal Asn1OctetString iv;
|
||||
|
||||
public static IdeaCbcPar GetInstance(
|
||||
object o)
|
||||
{
|
||||
if (o is IdeaCbcPar)
|
||||
{
|
||||
return (IdeaCbcPar) o;
|
||||
}
|
||||
|
||||
if (o is Asn1Sequence)
|
||||
{
|
||||
return new IdeaCbcPar((Asn1Sequence) o);
|
||||
}
|
||||
|
||||
throw new ArgumentException("unknown object in IDEACBCPar factory");
|
||||
}
|
||||
|
||||
public IdeaCbcPar(
|
||||
byte[] iv)
|
||||
{
|
||||
this.iv = new DerOctetString(iv);
|
||||
}
|
||||
|
||||
private IdeaCbcPar(
|
||||
Asn1Sequence seq)
|
||||
{
|
||||
if (seq.Count == 1)
|
||||
{
|
||||
iv = (Asn1OctetString) seq[0];
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] GetIV()
|
||||
{
|
||||
return iv == null ? null : iv.GetOctets();
|
||||
}
|
||||
|
||||
/**
|
||||
* Produce an object suitable for an Asn1OutputStream.
|
||||
* <pre>
|
||||
* IDEA-CBCPar ::= Sequence {
|
||||
* iv OCTET STRING OPTIONAL -- exactly 8 octets
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
Asn1EncodableVector v = new Asn1EncodableVector();
|
||||
v.AddOptional(iv);
|
||||
return new DerSequence(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs.meta
vendored
Normal file
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29a817e7067eb46489a7ec474922f0ec
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
124
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs
vendored
Normal file
124
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
|
||||
{
|
||||
public abstract class MiscObjectIdentifiers
|
||||
{
|
||||
//
|
||||
// Netscape
|
||||
// iso/itu(2) joint-assign(16) us(840) uscompany(1) Netscape(113730) cert-extensions(1) }
|
||||
//
|
||||
public static readonly DerObjectIdentifier Netscape = new DerObjectIdentifier("2.16.840.1.113730.1");
|
||||
public static readonly DerObjectIdentifier NetscapeCertType = Netscape.Branch("1");
|
||||
public static readonly DerObjectIdentifier NetscapeBaseUrl = Netscape.Branch("2");
|
||||
public static readonly DerObjectIdentifier NetscapeRevocationUrl = Netscape.Branch("3");
|
||||
public static readonly DerObjectIdentifier NetscapeCARevocationUrl = Netscape.Branch("4");
|
||||
public static readonly DerObjectIdentifier NetscapeRenewalUrl = Netscape.Branch("7");
|
||||
public static readonly DerObjectIdentifier NetscapeCAPolicyUrl = Netscape.Branch("8");
|
||||
public static readonly DerObjectIdentifier NetscapeSslServerName = Netscape.Branch("12");
|
||||
public static readonly DerObjectIdentifier NetscapeCertComment = Netscape.Branch("13");
|
||||
|
||||
//
|
||||
// Verisign
|
||||
// iso/itu(2) joint-assign(16) us(840) uscompany(1) verisign(113733) cert-extensions(1) }
|
||||
//
|
||||
public static readonly DerObjectIdentifier Verisign = new DerObjectIdentifier("2.16.840.1.113733.1");
|
||||
|
||||
//
|
||||
// CZAG - country, zip, age, and gender
|
||||
//
|
||||
public static readonly DerObjectIdentifier VerisignCzagExtension = Verisign.Branch("6.3");
|
||||
|
||||
public static readonly DerObjectIdentifier VerisignPrivate_6_9 = Verisign.Branch("6.9");
|
||||
public static readonly DerObjectIdentifier VerisignOnSiteJurisdictionHash = Verisign.Branch("6.11");
|
||||
public static readonly DerObjectIdentifier VerisignBitString_6_13 = Verisign.Branch("6.13");
|
||||
|
||||
// D&B D-U-N-S number
|
||||
public static readonly DerObjectIdentifier VerisignDnbDunsNumber = Verisign.Branch("6.15");
|
||||
|
||||
public static readonly DerObjectIdentifier VerisignIssStrongCrypto = Verisign.Branch("8.1");
|
||||
|
||||
//
|
||||
// Novell
|
||||
// iso/itu(2) country(16) us(840) organization(1) novell(113719)
|
||||
//
|
||||
public static readonly DerObjectIdentifier Novell = new DerObjectIdentifier("2.16.840.1.113719");
|
||||
public static readonly DerObjectIdentifier NovellSecurityAttribs = Novell.Branch("1.9.4.1");
|
||||
|
||||
//
|
||||
// Entrust
|
||||
// iso(1) member-body(16) us(840) nortelnetworks(113533) entrust(7)
|
||||
//
|
||||
public static readonly DerObjectIdentifier Entrust = new DerObjectIdentifier("1.2.840.113533.7");
|
||||
public static readonly DerObjectIdentifier EntrustVersionExtension = Entrust.Branch("65.0");
|
||||
|
||||
public static readonly DerObjectIdentifier cast5CBC = new DerObjectIdentifier(Entrust+ ".66.10");
|
||||
|
||||
//
|
||||
// HMAC-SHA1 hMAC-SHA1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
|
||||
// dod(6) internet(1) security(5) mechanisms(5) 8 1 2 }
|
||||
//
|
||||
public static readonly DerObjectIdentifier HMAC_SHA1 = new DerObjectIdentifier("1.3.6.1.5.5.8.1.2");
|
||||
|
||||
//
|
||||
// Ascom
|
||||
//
|
||||
public static readonly DerObjectIdentifier as_sys_sec_alg_ideaCBC = new DerObjectIdentifier("1.3.6.1.4.1.188.7.1.1.2");
|
||||
|
||||
//
|
||||
// Peter Gutmann's Cryptlib
|
||||
//
|
||||
public static readonly DerObjectIdentifier cryptlib = new DerObjectIdentifier("1.3.6.1.4.1.3029");
|
||||
|
||||
public static readonly DerObjectIdentifier cryptlib_algorithm = cryptlib.Branch("1");
|
||||
public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_ECB = cryptlib_algorithm.Branch("1.1");
|
||||
public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_CBC = cryptlib_algorithm.Branch("1.2");
|
||||
public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_CFB = cryptlib_algorithm.Branch("1.3");
|
||||
public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_OFB = cryptlib_algorithm.Branch("1.4");
|
||||
|
||||
//
|
||||
// Blake2b
|
||||
//
|
||||
public static readonly DerObjectIdentifier blake2 = new DerObjectIdentifier("1.3.6.1.4.1.1722.12.2");
|
||||
|
||||
public static readonly DerObjectIdentifier id_blake2b160 = blake2.Branch("1.5");
|
||||
public static readonly DerObjectIdentifier id_blake2b256 = blake2.Branch("1.8");
|
||||
public static readonly DerObjectIdentifier id_blake2b384 = blake2.Branch("1.12");
|
||||
public static readonly DerObjectIdentifier id_blake2b512 = blake2.Branch("1.16");
|
||||
|
||||
public static readonly DerObjectIdentifier id_blake2s128 = blake2.Branch("2.4");
|
||||
public static readonly DerObjectIdentifier id_blake2s160 = blake2.Branch("2.5");
|
||||
public static readonly DerObjectIdentifier id_blake2s224 = blake2.Branch("2.7");
|
||||
public static readonly DerObjectIdentifier id_blake2s256 = blake2.Branch("2.8");
|
||||
|
||||
public static readonly DerObjectIdentifier blake3 = blake2.Branch("3");
|
||||
|
||||
public static readonly DerObjectIdentifier blake3_256 = blake3.Branch("8");
|
||||
|
||||
//
|
||||
// Scrypt
|
||||
public static readonly DerObjectIdentifier id_scrypt = new DerObjectIdentifier("1.3.6.1.4.1.11591.4.11");
|
||||
|
||||
// Composite key/signature oid - prototyping
|
||||
//
|
||||
// id-alg-composite OBJECT IDENTIFIER ::= {
|
||||
// iso(1) identified-organization(3) dod(6) internet(1) private(4)
|
||||
// enterprise(1) OpenCA(18227) Algorithms(2) id-alg-composite(1) }
|
||||
public static readonly DerObjectIdentifier id_alg_composite = new DerObjectIdentifier("1.3.6.1.4.1.18227.2.1");
|
||||
|
||||
// -- To be replaced by IANA
|
||||
//
|
||||
//id-composite-key OBJECT IDENTIFIER ::= {
|
||||
//
|
||||
// joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
|
||||
//
|
||||
// Algorithm(80) Composite(4) CompositeKey(1)
|
||||
public static readonly DerObjectIdentifier id_composite_key =
|
||||
new DerObjectIdentifier("2.16.840.1.114027.80.4.1");
|
||||
|
||||
public static readonly DerObjectIdentifier id_oracle_pkcs12_trusted_key_usage =
|
||||
new DerObjectIdentifier("2.16.840.1.113894.746875.1.1");
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: faf6c2d54aebe384e9ebbb5837ed22d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
58
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs
vendored
Normal file
58
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
|
||||
{
|
||||
/**
|
||||
* The NetscapeCertType object.
|
||||
* <pre>
|
||||
* NetscapeCertType ::= BIT STRING {
|
||||
* SSLClient (0),
|
||||
* SSLServer (1),
|
||||
* S/MIME (2),
|
||||
* Object Signing (3),
|
||||
* Reserved (4),
|
||||
* SSL CA (5),
|
||||
* S/MIME CA (6),
|
||||
* Object Signing CA (7) }
|
||||
* </pre>
|
||||
*/
|
||||
public class NetscapeCertType
|
||||
: DerBitString
|
||||
{
|
||||
public const int SslClient = (1 << 7);
|
||||
public const int SslServer = (1 << 6);
|
||||
public const int Smime = (1 << 5);
|
||||
public const int ObjectSigning = (1 << 4);
|
||||
public const int Reserved = (1 << 3);
|
||||
public const int SslCA = (1 << 2);
|
||||
public const int SmimeCA = (1 << 1);
|
||||
public const int ObjectSigningCA = (1 << 0);
|
||||
|
||||
/**
|
||||
* Basic constructor.
|
||||
*
|
||||
* @param usage - the bitwise OR of the Key Usage flags giving the
|
||||
* allowed uses for the key.
|
||||
* e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA)
|
||||
*/
|
||||
public NetscapeCertType(int usage)
|
||||
: base(usage)
|
||||
{
|
||||
}
|
||||
|
||||
public NetscapeCertType(DerBitString usage)
|
||||
: base(usage.GetBytes(), usage.PadBits)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
byte[] data = GetBytes();
|
||||
return "NetscapeCertType: 0x" + (data[0] & 0xff).ToString("X");
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs.meta
vendored
Normal file
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bc5a052c31c0314994732d07f5afc4d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs
vendored
Normal file
22
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
|
||||
{
|
||||
public class NetscapeRevocationUrl
|
||||
: DerIA5String
|
||||
{
|
||||
public NetscapeRevocationUrl(DerIA5String str)
|
||||
: base(str.GetString())
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "NetscapeRevocationUrl: " + this.GetString();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d22c307cdb816a0459acb624803e18d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs
vendored
Normal file
22
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
|
||||
{
|
||||
public class VerisignCzagExtension
|
||||
: DerIA5String
|
||||
{
|
||||
public VerisignCzagExtension(DerIA5String str)
|
||||
: base(str.GetString())
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "VerisignCzagExtension: " + this.GetString();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1851bd9fb0851f4580636dc5c47eeb9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user