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: 0x02001AAD RID: 6829
|
|
[Token(Token = "0x2001AAD")]
|
|
internal class OcspUtilities
|
|
{
|
|
// Token: 0x0600A1A7 RID: 41383 RVA: 0x0021A9F4 File Offset: 0x00218BF4
|
|
[Token(Token = "0x600A1A7")]
|
|
[Address(RVA = "0xD02F90", Offset = "0xD01F90", VA = "0x180D02F90")]
|
|
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: 0x0600A1A8 RID: 41384 RVA: 0x0021ACBC File Offset: 0x00218EBC
|
|
[Token(Token = "0x600A1A8")]
|
|
[Address(RVA = "0xD02CF0", Offset = "0xD01CF0", VA = "0x180D02CF0")]
|
|
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: 0x0600A1A9 RID: 41385 RVA: 0x0021ACF8 File Offset: 0x00218EF8
|
|
[Token(Token = "0x600A1A9")]
|
|
[Address(RVA = "0xD02BE0", Offset = "0xD01BE0", VA = "0x180D02BE0")]
|
|
internal static string GetAlgorithmName(DerObjectIdentifier oid)
|
|
{
|
|
IDictionary dictionary = OcspUtilities.oids;
|
|
return oid.identifier;
|
|
}
|
|
|
|
// Token: 0x0600A1AA RID: 41386 RVA: 0x0021AD20 File Offset: 0x00218F20
|
|
[Token(Token = "0x600A1AA")]
|
|
[Address(RVA = "0xD02E70", Offset = "0xD01E70", VA = "0x180D02E70")]
|
|
internal static AlgorithmIdentifier GetSigAlgID(DerObjectIdentifier sigOid)
|
|
{
|
|
ISet set = OcspUtilities.noParams;
|
|
DerNull instance = DerNull.Instance;
|
|
return new AlgorithmIdentifier(sigOid, instance);
|
|
}
|
|
|
|
// Token: 0x170019B8 RID: 6584
|
|
// (get) Token: 0x0600A1AB RID: 41387 RVA: 0x0021AD50 File Offset: 0x00218F50
|
|
[Token(Token = "0x170019B8")]
|
|
internal static IEnumerable AlgNames
|
|
{
|
|
[Token(Token = "0x600A1AB")]
|
|
[Address(RVA = "0xD04280", Offset = "0xD03280", VA = "0x180D04280")]
|
|
get
|
|
{
|
|
IDictionary dictionary = OcspUtilities.algorithms;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600A1AC RID: 41388 RVA: 0x0021AD68 File Offset: 0x00218F68
|
|
[Token(Token = "0x600A1AC")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
public OcspUtilities()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04006BD5 RID: 27605
|
|
[Token(Token = "0x4006BD5")]
|
|
private static readonly IDictionary algorithms;
|
|
|
|
// Token: 0x04006BD6 RID: 27606
|
|
[Token(Token = "0x4006BD6")]
|
|
private static readonly IDictionary oids;
|
|
|
|
// Token: 0x04006BD7 RID: 27607
|
|
[Token(Token = "0x4006BD7")]
|
|
private static readonly ISet noParams;
|
|
}
|
|
}
|