195 lines
9.3 KiB
C#
195 lines
9.3 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
|
|
{
|
|
// Token: 0x020019CD RID: 6605
|
|
[Token(Token = "0x20019CD")]
|
|
internal class OcspUtilities
|
|
{
|
|
// Token: 0x06009DD9 RID: 40409 RVA: 0x00211958 File Offset: 0x0020FB58
|
|
[Token(Token = "0x6009DD9")]
|
|
[Address(RVA = "0x28C7960", Offset = "0x28C6760", VA = "0x1828C7960")]
|
|
static OcspUtilities()
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
OcspUtilities.algorithms = dictionary;
|
|
OcspUtilities.oids = Platform.CreateHashtable();
|
|
OcspUtilities.noParams = new HashSet();
|
|
IDictionary dictionary2 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier md2WithRsaEncryption = PkcsObjectIdentifiers.MD2WithRsaEncryption;
|
|
IDictionary dictionary3 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier md2WithRsaEncryption2 = PkcsObjectIdentifiers.MD2WithRsaEncryption;
|
|
IDictionary dictionary4 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier md5WithRsaEncryption = PkcsObjectIdentifiers.MD5WithRsaEncryption;
|
|
IDictionary dictionary5 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier md5WithRsaEncryption2 = PkcsObjectIdentifiers.MD5WithRsaEncryption;
|
|
IDictionary dictionary6 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha1WithRsaEncryption = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
|
|
IDictionary dictionary7 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha1WithRsaEncryption2 = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
|
|
IDictionary dictionary8 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha224WithRsaEncryption = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
|
|
IDictionary dictionary9 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha224WithRsaEncryption2 = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
|
|
IDictionary dictionary10 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha256WithRsaEncryption = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
|
|
IDictionary dictionary11 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha256WithRsaEncryption2 = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
|
|
IDictionary dictionary12 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha384WithRsaEncryption = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
|
|
IDictionary dictionary13 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha384WithRsaEncryption2 = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
|
|
IDictionary dictionary14 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha512WithRsaEncryption = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
|
|
IDictionary dictionary15 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier sha512WithRsaEncryption2 = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
|
|
IDictionary dictionary16 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier rsaSignatureWithRipeMD = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
|
|
IDictionary dictionary17 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier rsaSignatureWithRipeMD2 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
|
|
IDictionary dictionary18 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier rsaSignatureWithRipeMD3 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
|
|
IDictionary dictionary19 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier rsaSignatureWithRipeMD4 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
|
|
IDictionary dictionary20 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier rsaSignatureWithRipeMD5 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
|
|
IDictionary dictionary21 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier rsaSignatureWithRipeMD6 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
|
|
IDictionary dictionary22 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier idDsaWithSha = X9ObjectIdentifiers.IdDsaWithSha1;
|
|
IDictionary dictionary23 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier idDsaWithSha2 = X9ObjectIdentifiers.IdDsaWithSha1;
|
|
IDictionary dictionary24 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier dsaWithSha = NistObjectIdentifiers.DsaWithSha224;
|
|
IDictionary dictionary25 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier dsaWithSha2 = NistObjectIdentifiers.DsaWithSha256;
|
|
IDictionary dictionary26 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier ecdsaWithSha = X9ObjectIdentifiers.ECDsaWithSha1;
|
|
IDictionary dictionary27 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier ecdsaWithSha2 = X9ObjectIdentifiers.ECDsaWithSha1;
|
|
IDictionary dictionary28 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier ecdsaWithSha3 = X9ObjectIdentifiers.ECDsaWithSha224;
|
|
IDictionary dictionary29 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier ecdsaWithSha4 = X9ObjectIdentifiers.ECDsaWithSha256;
|
|
IDictionary dictionary30 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier ecdsaWithSha5 = X9ObjectIdentifiers.ECDsaWithSha384;
|
|
IDictionary dictionary31 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier ecdsaWithSha6 = X9ObjectIdentifiers.ECDsaWithSha512;
|
|
IDictionary dictionary32 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier gostR3411x94WithGostR3410x = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
|
|
IDictionary dictionary33 = OcspUtilities.algorithms;
|
|
DerObjectIdentifier gostR3411x94WithGostR3410x2 = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
|
|
IDictionary dictionary34 = OcspUtilities.oids;
|
|
IDictionary dictionary35 = OcspUtilities.oids;
|
|
IDictionary dictionary36 = OcspUtilities.oids;
|
|
IDictionary dictionary37 = OcspUtilities.oids;
|
|
IDictionary dictionary38 = OcspUtilities.oids;
|
|
IDictionary dictionary39 = OcspUtilities.oids;
|
|
IDictionary dictionary40 = OcspUtilities.oids;
|
|
IDictionary dictionary41 = OcspUtilities.oids;
|
|
IDictionary dictionary42 = OcspUtilities.oids;
|
|
IDictionary dictionary43 = OcspUtilities.oids;
|
|
IDictionary dictionary44 = OcspUtilities.oids;
|
|
IDictionary dictionary45 = OcspUtilities.oids;
|
|
IDictionary dictionary46 = OcspUtilities.oids;
|
|
IDictionary dictionary47 = OcspUtilities.oids;
|
|
IDictionary dictionary48 = OcspUtilities.oids;
|
|
IDictionary dictionary49 = OcspUtilities.oids;
|
|
IDictionary dictionary50 = OcspUtilities.oids;
|
|
IDictionary dictionary51 = OcspUtilities.oids;
|
|
IDictionary dictionary52 = OcspUtilities.oids;
|
|
IDictionary dictionary53 = OcspUtilities.oids;
|
|
IDictionary dictionary54 = OcspUtilities.oids;
|
|
IDictionary dictionary55 = OcspUtilities.oids;
|
|
ISet set = OcspUtilities.noParams;
|
|
ISet set2 = OcspUtilities.noParams;
|
|
ISet set3 = OcspUtilities.noParams;
|
|
ISet set4 = OcspUtilities.noParams;
|
|
ISet set5 = OcspUtilities.noParams;
|
|
ISet set6 = OcspUtilities.noParams;
|
|
ISet set7 = OcspUtilities.noParams;
|
|
ISet set8 = OcspUtilities.noParams;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009DDA RID: 40410 RVA: 0x00211C20 File Offset: 0x0020FE20
|
|
[Token(Token = "0x6009DDA")]
|
|
[Address(RVA = "0x28C76C0", Offset = "0x28C64C0", VA = "0x1828C76C0")]
|
|
internal static DerObjectIdentifier GetAlgorithmOid(string algorithmName)
|
|
{
|
|
string text = Platform.ToUpperInvariant(algorithmName);
|
|
IDictionary dictionary = OcspUtilities.algorithms;
|
|
if (text == 0)
|
|
{
|
|
return new DerObjectIdentifier(text);
|
|
}
|
|
IDictionary dictionary2 = OcspUtilities.algorithms;
|
|
IDictionary dictionary3 = OcspUtilities.algorithms;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009DDB RID: 40411 RVA: 0x00211C5C File Offset: 0x0020FE5C
|
|
[Token(Token = "0x6009DDB")]
|
|
[Address(RVA = "0x28C75B0", Offset = "0x28C63B0", VA = "0x1828C75B0")]
|
|
internal static string GetAlgorithmName(DerObjectIdentifier oid)
|
|
{
|
|
IDictionary dictionary = OcspUtilities.oids;
|
|
return oid.identifier;
|
|
}
|
|
|
|
// Token: 0x06009DDC RID: 40412 RVA: 0x00211C84 File Offset: 0x0020FE84
|
|
[Token(Token = "0x6009DDC")]
|
|
[Address(RVA = "0x28C7840", Offset = "0x28C6640", VA = "0x1828C7840")]
|
|
internal static AlgorithmIdentifier GetSigAlgID(DerObjectIdentifier sigOid)
|
|
{
|
|
ISet set = OcspUtilities.noParams;
|
|
DerNull instance = DerNull.Instance;
|
|
return new AlgorithmIdentifier(sigOid, instance);
|
|
}
|
|
|
|
// Token: 0x1700191B RID: 6427
|
|
// (get) Token: 0x06009DDD RID: 40413 RVA: 0x00211CB4 File Offset: 0x0020FEB4
|
|
[Token(Token = "0x1700191B")]
|
|
internal static IEnumerable AlgNames
|
|
{
|
|
[Token(Token = "0x6009DDD")]
|
|
[Address(RVA = "0x28C8C50", Offset = "0x28C7A50", VA = "0x1828C8C50")]
|
|
get
|
|
{
|
|
IDictionary dictionary = OcspUtilities.algorithms;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009DDE RID: 40414 RVA: 0x00211CCC File Offset: 0x0020FECC
|
|
[Token(Token = "0x6009DDE")]
|
|
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
|
public OcspUtilities()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04006A1C RID: 27164
|
|
[Token(Token = "0x4006A1C")]
|
|
private static readonly IDictionary algorithms;
|
|
|
|
// Token: 0x04006A1D RID: 27165
|
|
[Token(Token = "0x4006A1D")]
|
|
private static readonly IDictionary oids;
|
|
|
|
// Token: 0x04006A1E RID: 27166
|
|
[Token(Token = "0x4006A1E")]
|
|
private static readonly ISet noParams;
|
|
}
|
|
}
|