scripts
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001387 RID: 4999
|
||||
[Token(Token = "0x2001387")]
|
||||
[StructLayout(3)]
|
||||
public class GenTimeAccuracy
|
||||
{
|
||||
// Token: 0x06007EA4 RID: 32420 RVA: 0x001A82F4 File Offset: 0x001A64F4
|
||||
[Token(Token = "0x6007EA4")]
|
||||
[Address(RVA = "0x3C3A30", Offset = "0x3C2430", VA = "0x1803C3A30")]
|
||||
public GenTimeAccuracy(Accuracy accuracy)
|
||||
{
|
||||
this.accuracy = accuracy;
|
||||
}
|
||||
|
||||
// Token: 0x170014B4 RID: 5300
|
||||
// (get) Token: 0x06007EA5 RID: 32421 RVA: 0x001A8310 File Offset: 0x001A6510
|
||||
[Token(Token = "0x170014B4")]
|
||||
public int Seconds
|
||||
{
|
||||
[Token(Token = "0x6007EA5")]
|
||||
[Address(RVA = "0x1C5F980", Offset = "0x1C5E380", VA = "0x181C5F980")]
|
||||
get
|
||||
{
|
||||
DerInteger seconds = this.accuracy.seconds;
|
||||
if (seconds == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return seconds.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014B5 RID: 5301
|
||||
// (get) Token: 0x06007EA6 RID: 32422 RVA: 0x001A8340 File Offset: 0x001A6540
|
||||
[Token(Token = "0x170014B5")]
|
||||
public int Millis
|
||||
{
|
||||
[Token(Token = "0x6007EA6")]
|
||||
[Address(RVA = "0x1C5F940", Offset = "0x1C5E340", VA = "0x181C5F940")]
|
||||
get
|
||||
{
|
||||
DerInteger millis = this.accuracy.millis;
|
||||
if (millis == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return millis.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014B6 RID: 5302
|
||||
// (get) Token: 0x06007EA7 RID: 32423 RVA: 0x001A8370 File Offset: 0x001A6570
|
||||
[Token(Token = "0x170014B6")]
|
||||
public int Micros
|
||||
{
|
||||
[Token(Token = "0x6007EA7")]
|
||||
[Address(RVA = "0x1C5F900", Offset = "0x1C5E300", VA = "0x181C5F900")]
|
||||
get
|
||||
{
|
||||
DerInteger micros = this.accuracy.micros;
|
||||
if (micros == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return micros.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EA8 RID: 32424 RVA: 0x001A83A0 File Offset: 0x001A65A0
|
||||
[Token(Token = "0x6007EA8")]
|
||||
[Address(RVA = "0x1C5F630", Offset = "0x1C5E030", VA = "0x181C5F630")]
|
||||
private int GetTimeComponent(DerInteger time)
|
||||
{
|
||||
if (time == 0)
|
||||
{
|
||||
}
|
||||
return time.Value.IntValue;
|
||||
}
|
||||
|
||||
// Token: 0x06007EA9 RID: 32425 RVA: 0x001A83C4 File Offset: 0x001A65C4
|
||||
[Token(Token = "0x6007EA9")]
|
||||
[Address(RVA = "0x1C5F670", Offset = "0x1C5E070", VA = "0x181C5F670", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
object[] array = new object[0];
|
||||
DerInteger seconds = this.accuracy.seconds;
|
||||
if (seconds == 0)
|
||||
{
|
||||
}
|
||||
int num = seconds.Value.IntValue;
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
array[0] = num;
|
||||
if ("." != 0)
|
||||
{
|
||||
}
|
||||
array[1] = ".";
|
||||
DerInteger millis = this.accuracy.millis;
|
||||
if (millis == 0)
|
||||
{
|
||||
}
|
||||
int intValue = millis.Value.IntValue;
|
||||
num = intValue;
|
||||
if (intValue != 0)
|
||||
{
|
||||
}
|
||||
array[2] = num;
|
||||
DerInteger micros = this.accuracy.micros;
|
||||
int intValue2;
|
||||
if (micros != 0)
|
||||
{
|
||||
intValue2 = micros.Value.IntValue;
|
||||
}
|
||||
num = intValue2;
|
||||
if (intValue2 != 0)
|
||||
{
|
||||
}
|
||||
array[3] = num;
|
||||
return string.Concat(array);
|
||||
}
|
||||
|
||||
// Token: 0x04005A58 RID: 23128
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A58")]
|
||||
private Accuracy accuracy;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x0200138C RID: 5004
|
||||
[Token(Token = "0x200138C")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampRequest : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06007EBC RID: 32444 RVA: 0x001A8C60 File Offset: 0x001A6E60
|
||||
[Token(Token = "0x6007EBC")]
|
||||
[Address(RVA = "0x1C6A0A0", Offset = "0x1C68AA0", VA = "0x181C6A0A0")]
|
||||
public TimeStampRequest(TimeStampReq req)
|
||||
{
|
||||
this.req = req;
|
||||
X509Extensions x509Extensions = req.extensions;
|
||||
this.extensions = x509Extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06007EBD RID: 32445 RVA: 0x001A8C90 File Offset: 0x001A6E90
|
||||
[Token(Token = "0x6007EBD")]
|
||||
[Address(RVA = "0x1C6A030", Offset = "0x1C68A30", VA = "0x181C6A030")]
|
||||
public TimeStampRequest(byte[] req)
|
||||
{
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(req);
|
||||
}
|
||||
|
||||
// Token: 0x06007EBE RID: 32446 RVA: 0x001A8CA4 File Offset: 0x001A6EA4
|
||||
[Token(Token = "0x6007EBE")]
|
||||
[Address(RVA = "0x1C69FC0", Offset = "0x1C689C0", VA = "0x181C69FC0")]
|
||||
public TimeStampRequest(Stream input)
|
||||
{
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(input);
|
||||
}
|
||||
|
||||
// Token: 0x06007EBF RID: 32447 RVA: 0x001A8CB8 File Offset: 0x001A6EB8
|
||||
[Token(Token = "0x6007EBF")]
|
||||
[Address(RVA = "0x1C69EB0", Offset = "0x1C688B0", VA = "0x181C69EB0")]
|
||||
private TimeStampRequest(Asn1InputStream str)
|
||||
{
|
||||
Asn1Object asn1Object = str.ReadObject();
|
||||
TimeStampReq instance = TimeStampReq.GetInstance(asn1Object);
|
||||
this.req = instance;
|
||||
}
|
||||
|
||||
// Token: 0x170014B8 RID: 5304
|
||||
// (get) Token: 0x06007EC0 RID: 32448 RVA: 0x001A8CFC File Offset: 0x001A6EFC
|
||||
[Token(Token = "0x170014B8")]
|
||||
public int Version
|
||||
{
|
||||
[Token(Token = "0x6007EC0")]
|
||||
[Address(RVA = "0x1C6A1F0", Offset = "0x1C68BF0", VA = "0x181C6A1F0")]
|
||||
get
|
||||
{
|
||||
return this.req.version.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014B9 RID: 5305
|
||||
// (get) Token: 0x06007EC1 RID: 32449 RVA: 0x001A8D24 File Offset: 0x001A6F24
|
||||
[Token(Token = "0x170014B9")]
|
||||
public string MessageImprintAlgOid
|
||||
{
|
||||
[Token(Token = "0x6007EC1")]
|
||||
[Address(RVA = "0x1C6A120", Offset = "0x1C68B20", VA = "0x181C6A120")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.req.messageImprint.hashAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EC2 RID: 32450 RVA: 0x001A8D4C File Offset: 0x001A6F4C
|
||||
[Token(Token = "0x6007EC2")]
|
||||
[Address(RVA = "0x1C69900", Offset = "0x1C68300", VA = "0x181C69900")]
|
||||
public byte[] GetMessageImprintDigest()
|
||||
{
|
||||
return this.req.messageImprint.hashedMessage;
|
||||
}
|
||||
|
||||
// Token: 0x170014BA RID: 5306
|
||||
// (get) Token: 0x06007EC3 RID: 32451 RVA: 0x001A8D70 File Offset: 0x001A6F70
|
||||
[Token(Token = "0x170014BA")]
|
||||
public string ReqPolicy
|
||||
{
|
||||
[Token(Token = "0x6007EC3")]
|
||||
[Address(RVA = "0x1C6A1B0", Offset = "0x1C68BB0", VA = "0x181C6A1B0")]
|
||||
get
|
||||
{
|
||||
DerObjectIdentifier tsaPolicy = this.req.tsaPolicy;
|
||||
if (tsaPolicy == 0)
|
||||
{
|
||||
}
|
||||
return tsaPolicy.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014BB RID: 5307
|
||||
// (get) Token: 0x06007EC4 RID: 32452 RVA: 0x001A8D9C File Offset: 0x001A6F9C
|
||||
[Token(Token = "0x170014BB")]
|
||||
public BigInteger Nonce
|
||||
{
|
||||
[Token(Token = "0x6007EC4")]
|
||||
[Address(RVA = "0x1C6A170", Offset = "0x1C68B70", VA = "0x181C6A170")]
|
||||
get
|
||||
{
|
||||
DerInteger nonce = this.req.nonce;
|
||||
if (nonce == 0)
|
||||
{
|
||||
}
|
||||
return nonce.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014BC RID: 5308
|
||||
// (get) Token: 0x06007EC5 RID: 32453 RVA: 0x001A8DC8 File Offset: 0x001A6FC8
|
||||
[Token(Token = "0x170014BC")]
|
||||
public bool CertReq
|
||||
{
|
||||
[Token(Token = "0x6007EC5")]
|
||||
[Address(RVA = "0x1C6A0E0", Offset = "0x1C68AE0", VA = "0x181C6A0E0")]
|
||||
get
|
||||
{
|
||||
DerBoolean certReq = this.req.certReq;
|
||||
if (certReq == 0)
|
||||
{
|
||||
}
|
||||
return certReq.IsTrue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EC6 RID: 32454 RVA: 0x001A8DF4 File Offset: 0x001A6FF4
|
||||
[Token(Token = "0x6007EC6")]
|
||||
[Address(RVA = "0x1C69930", Offset = "0x1C68330", VA = "0x181C69930")]
|
||||
public void Validate(IList algorithms, IList policies, IList extensions)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
if (this.req.messageImprint.hashAlgorithm.ToAsn1Object() != 0)
|
||||
{
|
||||
if (policies != 0)
|
||||
{
|
||||
TimeStampReq timeStampReq = this.req;
|
||||
DerObjectIdentifier tsaPolicy = timeStampReq.tsaPolicy;
|
||||
if (tsaPolicy != 0 && tsaPolicy.identifier != 0 && timeStampReq == 0)
|
||||
{
|
||||
goto IL_B3;
|
||||
}
|
||||
}
|
||||
X509Extensions x509Extensions = this.req.extensions;
|
||||
if (x509Extensions == 0 || extensions == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IEnumerable extensionOids = x509Extensions.ExtensionOids;
|
||||
if (extensionOids != 0 && extensionOids == 0)
|
||||
{
|
||||
goto IL_C4;
|
||||
}
|
||||
if (extensionOids != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Asn1Object asn1Object = this.req.messageImprint.hashAlgorithm.ToAsn1Object();
|
||||
IDictionary digestLengths = TspUtil.digestLengths;
|
||||
IDictionary digestLengths2 = TspUtil.digestLengths;
|
||||
int length = this.req.messageImprint.hashedMessage.Length;
|
||||
return;
|
||||
IL_B3:
|
||||
TspValidationException ex = new TspValidationException("request contains unknown policy", 256);
|
||||
IL_C4:
|
||||
TspValidationException ex2 = new TspValidationException("request contains unknown extension", 8388608);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007EC7 RID: 32455 RVA: 0x001A8EE4 File Offset: 0x001A70E4
|
||||
[Token(Token = "0x6007EC7")]
|
||||
[Address(RVA = "0x53BEA0", Offset = "0x53A8A0", VA = "0x18053BEA0")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.req.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x170014BD RID: 5309
|
||||
// (get) Token: 0x06007EC8 RID: 32456 RVA: 0x001A8F04 File Offset: 0x001A7104
|
||||
[Token(Token = "0x170014BD")]
|
||||
internal X509Extensions Extensions
|
||||
{
|
||||
[Token(Token = "0x6007EC8")]
|
||||
[Address(RVA = "0xA4BA40", Offset = "0xA4A440", VA = "0x180A4BA40")]
|
||||
get
|
||||
{
|
||||
return this.req.extensions;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014BE RID: 5310
|
||||
// (get) Token: 0x06007EC9 RID: 32457 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x170014BE")]
|
||||
public virtual bool HasExtensions
|
||||
{
|
||||
[Token(Token = "0x6007EC9")]
|
||||
[Address(RVA = "0x71D270", Offset = "0x71BC70", VA = "0x18071D270", Slot = "13")]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007ECA RID: 32458 RVA: 0x001A8F24 File Offset: 0x001A7124
|
||||
[Token(Token = "0x6007ECA")]
|
||||
[Address(RVA = "0x1C698E0", Offset = "0x1C682E0", VA = "0x181C698E0", Slot = "14")]
|
||||
public virtual X509Extension GetExtension(DerObjectIdentifier oid)
|
||||
{
|
||||
X509Extensions x509Extensions = this.extensions;
|
||||
if (x509Extensions == 0)
|
||||
{
|
||||
}
|
||||
return x509Extensions.GetExtension(oid);
|
||||
}
|
||||
|
||||
// Token: 0x06007ECB RID: 32459 RVA: 0x001A8F48 File Offset: 0x001A7148
|
||||
[Token(Token = "0x6007ECB")]
|
||||
[Address(RVA = "0x1C697B0", Offset = "0x1C681B0", VA = "0x181C697B0", Slot = "15")]
|
||||
public virtual IList GetExtensionOids()
|
||||
{
|
||||
X509Extensions x509Extensions = this.extensions;
|
||||
if (x509Extensions != 0)
|
||||
{
|
||||
IList list = Platform.CreateArrayList(x509Extensions.GetExtensionOids());
|
||||
UnmodifiableListProxy unmodifiableListProxy;
|
||||
unmodifiableListProxy.l = list;
|
||||
}
|
||||
return TspUtil.EmptyList;
|
||||
}
|
||||
|
||||
// Token: 0x06007ECC RID: 32460 RVA: 0x001A8F78 File Offset: 0x001A7178
|
||||
[Token(Token = "0x6007ECC")]
|
||||
[Address(RVA = "0xA4BA40", Offset = "0xA4A440", VA = "0x180A4BA40", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.req.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x04005A6C RID: 23148
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A6C")]
|
||||
private TimeStampReq req;
|
||||
|
||||
// Token: 0x04005A6D RID: 23149
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A6D")]
|
||||
private X509Extensions extensions;
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x0200138D RID: 5005
|
||||
[Token(Token = "0x200138D")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampRequestGenerator
|
||||
{
|
||||
// Token: 0x06007ECD RID: 32461 RVA: 0x001A8F98 File Offset: 0x001A7198
|
||||
[Token(Token = "0x6007ECD")]
|
||||
[Address(RVA = "0x1C696D0", Offset = "0x1C680D0", VA = "0x181C696D0")]
|
||||
public void SetReqPolicy(string reqPolicy)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(reqPolicy);
|
||||
this.reqPolicy = derObjectIdentifier;
|
||||
}
|
||||
|
||||
// Token: 0x06007ECE RID: 32462 RVA: 0x001A8FB4 File Offset: 0x001A71B4
|
||||
[Token(Token = "0x6007ECE")]
|
||||
[Address(RVA = "0x1C69660", Offset = "0x1C68060", VA = "0x181C69660")]
|
||||
public void SetCertReq(bool certReq)
|
||||
{
|
||||
DerBoolean instance = DerBoolean.GetInstance(certReq);
|
||||
this.certReq = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06007ECF RID: 32463 RVA: 0x001A8FD0 File Offset: 0x001A71D0
|
||||
[Token(Token = "0x6007ECF")]
|
||||
[Address(RVA = "0x1C692C0", Offset = "0x1C67CC0", VA = "0x181C692C0")]
|
||||
[Obsolete]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable value)
|
||||
{
|
||||
byte[] encoded = value.GetEncoded();
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
IDictionary dictionary = this.extensions;
|
||||
DerOctetString derOctetString = new DerOctetString(encoded);
|
||||
X509Extension x509Extension = new X509Extension(critical, derOctetString);
|
||||
IList list = this.extOrdering;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007ED0 RID: 32464 RVA: 0x001A9010 File Offset: 0x001A7210
|
||||
[Token(Token = "0x6007ED0")]
|
||||
[Address(RVA = "0x1C691C0", Offset = "0x1C67BC0", VA = "0x181C691C0")]
|
||||
[Obsolete]
|
||||
public void AddExtension(string oid, bool critical, byte[] value)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
IDictionary dictionary = this.extensions;
|
||||
DerOctetString derOctetString = new DerOctetString(value);
|
||||
X509Extension x509Extension = new X509Extension(critical, derOctetString);
|
||||
IList list = this.extOrdering;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007ED1 RID: 32465 RVA: 0x001A9048 File Offset: 0x001A7248
|
||||
[Token(Token = "0x6007ED1")]
|
||||
[Address(RVA = "0x1C69080", Offset = "0x1C67A80", VA = "0x181C69080", Slot = "4")]
|
||||
public virtual void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extValue)
|
||||
{
|
||||
byte[] encoded = extValue.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06007ED2 RID: 32466 RVA: 0x001A9064 File Offset: 0x001A7264
|
||||
[Token(Token = "0x6007ED2")]
|
||||
[Address(RVA = "0x1C690E0", Offset = "0x1C67AE0", VA = "0x181C690E0", Slot = "5")]
|
||||
public virtual void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extValue)
|
||||
{
|
||||
IDictionary dictionary = this.extensions;
|
||||
DerOctetString derOctetString = new DerOctetString(extValue);
|
||||
X509Extension x509Extension = new X509Extension(critical, derOctetString);
|
||||
IList list = this.extOrdering;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007ED3 RID: 32467 RVA: 0x001A9094 File Offset: 0x001A7294
|
||||
[Token(Token = "0x6007ED3")]
|
||||
[Address(RVA = "0x1C693D0", Offset = "0x1C67DD0", VA = "0x181C693D0")]
|
||||
public TimeStampRequest Generate(string digestAlgorithm, byte[] digest)
|
||||
{
|
||||
int num = 0;
|
||||
return this.Generate(digestAlgorithm, digest, num);
|
||||
}
|
||||
|
||||
// Token: 0x06007ED4 RID: 32468 RVA: 0x001A90AC File Offset: 0x001A72AC
|
||||
[Token(Token = "0x6007ED4")]
|
||||
[Address(RVA = "0x1C69450", Offset = "0x1C67E50", VA = "0x181C69450")]
|
||||
public TimeStampRequest Generate(string digestAlgorithmOid, byte[] digest, BigInteger nonce)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007ED4)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequest BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequestGenerator::Generate(System.String,System.Byte[],BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_95:
|
||||
stloc:ArgumentException(var_15_9F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("No digest algorithm specified")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007ED5 RID: 32469 RVA: 0x001A915C File Offset: 0x001A735C
|
||||
[Token(Token = "0x6007ED5")]
|
||||
[Address(RVA = "0x1C693F0", Offset = "0x1C67DF0", VA = "0x181C693F0", Slot = "6")]
|
||||
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest)
|
||||
{
|
||||
string identifier = digestAlgorithm.identifier;
|
||||
int num = 0;
|
||||
return this.Generate(identifier, digest, num);
|
||||
}
|
||||
|
||||
// Token: 0x06007ED6 RID: 32470 RVA: 0x001A9184 File Offset: 0x001A7384
|
||||
[Token(Token = "0x6007ED6")]
|
||||
[Address(RVA = "0x1C69420", Offset = "0x1C67E20", VA = "0x181C69420", Slot = "7")]
|
||||
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest, BigInteger nonce)
|
||||
{
|
||||
string identifier = digestAlgorithm.identifier;
|
||||
return this.Generate(identifier, digest, nonce);
|
||||
}
|
||||
|
||||
// Token: 0x06007ED7 RID: 32471 RVA: 0x001A91A8 File Offset: 0x001A73A8
|
||||
[Token(Token = "0x6007ED7")]
|
||||
[Address(RVA = "0x1C69740", Offset = "0x1C68140", VA = "0x181C69740")]
|
||||
public TimeStampRequestGenerator()
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable();
|
||||
this.extensions = dictionary;
|
||||
IList list = Platform.CreateArrayList();
|
||||
this.extOrdering = list;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x04005A6E RID: 23150
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A6E")]
|
||||
private DerObjectIdentifier reqPolicy;
|
||||
|
||||
// Token: 0x04005A6F RID: 23151
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A6F")]
|
||||
private DerBoolean certReq;
|
||||
|
||||
// Token: 0x04005A70 RID: 23152
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005A70")]
|
||||
private IDictionary extensions;
|
||||
|
||||
// Token: 0x04005A71 RID: 23153
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005A71")]
|
||||
private IList extOrdering;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x0200138E RID: 5006
|
||||
[Token(Token = "0x200138E")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampResponse
|
||||
{
|
||||
// Token: 0x06007ED8 RID: 32472 RVA: 0x001A91DC File Offset: 0x001A73DC
|
||||
[Token(Token = "0x6007ED8")]
|
||||
[Address(RVA = "0x1C6B400", Offset = "0x1C69E00", VA = "0x181C6B400")]
|
||||
public TimeStampResponse(TimeStampResp resp)
|
||||
{
|
||||
this.resp = resp;
|
||||
ContentInfo contentInfo = resp.timeStampToken;
|
||||
if (contentInfo != 0)
|
||||
{
|
||||
TimeStampToken timeStampToken = new TimeStampToken(contentInfo);
|
||||
this.timeStampToken = timeStampToken;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007ED9 RID: 32473 RVA: 0x001A9218 File Offset: 0x001A7418
|
||||
[Token(Token = "0x6007ED9")]
|
||||
[Address(RVA = "0x1C6B300", Offset = "0x1C69D00", VA = "0x181C6B300")]
|
||||
public TimeStampResponse(byte[] resp)
|
||||
{
|
||||
TimeStampResp timeStampResp = TimeStampResponse.readTimeStampResp(new Asn1InputStream(resp));
|
||||
}
|
||||
|
||||
// Token: 0x06007EDA RID: 32474 RVA: 0x001A9234 File Offset: 0x001A7434
|
||||
[Token(Token = "0x6007EDA")]
|
||||
[Address(RVA = "0x1C6B380", Offset = "0x1C69D80", VA = "0x181C6B380")]
|
||||
public TimeStampResponse(Stream input)
|
||||
{
|
||||
TimeStampResp timeStampResp = TimeStampResponse.readTimeStampResp(new Asn1InputStream(input));
|
||||
}
|
||||
|
||||
// Token: 0x06007EDB RID: 32475 RVA: 0x001A9250 File Offset: 0x001A7450
|
||||
[Token(Token = "0x6007EDB")]
|
||||
[Address(RVA = "0x1C6B4D0", Offset = "0x1C69ED0", VA = "0x181C6B4D0")]
|
||||
private static TimeStampResp readTimeStampResp(Asn1InputStream input)
|
||||
{
|
||||
Asn1Object asn1Object = input.ReadObject();
|
||||
return TimeStampResp.GetInstance(asn1Object);
|
||||
}
|
||||
|
||||
// Token: 0x170014BF RID: 5311
|
||||
// (get) Token: 0x06007EDC RID: 32476 RVA: 0x001A9294 File Offset: 0x001A7494
|
||||
[Token(Token = "0x170014BF")]
|
||||
public int Status
|
||||
{
|
||||
[Token(Token = "0x6007EDC")]
|
||||
[Address(RVA = "0x1C6B490", Offset = "0x1C69E90", VA = "0x181C6B490")]
|
||||
get
|
||||
{
|
||||
return this.resp.pkiStatusInfo.Status.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EDD RID: 32477 RVA: 0x001A92BC File Offset: 0x001A74BC
|
||||
[Token(Token = "0x6007EDD")]
|
||||
[Address(RVA = "0x1C6AC30", Offset = "0x1C69630", VA = "0x181C6AC30")]
|
||||
public string GetStatusString()
|
||||
{
|
||||
if (this.resp.pkiStatusInfo.statusString != (ulong)0L)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
PkiFreeText statusString = this.resp.pkiStatusInfo.statusString;
|
||||
int num = 0;
|
||||
int size = statusString.Size;
|
||||
if (num != size)
|
||||
{
|
||||
string @string = statusString[num].GetString();
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append(@string);
|
||||
num++;
|
||||
}
|
||||
int hashCode = stringBuilder.GetHashCode();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007EDE RID: 32478 RVA: 0x001A932C File Offset: 0x001A752C
|
||||
[Token(Token = "0x6007EDE")]
|
||||
[Address(RVA = "0x1C6ABA0", Offset = "0x1C695A0", VA = "0x181C6ABA0")]
|
||||
public PkiFailureInfo GetFailInfo()
|
||||
{
|
||||
DerBitString failInfo = this.resp.pkiStatusInfo.failInfo;
|
||||
if (failInfo != 0)
|
||||
{
|
||||
return new PkiFailureInfo(failInfo);
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x170014C0 RID: 5312
|
||||
// (get) Token: 0x06007EDF RID: 32479 RVA: 0x001A935C File Offset: 0x001A755C
|
||||
[Token(Token = "0x170014C0")]
|
||||
public TimeStampToken TimeStampToken
|
||||
{
|
||||
[Token(Token = "0x6007EDF")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get
|
||||
{
|
||||
return this.timeStampToken;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EE0 RID: 32480 RVA: 0x001A9370 File Offset: 0x001A7570
|
||||
[Token(Token = "0x6007EE0")]
|
||||
[Address(RVA = "0x1C6AD60", Offset = "0x1C69760", VA = "0x181C6AD60")]
|
||||
public void Validate(TimeStampRequest request)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007EE0)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampResponse::Validate(BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequest)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1EE:
|
||||
stloc:TspValidationException(var_24_1F8, newobj:TspValidationException(TspValidationException::.ctor, ldstr:string("TSA policy wrong for request.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007EE1 RID: 32481 RVA: 0x001A9578 File Offset: 0x001A7778
|
||||
[Token(Token = "0x6007EE1")]
|
||||
[Address(RVA = "0x53BEA0", Offset = "0x53A8A0", VA = "0x18053BEA0")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.resp.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x04005A72 RID: 23154
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A72")]
|
||||
private TimeStampResp resp;
|
||||
|
||||
// Token: 0x04005A73 RID: 23155
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A73")]
|
||||
private TimeStampToken timeStampToken;
|
||||
}
|
||||
}
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x0200138F RID: 5007
|
||||
[Token(Token = "0x200138F")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampResponseGenerator
|
||||
{
|
||||
// Token: 0x06007EE2 RID: 32482 RVA: 0x001A9598 File Offset: 0x001A7798
|
||||
[Token(Token = "0x6007EE2")]
|
||||
[Address(RVA = "0x1C6AA40", Offset = "0x1C69440", VA = "0x181C6AA40")]
|
||||
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007EE3 RID: 32483 RVA: 0x001A95AC File Offset: 0x001A77AC
|
||||
[Token(Token = "0x6007EE3")]
|
||||
[Address(RVA = "0x1C6AA60", Offset = "0x1C69460", VA = "0x181C6AA60")]
|
||||
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms, IList acceptedPolicy)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007EE4 RID: 32484 RVA: 0x001A95BC File Offset: 0x001A77BC
|
||||
[Token(Token = "0x6007EE4")]
|
||||
[Address(RVA = "0x1C6AA80", Offset = "0x1C69480", VA = "0x181C6AA80")]
|
||||
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms, IList acceptedPolicies, IList acceptedExtensions)
|
||||
{
|
||||
this.acceptedExtensions = 0;
|
||||
this.tokenGenerator = tokenGenerator;
|
||||
this.acceptedAlgorithms = acceptedAlgorithms;
|
||||
this.acceptedPolicies = acceptedPolicies;
|
||||
Asn1EncodableVector asn1EncodableVector;
|
||||
this.statusStrings = asn1EncodableVector;
|
||||
}
|
||||
|
||||
// Token: 0x06007EE5 RID: 32485 RVA: 0x001A95F4 File Offset: 0x001A77F4
|
||||
[Token(Token = "0x6007EE5")]
|
||||
[Address(RVA = "0x1C6A230", Offset = "0x1C68C30", VA = "0x181C6A230")]
|
||||
private void AddStatusString(string statusString)
|
||||
{
|
||||
Asn1EncodableVector asn1EncodableVector = this.statusStrings;
|
||||
Asn1Encodable[] array = new Asn1Encodable[1];
|
||||
DerUtf8String derUtf8String = new DerUtf8String(statusString);
|
||||
if (derUtf8String != 0)
|
||||
{
|
||||
}
|
||||
array[0] = derUtf8String;
|
||||
asn1EncodableVector.Add(array);
|
||||
}
|
||||
|
||||
// Token: 0x06007EE6 RID: 32486 RVA: 0x001A9630 File Offset: 0x001A7830
|
||||
[Token(Token = "0x6007EE6")]
|
||||
[Address(RVA = "0x1C6AA30", Offset = "0x1C69430", VA = "0x181C6AA30")]
|
||||
private void SetFailInfoField(int field)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007EE7 RID: 32487 RVA: 0x001A9640 File Offset: 0x001A7840
|
||||
[Token(Token = "0x6007EE7")]
|
||||
[Address(RVA = "0x1C6A740", Offset = "0x1C69140", VA = "0x181C6A740")]
|
||||
private PkiStatusInfo GetPkiStatusInfo()
|
||||
{
|
||||
Asn1Encodable[] array = new Asn1Encodable[1];
|
||||
PkiStatus pkiStatus = this.status;
|
||||
int num;
|
||||
DerInteger derInteger = new DerInteger(num);
|
||||
num = (int)pkiStatus;
|
||||
if (derInteger != 0)
|
||||
{
|
||||
}
|
||||
array[0] = derInteger;
|
||||
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
|
||||
if (this.statusStrings.Count > 0)
|
||||
{
|
||||
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
||||
PkiFreeText pkiFreeText = new PkiFreeText(new DerSequence(this.statusStrings));
|
||||
if (pkiFreeText != 0)
|
||||
{
|
||||
}
|
||||
array2[0] = pkiFreeText;
|
||||
asn1EncodableVector.Add(array2);
|
||||
}
|
||||
if (this.failInfo != 0)
|
||||
{
|
||||
Asn1Encodable[] array3 = new Asn1Encodable[1];
|
||||
TimeStampResponseGenerator.FailInfo failInfo = new TimeStampResponseGenerator.FailInfo(this.failInfo);
|
||||
if (failInfo != 0)
|
||||
{
|
||||
}
|
||||
array3[0] = failInfo;
|
||||
asn1EncodableVector.Add(array3);
|
||||
}
|
||||
return new PkiStatusInfo(new DerSequence(asn1EncodableVector));
|
||||
}
|
||||
|
||||
// Token: 0x06007EE8 RID: 32488 RVA: 0x001A9700 File Offset: 0x001A7900
|
||||
[Token(Token = "0x6007EE8")]
|
||||
[Address(RVA = "0x1C6A410", Offset = "0x1C68E10", VA = "0x181C6A410")]
|
||||
public TimeStampResponse Generate(TimeStampRequest request, BigInteger serialNumber, DateTime genTime)
|
||||
{
|
||||
DateTimeObject dateTimeObject;
|
||||
dateTimeObject.dt = genTime;
|
||||
return this.Generate(request, serialNumber, dateTimeObject);
|
||||
}
|
||||
|
||||
// Token: 0x06007EE9 RID: 32489 RVA: 0x001A9720 File Offset: 0x001A7920
|
||||
[Token(Token = "0x6007EE9")]
|
||||
[Address(RVA = "0x1C6A4B0", Offset = "0x1C68EB0", VA = "0x181C6A4B0")]
|
||||
public TimeStampResponse Generate(TimeStampRequest request, BigInteger serialNumber, DateTimeObject genTime)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007EE9)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampResponse BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampResponseGenerator::Generate(BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequest,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date.DateTimeObject)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_D9:
|
||||
stloc:TspValidationException(var_17_E8, newobj:TspValidationException(TspValidationException::.ctor, ldstr:string("The time source is not available."), ldc.i4:int32(512)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007EEA RID: 32490 RVA: 0x001A9818 File Offset: 0x001A7A18
|
||||
[Token(Token = "0x6007EEA")]
|
||||
[Address(RVA = "0x1C6A310", Offset = "0x1C68D10", VA = "0x181C6A310")]
|
||||
public TimeStampResponse GenerateFailResponse(PkiStatus status, int failInfoField, string statusString)
|
||||
{
|
||||
this.status = status;
|
||||
if (statusString != 0)
|
||||
{
|
||||
this.AddStatusString(statusString);
|
||||
}
|
||||
int num;
|
||||
TimeStampResp timeStampResp = new TimeStampResp(this.GetPkiStatusInfo(), num);
|
||||
num = 0;
|
||||
return new TimeStampResponse(timeStampResp);
|
||||
}
|
||||
|
||||
// Token: 0x04005A74 RID: 23156
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A74")]
|
||||
private PkiStatus status;
|
||||
|
||||
// Token: 0x04005A75 RID: 23157
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A75")]
|
||||
private Asn1EncodableVector statusStrings;
|
||||
|
||||
// Token: 0x04005A76 RID: 23158
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005A76")]
|
||||
private int failInfo;
|
||||
|
||||
// Token: 0x04005A77 RID: 23159
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005A77")]
|
||||
private TimeStampTokenGenerator tokenGenerator;
|
||||
|
||||
// Token: 0x04005A78 RID: 23160
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4005A78")]
|
||||
private IList acceptedAlgorithms;
|
||||
|
||||
// Token: 0x04005A79 RID: 23161
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4005A79")]
|
||||
private IList acceptedPolicies;
|
||||
|
||||
// Token: 0x04005A7A RID: 23162
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4005A7A")]
|
||||
private IList acceptedExtensions;
|
||||
|
||||
// Token: 0x02001390 RID: 5008
|
||||
[Token(Token = "0x2001390")]
|
||||
private class FailInfo : DerBitString
|
||||
{
|
||||
// Token: 0x06007EEB RID: 32491 RVA: 0x001A9864 File Offset: 0x001A7A64
|
||||
[Token(Token = "0x6007EEB")]
|
||||
[Address(RVA = "0x1C5F5D0", Offset = "0x1C5DFD0", VA = "0x181C5F5D0")]
|
||||
internal FailInfo(int failInfoValue)
|
||||
: base(failInfoValue)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001391 RID: 5009
|
||||
[Token(Token = "0x2001391")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampToken
|
||||
{
|
||||
// Token: 0x06007EEC RID: 32492 RVA: 0x001A9878 File Offset: 0x001A7A78
|
||||
[Token(Token = "0x6007EEC")]
|
||||
[Address(RVA = "0x1C6C970", Offset = "0x1C6B370", VA = "0x181C6C970")]
|
||||
public TimeStampToken(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.ContentInfo contentInfo)
|
||||
{
|
||||
CmsSignedData cmsSignedData = new CmsSignedData(contentInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06007EED RID: 32493 RVA: 0x001A988C File Offset: 0x001A7A8C
|
||||
[Token(Token = "0x6007EED")]
|
||||
[Address(RVA = "0x1C6C9E0", Offset = "0x1C6B3E0", VA = "0x181C6C9E0")]
|
||||
public TimeStampToken(CmsSignedData signedData)
|
||||
{
|
||||
this.tsToken = signedData;
|
||||
DerObjectIdentifier signedContentType = signedData.SignedContentType;
|
||||
ICollection signers = this.tsToken.GetSignerInfos().GetSigners();
|
||||
if (signers == (ulong)1L)
|
||||
{
|
||||
if (signers == 0)
|
||||
{
|
||||
}
|
||||
int num = 0;
|
||||
if (signers != 0)
|
||||
{
|
||||
this.tsaSignerInfo = signers;
|
||||
CmsProcessable signedContent = this.tsToken.signedContent;
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
if (num < signers)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
Asn1Object asn1Object;
|
||||
TimeStampTokenInfo timeStampTokenInfo = new TimeStampTokenInfo(TstInfo.GetInstance(asn1Object));
|
||||
this.tstInfo = timeStampTokenInfo;
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable signedAttributes = this.tsaSignerInfo.SignedAttributes;
|
||||
DerObjectIdentifier idAASigningCertificate = PkcsObjectIdentifiers.IdAASigningCertificate;
|
||||
TimeStampToken.CertID certID;
|
||||
if (signedAttributes[idAASigningCertificate] == 0)
|
||||
{
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable signedAttributes2 = this.tsaSignerInfo.SignedAttributes;
|
||||
DerObjectIdentifier idAASigningCertificateV = PkcsObjectIdentifiers.IdAASigningCertificateV2;
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.Attribute attribute = signedAttributes2[idAASigningCertificateV];
|
||||
if (attribute == 0)
|
||||
{
|
||||
TspValidationException ex = new TspValidationException("no signing certificate attribute found, time stamp invalid.");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
IEnumerator enumerator = attribute.attrValues.GetEnumerator();
|
||||
int num2 = 0;
|
||||
SigningCertificateV2 signingCertificateV;
|
||||
EssCertIDv2[] certs = signingCertificateV.GetCerts();
|
||||
num2 += num2;
|
||||
EssCertIDv2 instance = EssCertIDv2.GetInstance(certs[0]);
|
||||
certID.certIDv2 = instance;
|
||||
certID.certID = num;
|
||||
}
|
||||
EssCertIDv2 certIDv = certID.certIDv2;
|
||||
SigningCertificate signingCertificate;
|
||||
EssCertID instance2 = EssCertID.GetInstance(signingCertificate.GetCerts()[0]);
|
||||
TimeStampToken.CertID certID2;
|
||||
certID2.certID = instance2;
|
||||
certID2.certIDv2 = num;
|
||||
this.certID = certID2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x170014C1 RID: 5313
|
||||
// (get) Token: 0x06007EEE RID: 32494 RVA: 0x001A9A74 File Offset: 0x001A7C74
|
||||
[Token(Token = "0x170014C1")]
|
||||
public TimeStampTokenInfo TimeStampInfo
|
||||
{
|
||||
[Token(Token = "0x6007EEE")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014C2 RID: 5314
|
||||
// (get) Token: 0x06007EEF RID: 32495 RVA: 0x001A9A88 File Offset: 0x001A7C88
|
||||
[Token(Token = "0x170014C2")]
|
||||
public SignerID SignerID
|
||||
{
|
||||
[Token(Token = "0x6007EEF")]
|
||||
[Address(RVA = "0x540790", Offset = "0x53F190", VA = "0x180540790")]
|
||||
get
|
||||
{
|
||||
return this.tsaSignerInfo.sid;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014C3 RID: 5315
|
||||
// (get) Token: 0x06007EF0 RID: 32496 RVA: 0x001A9AA8 File Offset: 0x001A7CA8
|
||||
[Token(Token = "0x170014C3")]
|
||||
public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable SignedAttributes
|
||||
{
|
||||
[Token(Token = "0x6007EF0")]
|
||||
[Address(RVA = "0x1C6D060", Offset = "0x1C6BA60", VA = "0x181C6D060")]
|
||||
get
|
||||
{
|
||||
return this.tsaSignerInfo.SignedAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014C4 RID: 5316
|
||||
// (get) Token: 0x06007EF1 RID: 32497 RVA: 0x001A9AC8 File Offset: 0x001A7CC8
|
||||
[Token(Token = "0x170014C4")]
|
||||
public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable UnsignedAttributes
|
||||
{
|
||||
[Token(Token = "0x6007EF1")]
|
||||
[Address(RVA = "0x1C6D080", Offset = "0x1C6BA80", VA = "0x181C6D080")]
|
||||
get
|
||||
{
|
||||
return this.tsaSignerInfo.UnsignedAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EF2 RID: 32498 RVA: 0x001A9AE8 File Offset: 0x001A7CE8
|
||||
[Token(Token = "0x6007EF2")]
|
||||
[Address(RVA = "0x1C6C220", Offset = "0x1C6AC20", VA = "0x181C6C220")]
|
||||
public IX509Store GetCertificates(string type)
|
||||
{
|
||||
return this.tsToken.GetCertificates(type);
|
||||
}
|
||||
|
||||
// Token: 0x06007EF3 RID: 32499 RVA: 0x001A9B08 File Offset: 0x001A7D08
|
||||
[Token(Token = "0x6007EF3")]
|
||||
[Address(RVA = "0x1C6C240", Offset = "0x1C6AC40", VA = "0x181C6C240")]
|
||||
public IX509Store GetCrls(string type)
|
||||
{
|
||||
return this.tsToken.GetCrls(type);
|
||||
}
|
||||
|
||||
// Token: 0x06007EF4 RID: 32500 RVA: 0x001A9B28 File Offset: 0x001A7D28
|
||||
[Token(Token = "0x6007EF4")]
|
||||
[Address(RVA = "0x1C6C200", Offset = "0x1C6AC00", VA = "0x181C6C200")]
|
||||
public IX509Store GetAttributeCertificates(string type)
|
||||
{
|
||||
return this.tsToken.GetAttributeCertificates(type);
|
||||
}
|
||||
|
||||
// Token: 0x06007EF5 RID: 32501 RVA: 0x001A9B48 File Offset: 0x001A7D48
|
||||
[Token(Token = "0x6007EF5")]
|
||||
[Address(RVA = "0x1C6C280", Offset = "0x1C6AC80", VA = "0x181C6C280")]
|
||||
public void Validate(X509Certificate cert)
|
||||
{
|
||||
EssCertID essCertID3;
|
||||
for (;;)
|
||||
{
|
||||
TimeStampToken.CertID certID = this.certID;
|
||||
if (certID.certID == (ulong)0L)
|
||||
{
|
||||
DerObjectIdentifier idSha = NistObjectIdentifiers.IdSha256;
|
||||
if (certID.certIDv2.hashAlgorithm.ToAsn1Object() == 0)
|
||||
{
|
||||
Asn1Object asn1Object = certID.certIDv2.hashAlgorithm.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
AsymmetricKeyParameter publicKey = cert.GetPublicKey();
|
||||
EssCertID essCertID = this.certID.certID;
|
||||
if (essCertID != 0)
|
||||
{
|
||||
int length = essCertID.GetCertHash().Length;
|
||||
byte[] array;
|
||||
byte[] array2;
|
||||
if (!Arrays.ConstantTimeAreEqual(array, array2))
|
||||
{
|
||||
goto IL_21A;
|
||||
}
|
||||
TimeStampToken.CertID certID2 = this.certID;
|
||||
EssCertID essCertID2 = certID2.certID;
|
||||
if (essCertID2 != 0)
|
||||
{
|
||||
}
|
||||
if (certID2.certIDv2.issuerSerial == 0)
|
||||
{
|
||||
goto IL_12E;
|
||||
}
|
||||
if (essCertID2 != 0)
|
||||
{
|
||||
DerInteger serial = essCertID2.issuerSerial.serial;
|
||||
if (cert.Version == 0)
|
||||
{
|
||||
goto IL_1C6;
|
||||
}
|
||||
essCertID3 = this.certID.certID;
|
||||
if (essCertID3 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] bytes = essCertID3.issuerSerial.serial.bytes;
|
||||
X509Name issuerX509Principal = PrincipalUtilities.GetIssuerX509Principal(cert);
|
||||
int num = 0;
|
||||
GeneralName[] array3;
|
||||
if (num == array3.Length)
|
||||
{
|
||||
TspValidationException ex = new TspValidationException("certificate name does not match certID for signature. ");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
GeneralName generalName = array3[num];
|
||||
if (generalName.tag != 4 || !X509Name.GetInstance(generalName.obj).Equivalent(issuerX509Principal))
|
||||
{
|
||||
num++;
|
||||
}
|
||||
IL_12E:
|
||||
TspUtil.ValidateCertificate(cert);
|
||||
DateTime genTime = this.tstInfo.genTime;
|
||||
if (!this.tsaSignerInfo.Verify(cert))
|
||||
{
|
||||
TspValidationException ex2 = new TspValidationException("signature not created by certificate.");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
if (!cert.hashValueSet)
|
||||
{
|
||||
return;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
IL_1C6:
|
||||
TspValidationException ex3 = new TspValidationException("certificate serial number does not match certID for signature.");
|
||||
throw new NullReferenceException();
|
||||
IL_21A:
|
||||
TspValidationException ex4 = new TspValidationException("certificate hash does not match certID hash.");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007EF6 RID: 32502 RVA: 0x001A9DAC File Offset: 0x001A7FAC
|
||||
[Token(Token = "0x6007EF6")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
public CmsSignedData ToCmsSignedData()
|
||||
{
|
||||
return this.tsToken;
|
||||
}
|
||||
|
||||
// Token: 0x06007EF7 RID: 32503 RVA: 0x001A9DC0 File Offset: 0x001A7FC0
|
||||
[Token(Token = "0x6007EF7")]
|
||||
[Address(RVA = "0x1C6C260", Offset = "0x1C6AC60", VA = "0x181C6C260")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.tsToken.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x04005A7B RID: 23163
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A7B")]
|
||||
private readonly CmsSignedData tsToken;
|
||||
|
||||
// Token: 0x04005A7C RID: 23164
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A7C")]
|
||||
private readonly SignerInformation tsaSignerInfo;
|
||||
|
||||
// Token: 0x04005A7D RID: 23165
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005A7D")]
|
||||
private readonly TimeStampTokenInfo tstInfo;
|
||||
|
||||
// Token: 0x04005A7E RID: 23166
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005A7E")]
|
||||
private readonly TimeStampToken.CertID certID;
|
||||
|
||||
// Token: 0x02001392 RID: 5010
|
||||
[Token(Token = "0x2001392")]
|
||||
private class CertID
|
||||
{
|
||||
// Token: 0x06007EF8 RID: 32504 RVA: 0x001A9DE0 File Offset: 0x001A7FE0
|
||||
[Token(Token = "0x6007EF8")]
|
||||
[Address(RVA = "0xC25EB0", Offset = "0xC248B0", VA = "0x180C25EB0")]
|
||||
internal CertID(EssCertID certID)
|
||||
{
|
||||
this.certID = certID;
|
||||
this.certIDv2 = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x06007EF9 RID: 32505 RVA: 0x001A9E04 File Offset: 0x001A8004
|
||||
[Token(Token = "0x6007EF9")]
|
||||
[Address(RVA = "0x1C5E760", Offset = "0x1C5D160", VA = "0x181C5E760")]
|
||||
internal CertID(EssCertIDv2 certID)
|
||||
{
|
||||
this.certIDv2 = certID;
|
||||
this.certID = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x06007EFA RID: 32506 RVA: 0x001A9E28 File Offset: 0x001A8028
|
||||
[Token(Token = "0x6007EFA")]
|
||||
[Address(RVA = "0x1C5E5A0", Offset = "0x1C5CFA0", VA = "0x181C5E5A0")]
|
||||
public string GetHashAlgorithmName()
|
||||
{
|
||||
if (this.certID == (ulong)0L)
|
||||
{
|
||||
EssCertIDv2 essCertIDv = this.certIDv2;
|
||||
DerObjectIdentifier idSha = NistObjectIdentifiers.IdSha256;
|
||||
if (essCertIDv.hashAlgorithm.ToAsn1Object() == 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.certIDv2.hashAlgorithm.ToAsn1Object();
|
||||
}
|
||||
return "SHA-256";
|
||||
}
|
||||
return "SHA-1";
|
||||
}
|
||||
|
||||
// Token: 0x06007EFB RID: 32507 RVA: 0x001A9E80 File Offset: 0x001A8080
|
||||
[Token(Token = "0x6007EFB")]
|
||||
[Address(RVA = "0x1C5E6B0", Offset = "0x1C5D0B0", VA = "0x181C5E6B0")]
|
||||
public AlgorithmIdentifier GetHashAlgorithm()
|
||||
{
|
||||
if (this.certID != (ulong)0L)
|
||||
{
|
||||
return new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1);
|
||||
}
|
||||
return this.certIDv2.hashAlgorithm;
|
||||
}
|
||||
|
||||
// Token: 0x06007EFC RID: 32508 RVA: 0x001A9EB4 File Offset: 0x001A80B4
|
||||
[Token(Token = "0x6007EFC")]
|
||||
[Address(RVA = "0x1C5E560", Offset = "0x1C5CF60", VA = "0x181C5E560")]
|
||||
public byte[] GetCertHash()
|
||||
{
|
||||
EssCertID essCertID = this.certID;
|
||||
if (essCertID != 0)
|
||||
{
|
||||
return essCertID.GetCertHash();
|
||||
}
|
||||
return this.certIDv2.GetCertHash();
|
||||
}
|
||||
|
||||
// Token: 0x170014C5 RID: 5317
|
||||
// (get) Token: 0x06007EFD RID: 32509 RVA: 0x001A9EE4 File Offset: 0x001A80E4
|
||||
[Token(Token = "0x170014C5")]
|
||||
public IssuerSerial IssuerSerial
|
||||
{
|
||||
[Token(Token = "0x6007EFD")]
|
||||
[Address(RVA = "0x1C5E790", Offset = "0x1C5D190", VA = "0x181C5E790")]
|
||||
get
|
||||
{
|
||||
EssCertID essCertID = this.certID;
|
||||
if (essCertID != 0)
|
||||
{
|
||||
return essCertID.issuerSerial;
|
||||
}
|
||||
return this.certIDv2.issuerSerial;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005A7F RID: 23167
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A7F")]
|
||||
private EssCertID certID;
|
||||
|
||||
// Token: 0x04005A80 RID: 23168
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A80")]
|
||||
private EssCertIDv2 certIDv2;
|
||||
}
|
||||
}
|
||||
}
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001393 RID: 5011
|
||||
[Token(Token = "0x2001393")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampTokenGenerator
|
||||
{
|
||||
// Token: 0x06007EFE RID: 32510 RVA: 0x001A9F14 File Offset: 0x001A8114
|
||||
[Token(Token = "0x6007EFE")]
|
||||
[Address(RVA = "0x1C6BF20", Offset = "0x1C6A920", VA = "0x181C6BF20")]
|
||||
public TimeStampTokenGenerator(AsymmetricKeyParameter key, X509Certificate cert, string digestOID, string tsaPolicyOID)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007EFF RID: 32511 RVA: 0x001A9F24 File Offset: 0x001A8124
|
||||
[Token(Token = "0x6007EFF")]
|
||||
[Address(RVA = "0x1C6BC40", Offset = "0x1C6A640", VA = "0x181C6BC40")]
|
||||
public TimeStampTokenGenerator(AsymmetricKeyParameter key, X509Certificate cert, string digestOID, string tsaPolicyOID, BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable signedAttr, BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable unsignedAttr)
|
||||
{
|
||||
this.accuracySeconds = (int)((ulong)(-1L));
|
||||
this.accuracyMicros = (int)((ulong)4294967295L);
|
||||
base..ctor();
|
||||
this.key = key;
|
||||
this.cert = cert;
|
||||
this.digestOID = digestOID;
|
||||
this.tsaPolicyOID = 0;
|
||||
this.unsignedAttr = 0;
|
||||
TspUtil.ValidateCertificate(cert);
|
||||
if (cert == 0)
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable();
|
||||
}
|
||||
AsymmetricKeyParameter publicKey = cert.GetPublicKey();
|
||||
byte[] array;
|
||||
EssCertID essCertID = new EssCertID(array);
|
||||
DerObjectIdentifier idAASigningCertificate = PkcsObjectIdentifiers.IdAASigningCertificate;
|
||||
DerSet derSet = new DerSet(new SigningCertificate(essCertID));
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.Attribute attribute = new BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.Attribute(idAASigningCertificate, derSet);
|
||||
IDictionary dictionary2;
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable attributeTable = new BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable(dictionary2);
|
||||
this.signedAttr = attributeTable;
|
||||
}
|
||||
|
||||
// Token: 0x06007F00 RID: 32512 RVA: 0x001A9FF8 File Offset: 0x001A81F8
|
||||
[Token(Token = "0x6007F00")]
|
||||
[Address(RVA = "0x3EDEB0", Offset = "0x3EC8B0", VA = "0x1803EDEB0")]
|
||||
public void SetCertificates(IX509Store certificates)
|
||||
{
|
||||
this.x509Certs = certificates;
|
||||
}
|
||||
|
||||
// Token: 0x06007F01 RID: 32513 RVA: 0x001AA00C File Offset: 0x001A820C
|
||||
[Token(Token = "0x6007F01")]
|
||||
[Address(RVA = "0x3EDEC0", Offset = "0x3EC8C0", VA = "0x1803EDEC0")]
|
||||
public void SetCrls(IX509Store crls)
|
||||
{
|
||||
this.x509Crls = crls;
|
||||
}
|
||||
|
||||
// Token: 0x06007F02 RID: 32514 RVA: 0x001AA020 File Offset: 0x001A8220
|
||||
[Token(Token = "0x6007F02")]
|
||||
[Address(RVA = "0x3C1C90", Offset = "0x3C0690", VA = "0x1803C1C90")]
|
||||
public void SetAccuracySeconds(int accuracySeconds)
|
||||
{
|
||||
this.accuracySeconds = accuracySeconds;
|
||||
}
|
||||
|
||||
// Token: 0x06007F03 RID: 32515 RVA: 0x001AA034 File Offset: 0x001A8234
|
||||
[Token(Token = "0x6007F03")]
|
||||
[Address(RVA = "0x55D5D0", Offset = "0x55BFD0", VA = "0x18055D5D0")]
|
||||
public void SetAccuracyMillis(int accuracyMillis)
|
||||
{
|
||||
this.accuracyMillis = accuracyMillis;
|
||||
}
|
||||
|
||||
// Token: 0x06007F04 RID: 32516 RVA: 0x001AA048 File Offset: 0x001A8248
|
||||
[Token(Token = "0x6007F04")]
|
||||
[Address(RVA = "0x4F8C20", Offset = "0x4F7620", VA = "0x1804F8C20")]
|
||||
public void SetAccuracyMicros(int accuracyMicros)
|
||||
{
|
||||
this.accuracyMicros = accuracyMicros;
|
||||
}
|
||||
|
||||
// Token: 0x06007F05 RID: 32517 RVA: 0x001AA05C File Offset: 0x001A825C
|
||||
[Token(Token = "0x6007F05")]
|
||||
[Address(RVA = "0xF12400", Offset = "0xF10E00", VA = "0x180F12400")]
|
||||
public void SetOrdering(bool ordering)
|
||||
{
|
||||
this.ordering = ordering;
|
||||
}
|
||||
|
||||
// Token: 0x06007F06 RID: 32518 RVA: 0x001AA070 File Offset: 0x001A8270
|
||||
[Token(Token = "0x6007F06")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
public void SetTsa(GeneralName tsa)
|
||||
{
|
||||
this.tsa = tsa;
|
||||
}
|
||||
|
||||
// Token: 0x06007F07 RID: 32519 RVA: 0x001AA084 File Offset: 0x001A8284
|
||||
[Token(Token = "0x6007F07")]
|
||||
[Address(RVA = "0x1C6B5D0", Offset = "0x1C69FD0", VA = "0x181C6B5D0")]
|
||||
public TimeStampToken Generate(TimeStampRequest request, BigInteger serialNumber, DateTime genTime)
|
||||
{
|
||||
Asn1Object asn1Object = request.req.messageImprint.hashAlgorithm.ToAsn1Object();
|
||||
DerNull instance = DerNull.Instance;
|
||||
DerObjectIdentifier derObjectIdentifier;
|
||||
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(derObjectIdentifier, instance);
|
||||
byte[] hashedMessage = request.req.messageImprint.hashedMessage;
|
||||
MessageImprint messageImprint = new MessageImprint(algorithmIdentifier, hashedMessage);
|
||||
int num = this.accuracySeconds;
|
||||
if (this.accuracyMicros > 0)
|
||||
{
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
DerInteger derInteger = new DerInteger(num);
|
||||
}
|
||||
int num3 = this.accuracyMillis;
|
||||
DerInteger derInteger2;
|
||||
if (num3 > 0)
|
||||
{
|
||||
derInteger2 = new DerInteger(num3);
|
||||
}
|
||||
int num4 = this.accuracyMicros;
|
||||
DerInteger derInteger3;
|
||||
if (num4 > 0)
|
||||
{
|
||||
derInteger3 = new DerInteger(num3);
|
||||
}
|
||||
Accuracy accuracy = new Accuracy(num2, derInteger2, derInteger3);
|
||||
}
|
||||
bool flag = this.ordering;
|
||||
if (flag)
|
||||
{
|
||||
DerBoolean instance2 = DerBoolean.GetInstance(flag);
|
||||
}
|
||||
DerInteger nonce = request.req.nonce;
|
||||
if (nonce != 0 && nonce.Value != 0)
|
||||
{
|
||||
DerInteger nonce2 = request.req.nonce;
|
||||
if (nonce2 == 0)
|
||||
{
|
||||
}
|
||||
DerInteger derInteger4 = new DerInteger(nonce2.Value);
|
||||
}
|
||||
DerObjectIdentifier derObjectIdentifier2 = new DerObjectIdentifier(this.tsaPolicyOID);
|
||||
DerObjectIdentifier tsaPolicy = request.req.tsaPolicy;
|
||||
if (tsaPolicy != 0)
|
||||
{
|
||||
string identifier = tsaPolicy.identifier;
|
||||
if (identifier != 0)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier3 = new DerObjectIdentifier(identifier);
|
||||
}
|
||||
}
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(genTime);
|
||||
X509Extensions extensions = request.req.extensions;
|
||||
CmsSignedDataGenerator cmsSignedDataGenerator = new CmsSignedDataGenerator();
|
||||
TstInfo tstInfo;
|
||||
byte[] derEncoded = tstInfo.GetDerEncoded();
|
||||
DerBoolean certReq = request.req.certReq;
|
||||
if (certReq != 0 && certReq.IsTrue)
|
||||
{
|
||||
IX509Store ix509Store = this.x509Certs;
|
||||
cmsSignedDataGenerator.AddCertificates(ix509Store);
|
||||
}
|
||||
IX509Store ix509Store2 = this.x509Crls;
|
||||
cmsSignedDataGenerator.AddCrls(ix509Store2);
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable attributeTable = this.signedAttr;
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable attributeTable2 = this.unsignedAttr;
|
||||
string text = this.digestOID;
|
||||
X509Certificate x509Certificate = this.cert;
|
||||
AsymmetricKeyParameter asymmetricKeyParameter = this.key;
|
||||
cmsSignedDataGenerator.AddSigner(asymmetricKeyParameter, x509Certificate, text, attributeTable, attributeTable2);
|
||||
string identifier2 = PkcsObjectIdentifiers.IdCTTstInfo.identifier;
|
||||
CmsProcessableByteArray cmsProcessableByteArray = new CmsProcessableByteArray(derEncoded);
|
||||
return new TimeStampToken(cmsSignedDataGenerator.Generate(identifier2, cmsProcessableByteArray, true));
|
||||
}
|
||||
|
||||
// Token: 0x04005A81 RID: 23169
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A81")]
|
||||
private int accuracySeconds;
|
||||
|
||||
// Token: 0x04005A82 RID: 23170
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x4005A82")]
|
||||
private int accuracyMillis;
|
||||
|
||||
// Token: 0x04005A83 RID: 23171
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A83")]
|
||||
private int accuracyMicros;
|
||||
|
||||
// Token: 0x04005A84 RID: 23172
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4005A84")]
|
||||
private bool ordering;
|
||||
|
||||
// Token: 0x04005A85 RID: 23173
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005A85")]
|
||||
private GeneralName tsa;
|
||||
|
||||
// Token: 0x04005A86 RID: 23174
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005A86")]
|
||||
private string tsaPolicyOID;
|
||||
|
||||
// Token: 0x04005A87 RID: 23175
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4005A87")]
|
||||
private AsymmetricKeyParameter key;
|
||||
|
||||
// Token: 0x04005A88 RID: 23176
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4005A88")]
|
||||
private X509Certificate cert;
|
||||
|
||||
// Token: 0x04005A89 RID: 23177
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4005A89")]
|
||||
private string digestOID;
|
||||
|
||||
// Token: 0x04005A8A RID: 23178
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4005A8A")]
|
||||
private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable signedAttr;
|
||||
|
||||
// Token: 0x04005A8B RID: 23179
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4005A8B")]
|
||||
private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable unsignedAttr;
|
||||
|
||||
// Token: 0x04005A8C RID: 23180
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4005A8C")]
|
||||
private IX509Store x509Certs;
|
||||
|
||||
// Token: 0x04005A8D RID: 23181
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4005A8D")]
|
||||
private IX509Store x509Crls;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001394 RID: 5012
|
||||
[Token(Token = "0x2001394")]
|
||||
[StructLayout(3)]
|
||||
public class TimeStampTokenInfo
|
||||
{
|
||||
// Token: 0x06007F08 RID: 32520 RVA: 0x001AA284 File Offset: 0x001A8484
|
||||
[Token(Token = "0x6007F08")]
|
||||
[Address(RVA = "0x1C6BF80", Offset = "0x1C6A980", VA = "0x181C6BF80")]
|
||||
public TimeStampTokenInfo(TstInfo tstInfo)
|
||||
{
|
||||
this.tstInfo = tstInfo;
|
||||
DateTime dateTime = tstInfo.genTime.ToDateTime();
|
||||
this.genTime = dateTime;
|
||||
}
|
||||
|
||||
// Token: 0x170014C6 RID: 5318
|
||||
// (get) Token: 0x06007F09 RID: 32521 RVA: 0x001AA2CC File Offset: 0x001A84CC
|
||||
[Token(Token = "0x170014C6")]
|
||||
public bool IsOrdered
|
||||
{
|
||||
[Token(Token = "0x6007F09")]
|
||||
[Address(RVA = "0x1C6C110", Offset = "0x1C6AB10", VA = "0x181C6C110")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.ordering.IsTrue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014C7 RID: 5319
|
||||
// (get) Token: 0x06007F0A RID: 32522 RVA: 0x001AA2F0 File Offset: 0x001A84F0
|
||||
[Token(Token = "0x170014C7")]
|
||||
public Accuracy Accuracy
|
||||
{
|
||||
[Token(Token = "0x6007F0A")]
|
||||
[Address(RVA = "0xA4BA40", Offset = "0xA4A440", VA = "0x180A4BA40")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.accuracy;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014C8 RID: 5320
|
||||
// (get) Token: 0x06007F0B RID: 32523 RVA: 0x001AA310 File Offset: 0x001A8510
|
||||
[Token(Token = "0x170014C8")]
|
||||
public DateTime GenTime
|
||||
{
|
||||
[Token(Token = "0x6007F0B")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get
|
||||
{
|
||||
return this.genTime;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014C9 RID: 5321
|
||||
// (get) Token: 0x06007F0C RID: 32524 RVA: 0x001AA324 File Offset: 0x001A8524
|
||||
[Token(Token = "0x170014C9")]
|
||||
public GenTimeAccuracy GenTimeAccuracy
|
||||
{
|
||||
[Token(Token = "0x6007F0C")]
|
||||
[Address(RVA = "0x1C6C060", Offset = "0x1C6AA60", VA = "0x181C6C060")]
|
||||
get
|
||||
{
|
||||
Accuracy accuracy = this.tstInfo.accuracy;
|
||||
if (accuracy == 0)
|
||||
{
|
||||
}
|
||||
GenTimeAccuracy genTimeAccuracy;
|
||||
genTimeAccuracy.accuracy = accuracy;
|
||||
return genTimeAccuracy;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014CA RID: 5322
|
||||
// (get) Token: 0x06007F0D RID: 32525 RVA: 0x001AA354 File Offset: 0x001A8554
|
||||
[Token(Token = "0x170014CA")]
|
||||
public string Policy
|
||||
{
|
||||
[Token(Token = "0x6007F0D")]
|
||||
[Address(RVA = "0x1C6C1D0", Offset = "0x1C6ABD0", VA = "0x181C6C1D0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.tsaPolicyId.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014CB RID: 5323
|
||||
// (get) Token: 0x06007F0E RID: 32526 RVA: 0x001AA378 File Offset: 0x001A8578
|
||||
[Token(Token = "0x170014CB")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007F0E")]
|
||||
[Address(RVA = "0xC11E40", Offset = "0xC10840", VA = "0x180C11E40")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.serialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014CC RID: 5324
|
||||
// (get) Token: 0x06007F0F RID: 32527 RVA: 0x001AA39C File Offset: 0x001A859C
|
||||
[Token(Token = "0x170014CC")]
|
||||
public GeneralName Tsa
|
||||
{
|
||||
[Token(Token = "0x6007F0F")]
|
||||
[Address(RVA = "0x8A48E0", Offset = "0x8A32E0", VA = "0x1808A48E0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.tsa;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014CD RID: 5325
|
||||
// (get) Token: 0x06007F10 RID: 32528 RVA: 0x001AA3BC File Offset: 0x001A85BC
|
||||
[Token(Token = "0x170014CD")]
|
||||
public BigInteger Nonce
|
||||
{
|
||||
[Token(Token = "0x6007F10")]
|
||||
[Address(RVA = "0x1C6C190", Offset = "0x1C6AB90", VA = "0x181C6C190")]
|
||||
get
|
||||
{
|
||||
DerInteger nonce = this.tstInfo.nonce;
|
||||
if (nonce == 0)
|
||||
{
|
||||
}
|
||||
return nonce.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014CE RID: 5326
|
||||
// (get) Token: 0x06007F11 RID: 32529 RVA: 0x001AA3E8 File Offset: 0x001A85E8
|
||||
[Token(Token = "0x170014CE")]
|
||||
public AlgorithmIdentifier HashAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6007F11")]
|
||||
[Address(RVA = "0x1C6C0E0", Offset = "0x1C6AAE0", VA = "0x181C6C0E0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.messageImprint.hashAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170014CF RID: 5327
|
||||
// (get) Token: 0x06007F12 RID: 32530 RVA: 0x001AA40C File Offset: 0x001A860C
|
||||
[Token(Token = "0x170014CF")]
|
||||
public string MessageImprintAlgOid
|
||||
{
|
||||
[Token(Token = "0x6007F12")]
|
||||
[Address(RVA = "0x1C6C140", Offset = "0x1C6AB40", VA = "0x181C6C140")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.tstInfo.messageImprint.hashAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007F13 RID: 32531 RVA: 0x001AA434 File Offset: 0x001A8634
|
||||
[Token(Token = "0x6007F13")]
|
||||
[Address(RVA = "0x1C6BF50", Offset = "0x1C6A950", VA = "0x181C6BF50")]
|
||||
public byte[] GetMessageImprintDigest()
|
||||
{
|
||||
return this.tstInfo.messageImprint.hashedMessage;
|
||||
}
|
||||
|
||||
// Token: 0x06007F14 RID: 32532 RVA: 0x001AA458 File Offset: 0x001A8658
|
||||
[Token(Token = "0x6007F14")]
|
||||
[Address(RVA = "0x53BEA0", Offset = "0x53A8A0", VA = "0x18053BEA0")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.tstInfo.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x170014D0 RID: 5328
|
||||
// (get) Token: 0x06007F15 RID: 32533 RVA: 0x001AA478 File Offset: 0x001A8678
|
||||
[Token(Token = "0x170014D0")]
|
||||
public TstInfo TstInfo
|
||||
{
|
||||
[Token(Token = "0x6007F15")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005A8E RID: 23182
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A8E")]
|
||||
private TstInfo tstInfo;
|
||||
|
||||
// Token: 0x04005A8F RID: 23183
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A8F")]
|
||||
private DateTime genTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.GM;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001388 RID: 5000
|
||||
[Token(Token = "0x2001388")]
|
||||
[StructLayout(3)]
|
||||
public abstract class TspAlgorithms
|
||||
{
|
||||
// Token: 0x06007EAA RID: 32426 RVA: 0x001A8484 File Offset: 0x001A6684
|
||||
[Token(Token = "0x6007EAA")]
|
||||
[Address(RVA = "0x1C6D0A0", Offset = "0x1C6BAA0", VA = "0x181C6D0A0")]
|
||||
static TspAlgorithms()
|
||||
{
|
||||
string[] array = new string[13];
|
||||
string gost = TspAlgorithms.Gost3411;
|
||||
if (gost != 0)
|
||||
{
|
||||
}
|
||||
array[0] = gost;
|
||||
string gost3411_2012_ = TspAlgorithms.Gost3411_2012_256;
|
||||
if (gost3411_2012_ != 0)
|
||||
{
|
||||
}
|
||||
array[1] = gost3411_2012_;
|
||||
string gost3411_2012_2 = TspAlgorithms.Gost3411_2012_512;
|
||||
if (gost3411_2012_2 != 0)
|
||||
{
|
||||
}
|
||||
array[2] = gost3411_2012_2;
|
||||
string md = TspAlgorithms.MD5;
|
||||
if (md != 0)
|
||||
{
|
||||
}
|
||||
array[3] = md;
|
||||
string ripeMD = TspAlgorithms.RipeMD128;
|
||||
if (ripeMD != 0)
|
||||
{
|
||||
}
|
||||
array[4] = ripeMD;
|
||||
string ripeMD2 = TspAlgorithms.RipeMD160;
|
||||
if (ripeMD2 != 0)
|
||||
{
|
||||
}
|
||||
array[5] = ripeMD2;
|
||||
string ripeMD3 = TspAlgorithms.RipeMD256;
|
||||
if (ripeMD3 != 0)
|
||||
{
|
||||
}
|
||||
array[6] = ripeMD3;
|
||||
string sha = TspAlgorithms.Sha1;
|
||||
if (sha != 0)
|
||||
{
|
||||
}
|
||||
array[7] = sha;
|
||||
string sha2 = TspAlgorithms.Sha224;
|
||||
if (sha2 != 0)
|
||||
{
|
||||
}
|
||||
array[8] = sha2;
|
||||
string sha3 = TspAlgorithms.Sha256;
|
||||
if (sha3 != 0)
|
||||
{
|
||||
}
|
||||
array[9] = sha3;
|
||||
string sha4 = TspAlgorithms.Sha384;
|
||||
if (sha4 != 0)
|
||||
{
|
||||
}
|
||||
array[10] = sha4;
|
||||
string sha5 = TspAlgorithms.Sha512;
|
||||
if (sha5 != 0)
|
||||
{
|
||||
}
|
||||
array[11] = sha5;
|
||||
string sm = TspAlgorithms.SM3;
|
||||
if (sm != 0)
|
||||
{
|
||||
}
|
||||
array[12] = sm;
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num = 0;
|
||||
TspAlgorithms.Allowed = list;
|
||||
int length = array.Length;
|
||||
if (num < length)
|
||||
{
|
||||
IList allowed = TspAlgorithms.Allowed;
|
||||
string text = array[num];
|
||||
num += num;
|
||||
num++;
|
||||
num++;
|
||||
text += text;
|
||||
num += 2;
|
||||
num += 19;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007EAB RID: 32427 RVA: 0x001A86CC File Offset: 0x001A68CC
|
||||
[Token(Token = "0x6007EAB")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
protected TspAlgorithms()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005A59 RID: 23129
|
||||
[Token(Token = "0x4005A59")]
|
||||
public static readonly string MD5 = PkcsObjectIdentifiers.MD5.identifier;
|
||||
|
||||
// Token: 0x04005A5A RID: 23130
|
||||
[Token(Token = "0x4005A5A")]
|
||||
public static readonly string Sha1 = OiwObjectIdentifiers.IdSha1.identifier;
|
||||
|
||||
// Token: 0x04005A5B RID: 23131
|
||||
[Token(Token = "0x4005A5B")]
|
||||
public static readonly string Sha224 = NistObjectIdentifiers.IdSha224.identifier;
|
||||
|
||||
// Token: 0x04005A5C RID: 23132
|
||||
[Token(Token = "0x4005A5C")]
|
||||
public static readonly string Sha256 = NistObjectIdentifiers.IdSha256.identifier;
|
||||
|
||||
// Token: 0x04005A5D RID: 23133
|
||||
[Token(Token = "0x4005A5D")]
|
||||
public static readonly string Sha384 = NistObjectIdentifiers.IdSha384.identifier;
|
||||
|
||||
// Token: 0x04005A5E RID: 23134
|
||||
[Token(Token = "0x4005A5E")]
|
||||
public static readonly string Sha512 = NistObjectIdentifiers.IdSha512.identifier;
|
||||
|
||||
// Token: 0x04005A5F RID: 23135
|
||||
[Token(Token = "0x4005A5F")]
|
||||
public static readonly string RipeMD128 = TeleTrusTObjectIdentifiers.RipeMD128.identifier;
|
||||
|
||||
// Token: 0x04005A60 RID: 23136
|
||||
[Token(Token = "0x4005A60")]
|
||||
public static readonly string RipeMD160 = TeleTrusTObjectIdentifiers.RipeMD160.identifier;
|
||||
|
||||
// Token: 0x04005A61 RID: 23137
|
||||
[Token(Token = "0x4005A61")]
|
||||
public static readonly string RipeMD256 = TeleTrusTObjectIdentifiers.RipeMD256.identifier;
|
||||
|
||||
// Token: 0x04005A62 RID: 23138
|
||||
[Token(Token = "0x4005A62")]
|
||||
public static readonly string Gost3411 = CryptoProObjectIdentifiers.GostR3411.identifier;
|
||||
|
||||
// Token: 0x04005A63 RID: 23139
|
||||
[Token(Token = "0x4005A63")]
|
||||
public static readonly string Gost3411_2012_256 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256.identifier;
|
||||
|
||||
// Token: 0x04005A64 RID: 23140
|
||||
[Token(Token = "0x4005A64")]
|
||||
public static readonly string Gost3411_2012_512 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512.identifier;
|
||||
|
||||
// Token: 0x04005A65 RID: 23141
|
||||
[Token(Token = "0x4005A65")]
|
||||
public static readonly string SM3 = GMObjectIdentifiers.sm3.identifier;
|
||||
|
||||
// Token: 0x04005A66 RID: 23142
|
||||
[Token(Token = "0x4005A66")]
|
||||
public static readonly IList Allowed;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001389 RID: 5001
|
||||
[Token(Token = "0x2001389")]
|
||||
[Serializable]
|
||||
[StructLayout(3)]
|
||||
public class TspException : Exception
|
||||
{
|
||||
// Token: 0x06007EAC RID: 32428 RVA: 0x001A86E0 File Offset: 0x001A68E0
|
||||
[Token(Token = "0x6007EAC")]
|
||||
[Address(RVA = "0x1C6DA50", Offset = "0x1C6C450", VA = "0x181C6DA50")]
|
||||
public TspException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007EAD RID: 32429 RVA: 0x001A86F4 File Offset: 0x001A68F4
|
||||
[Token(Token = "0x6007EAD")]
|
||||
[Address(RVA = "0x1C6DAB0", Offset = "0x1C6C4B0", VA = "0x181C6DAB0")]
|
||||
public TspException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007EAE RID: 32430 RVA: 0x001A8708 File Offset: 0x001A6908
|
||||
[Token(Token = "0x6007EAE")]
|
||||
[Address(RVA = "0x1C6DB20", Offset = "0x1C6C520", VA = "0x181C6DB20")]
|
||||
public TspException(string message, Exception e)
|
||||
: base(message, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.GM;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Cms;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x0200138A RID: 5002
|
||||
[Token(Token = "0x200138A")]
|
||||
[StructLayout(3)]
|
||||
public class TspUtil
|
||||
{
|
||||
// Token: 0x06007EAF RID: 32431 RVA: 0x001A8720 File Offset: 0x001A6920
|
||||
[Token(Token = "0x6007EAF")]
|
||||
[Address(RVA = "0x1C6E950", Offset = "0x1C6D350", VA = "0x181C6E950")]
|
||||
static TspUtil()
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable();
|
||||
HashSet hashSet;
|
||||
hashSet.impl = dictionary;
|
||||
UnmodifiableSetProxy unmodifiableSetProxy;
|
||||
unmodifiableSetProxy.s = hashSet;
|
||||
TspUtil.EmptySet = unmodifiableSetProxy;
|
||||
IList list = Platform.CreateArrayList();
|
||||
UnmodifiableListProxy unmodifiableListProxy;
|
||||
unmodifiableListProxy.l = list;
|
||||
TspUtil.EmptyList = unmodifiableListProxy;
|
||||
IDictionary dictionary2 = Platform.CreateHashtable();
|
||||
TspUtil.digestLengths = dictionary2;
|
||||
TspUtil.digestNames = Platform.CreateHashtable();
|
||||
IDictionary dictionary3 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier md = PkcsObjectIdentifiers.MD5;
|
||||
IDictionary dictionary4 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha = OiwObjectIdentifiers.IdSha1;
|
||||
IDictionary dictionary5 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha2 = NistObjectIdentifiers.IdSha224;
|
||||
IDictionary dictionary6 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha3 = NistObjectIdentifiers.IdSha256;
|
||||
IDictionary dictionary7 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha4 = NistObjectIdentifiers.IdSha384;
|
||||
IDictionary dictionary8 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha5 = NistObjectIdentifiers.IdSha512;
|
||||
IDictionary dictionary9 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier ripeMD = TeleTrusTObjectIdentifiers.RipeMD128;
|
||||
IDictionary dictionary10 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier ripeMD2 = TeleTrusTObjectIdentifiers.RipeMD160;
|
||||
IDictionary dictionary11 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier ripeMD3 = TeleTrusTObjectIdentifiers.RipeMD256;
|
||||
IDictionary dictionary12 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier gostR = CryptoProObjectIdentifiers.GostR3411;
|
||||
IDictionary dictionary13 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_ = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256;
|
||||
IDictionary dictionary14 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_2 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512;
|
||||
IDictionary dictionary15 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier sm = GMObjectIdentifiers.sm3;
|
||||
IDictionary dictionary16 = TspUtil.digestNames;
|
||||
DerObjectIdentifier md2 = PkcsObjectIdentifiers.MD5;
|
||||
IDictionary dictionary17 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha6 = OiwObjectIdentifiers.IdSha1;
|
||||
IDictionary dictionary18 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha7 = NistObjectIdentifiers.IdSha224;
|
||||
IDictionary dictionary19 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha8 = NistObjectIdentifiers.IdSha256;
|
||||
IDictionary dictionary20 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha9 = NistObjectIdentifiers.IdSha384;
|
||||
IDictionary dictionary21 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha10 = NistObjectIdentifiers.IdSha512;
|
||||
IDictionary dictionary22 = TspUtil.digestNames;
|
||||
DerObjectIdentifier md5WithRsaEncryption = PkcsObjectIdentifiers.MD5WithRsaEncryption;
|
||||
IDictionary dictionary23 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha1WithRsaEncryption = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
|
||||
IDictionary dictionary24 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha224WithRsaEncryption = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
|
||||
IDictionary dictionary25 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha256WithRsaEncryption = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
|
||||
IDictionary dictionary26 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha384WithRsaEncryption = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
|
||||
IDictionary dictionary27 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha512WithRsaEncryption = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
|
||||
IDictionary dictionary28 = TspUtil.digestNames;
|
||||
DerObjectIdentifier ripeMD4 = TeleTrusTObjectIdentifiers.RipeMD128;
|
||||
IDictionary dictionary29 = TspUtil.digestNames;
|
||||
DerObjectIdentifier ripeMD5 = TeleTrusTObjectIdentifiers.RipeMD160;
|
||||
IDictionary dictionary30 = TspUtil.digestNames;
|
||||
DerObjectIdentifier ripeMD6 = TeleTrusTObjectIdentifiers.RipeMD256;
|
||||
IDictionary dictionary31 = TspUtil.digestNames;
|
||||
DerObjectIdentifier gostR2 = CryptoProObjectIdentifiers.GostR3411;
|
||||
IDictionary dictionary32 = TspUtil.digestNames;
|
||||
DerObjectIdentifier dsaWithSha = OiwObjectIdentifiers.DsaWithSha1;
|
||||
IDictionary dictionary33 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha1WithRsa = OiwObjectIdentifiers.Sha1WithRsa;
|
||||
IDictionary dictionary34 = TspUtil.digestNames;
|
||||
DerObjectIdentifier md5WithRsa = OiwObjectIdentifiers.MD5WithRsa;
|
||||
IDictionary dictionary35 = TspUtil.digestNames;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_3 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256;
|
||||
IDictionary dictionary36 = TspUtil.digestNames;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_4 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512;
|
||||
IDictionary dictionary37 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sm2 = GMObjectIdentifiers.sm3;
|
||||
}
|
||||
|
||||
// Token: 0x06007EB0 RID: 32432 RVA: 0x001A8974 File Offset: 0x001A6B74
|
||||
[Token(Token = "0x6007EB0")]
|
||||
[Address(RVA = "0x1C6E0B0", Offset = "0x1C6CAB0", VA = "0x181C6E0B0")]
|
||||
public static ICollection GetSignatureTimestamps(SignerInformation signerInfo)
|
||||
{
|
||||
byte[] array;
|
||||
do
|
||||
{
|
||||
IList list = Platform.CreateArrayList();
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable unsignedAttributes = signerInfo.UnsignedAttributes;
|
||||
if (unsignedAttributes == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
DerObjectIdentifier idAASignatureTimeStampToken = PkcsObjectIdentifiers.IdAASignatureTimeStampToken;
|
||||
IEnumerator enumerator = unsignedAttributes.GetAll(idAASignatureTimeStampToken).GetEnumerator();
|
||||
if (enumerator != 0)
|
||||
{
|
||||
if (enumerator == 0 || enumerator == 0)
|
||||
{
|
||||
goto IL_110;
|
||||
}
|
||||
BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.ContentInfo contentInfo;
|
||||
TimeStampTokenInfo tstInfo = new TimeStampToken(contentInfo).tstInfo;
|
||||
byte[] array2;
|
||||
array = DigestUtilities.CalculateDigest(TspUtil.GetDigestAlgName(tstInfo.MessageImprintAlgOid), array2);
|
||||
byte[] hashedMessage = tstInfo.tstInfo.messageImprint.hashedMessage;
|
||||
if (!Arrays.ConstantTimeAreEqual(array, hashedMessage))
|
||||
{
|
||||
goto IL_BC;
|
||||
}
|
||||
if ((uint)(-1) != 0U)
|
||||
{
|
||||
}
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
if (array != 0)
|
||||
{
|
||||
goto IL_10A;
|
||||
}
|
||||
}
|
||||
if ((uint)(-1) != 0U)
|
||||
{
|
||||
}
|
||||
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
}
|
||||
while (array != 0);
|
||||
throw new NullReferenceException();
|
||||
IL_BC:
|
||||
TspValidationException ex = new TspValidationException("Incorrect digest in message imprint");
|
||||
throw new NullReferenceException();
|
||||
IL_10A:
|
||||
throw new NullReferenceException();
|
||||
IL_110:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007EB1 RID: 32433 RVA: 0x001A8A9C File Offset: 0x001A6C9C
|
||||
[Token(Token = "0x6007EB1")]
|
||||
[Address(RVA = "0x1C6E670", Offset = "0x1C6D070", VA = "0x181C6E670")]
|
||||
public static void ValidateCertificate(X509Certificate cert)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007EB1)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TspUtil::ValidateCertificate(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_57:
|
||||
stloc:TspValidationException(var_6_61, newobj:TspValidationException(TspValidationException::.ctor, ldstr:string("Certificate must have an ExtendedKeyUsage extension marked as critical.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007EB2 RID: 32434 RVA: 0x001A8B0C File Offset: 0x001A6D0C
|
||||
[Token(Token = "0x6007EB2")]
|
||||
[Address(RVA = "0x1C6DD00", Offset = "0x1C6C700", VA = "0x181C6DD00")]
|
||||
internal static string GetDigestAlgName(string digestAlgOID)
|
||||
{
|
||||
IDictionary dictionary = TspUtil.digestNames;
|
||||
return digestAlgOID;
|
||||
}
|
||||
|
||||
// Token: 0x06007EB3 RID: 32435 RVA: 0x001A8B28 File Offset: 0x001A6D28
|
||||
[Token(Token = "0x6007EB3")]
|
||||
[Address(RVA = "0x1C6DDB0", Offset = "0x1C6C7B0", VA = "0x181C6DDB0")]
|
||||
internal static int GetDigestLength(string digestAlgOID)
|
||||
{
|
||||
IDictionary dictionary = TspUtil.digestLengths;
|
||||
IDictionary dictionary2 = TspUtil.digestLengths;
|
||||
ISet emptySet = TspUtil.EmptySet;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007EB4 RID: 32436 RVA: 0x001A8B5C File Offset: 0x001A6D5C
|
||||
[Token(Token = "0x6007EB4")]
|
||||
[Address(RVA = "0x1C6DBA0", Offset = "0x1C6C5A0", VA = "0x181C6DBA0")]
|
||||
internal static IDigest CreateDigestInstance(string digestAlgOID)
|
||||
{
|
||||
return DigestUtilities.GetDigest(TspUtil.GetDigestAlgName(digestAlgOID));
|
||||
}
|
||||
|
||||
// Token: 0x06007EB5 RID: 32437 RVA: 0x001A8B74 File Offset: 0x001A6D74
|
||||
[Token(Token = "0x6007EB5")]
|
||||
[Address(RVA = "0x1C6DC20", Offset = "0x1C6C620", VA = "0x181C6DC20")]
|
||||
internal static ISet GetCriticalExtensionOids(X509Extensions extensions)
|
||||
{
|
||||
if (extensions != 0)
|
||||
{
|
||||
HashSet hashSet = new HashSet(extensions.GetCriticalExtensionOids());
|
||||
UnmodifiableSetProxy unmodifiableSetProxy;
|
||||
unmodifiableSetProxy.s = hashSet;
|
||||
}
|
||||
return TspUtil.EmptySet;
|
||||
}
|
||||
|
||||
// Token: 0x06007EB6 RID: 32438 RVA: 0x001A8BA0 File Offset: 0x001A6DA0
|
||||
[Token(Token = "0x6007EB6")]
|
||||
[Address(RVA = "0x1C6DFD0", Offset = "0x1C6C9D0", VA = "0x181C6DFD0")]
|
||||
internal static ISet GetNonCriticalExtensionOids(X509Extensions extensions)
|
||||
{
|
||||
if (extensions != 0)
|
||||
{
|
||||
HashSet hashSet = new HashSet(extensions.GetNonCriticalExtensionOids());
|
||||
UnmodifiableSetProxy unmodifiableSetProxy;
|
||||
unmodifiableSetProxy.s = hashSet;
|
||||
}
|
||||
return TspUtil.EmptySet;
|
||||
}
|
||||
|
||||
// Token: 0x06007EB7 RID: 32439 RVA: 0x001A8BCC File Offset: 0x001A6DCC
|
||||
[Token(Token = "0x6007EB7")]
|
||||
[Address(RVA = "0x1C6DEE0", Offset = "0x1C6C8E0", VA = "0x181C6DEE0")]
|
||||
internal static IList GetExtensionOids(X509Extensions extensions)
|
||||
{
|
||||
if (extensions != 0)
|
||||
{
|
||||
IList list = Platform.CreateArrayList(extensions.GetExtensionOids());
|
||||
UnmodifiableListProxy unmodifiableListProxy;
|
||||
unmodifiableListProxy.l = list;
|
||||
}
|
||||
return TspUtil.EmptyList;
|
||||
}
|
||||
|
||||
// Token: 0x06007EB8 RID: 32440 RVA: 0x001A8BF8 File Offset: 0x001A6DF8
|
||||
[Token(Token = "0x6007EB8")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public TspUtil()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005A67 RID: 23143
|
||||
[Token(Token = "0x4005A67")]
|
||||
private static ISet EmptySet;
|
||||
|
||||
// Token: 0x04005A68 RID: 23144
|
||||
[Token(Token = "0x4005A68")]
|
||||
private static IList EmptyList;
|
||||
|
||||
// Token: 0x04005A69 RID: 23145
|
||||
[Token(Token = "0x4005A69")]
|
||||
private static readonly IDictionary digestLengths;
|
||||
|
||||
// Token: 0x04005A6A RID: 23146
|
||||
[Token(Token = "0x4005A6A")]
|
||||
private static readonly IDictionary digestNames;
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x0200138B RID: 5003
|
||||
[Token(Token = "0x200138B")]
|
||||
[Serializable]
|
||||
[StructLayout(3)]
|
||||
public class TspValidationException : TspException
|
||||
{
|
||||
// Token: 0x06007EB9 RID: 32441 RVA: 0x001A8C0C File Offset: 0x001A6E0C
|
||||
[Token(Token = "0x6007EB9")]
|
||||
[Address(RVA = "0x1C6F940", Offset = "0x1C6E340", VA = "0x181C6F940")]
|
||||
public TspValidationException(string message)
|
||||
: base(message)
|
||||
{
|
||||
this.failureCode = (int)((ulong)4294967295L);
|
||||
}
|
||||
|
||||
// Token: 0x06007EBA RID: 32442 RVA: 0x001A8C30 File Offset: 0x001A6E30
|
||||
[Token(Token = "0x6007EBA")]
|
||||
[Address(RVA = "0x1C6F8C0", Offset = "0x1C6E2C0", VA = "0x181C6F8C0")]
|
||||
public TspValidationException(string message, int failureCode)
|
||||
: base(message)
|
||||
{
|
||||
this.failureCode = failureCode;
|
||||
}
|
||||
|
||||
// Token: 0x170014B7 RID: 5303
|
||||
// (get) Token: 0x06007EBB RID: 32443 RVA: 0x001A8C4C File Offset: 0x001A6E4C
|
||||
[Token(Token = "0x170014B7")]
|
||||
public int FailureCode
|
||||
{
|
||||
[Token(Token = "0x6007EBB")]
|
||||
[Address(RVA = "0x54D7F0", Offset = "0x54C1F0", VA = "0x18054D7F0")]
|
||||
get
|
||||
{
|
||||
return this.failureCode;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005A6B RID: 23147
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x4005A6B")]
|
||||
private int failureCode;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user