m
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001A44 RID: 6724
|
||||
[Token(Token = "0x2001A44")]
|
||||
public class GenTimeAccuracy
|
||||
{
|
||||
// Token: 0x06009E4C RID: 40524 RVA: 0x002089C0 File Offset: 0x00206BC0
|
||||
[Token(Token = "0x6009E4C")]
|
||||
[Address(RVA = "0x493D90", Offset = "0x492D90", VA = "0x180493D90")]
|
||||
public GenTimeAccuracy(Accuracy accuracy)
|
||||
{
|
||||
this.accuracy = accuracy;
|
||||
}
|
||||
|
||||
// Token: 0x17001952 RID: 6482
|
||||
// (get) Token: 0x06009E4D RID: 40525 RVA: 0x002089DC File Offset: 0x00206BDC
|
||||
[Token(Token = "0x17001952")]
|
||||
public int Seconds
|
||||
{
|
||||
[Token(Token = "0x6009E4D")]
|
||||
[Address(RVA = "0x5DB090", Offset = "0x5DA090", VA = "0x1805DB090")]
|
||||
get
|
||||
{
|
||||
DerInteger seconds = this.accuracy.seconds;
|
||||
if (seconds == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return seconds.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001953 RID: 6483
|
||||
// (get) Token: 0x06009E4E RID: 40526 RVA: 0x00208A0C File Offset: 0x00206C0C
|
||||
[Token(Token = "0x17001953")]
|
||||
public int Millis
|
||||
{
|
||||
[Token(Token = "0x6009E4E")]
|
||||
[Address(RVA = "0x5DB050", Offset = "0x5DA050", VA = "0x1805DB050")]
|
||||
get
|
||||
{
|
||||
DerInteger millis = this.accuracy.millis;
|
||||
if (millis == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return millis.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001954 RID: 6484
|
||||
// (get) Token: 0x06009E4F RID: 40527 RVA: 0x00208A3C File Offset: 0x00206C3C
|
||||
[Token(Token = "0x17001954")]
|
||||
public int Micros
|
||||
{
|
||||
[Token(Token = "0x6009E4F")]
|
||||
[Address(RVA = "0x5DB010", Offset = "0x5DA010", VA = "0x1805DB010")]
|
||||
get
|
||||
{
|
||||
DerInteger micros = this.accuracy.micros;
|
||||
if (micros == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return micros.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E50 RID: 40528 RVA: 0x00208A6C File Offset: 0x00206C6C
|
||||
[Token(Token = "0x6009E50")]
|
||||
[Address(RVA = "0x5DAD40", Offset = "0x5D9D40", VA = "0x1805DAD40")]
|
||||
private int GetTimeComponent(DerInteger time)
|
||||
{
|
||||
if (time == 0)
|
||||
{
|
||||
}
|
||||
return time.Value.IntValue;
|
||||
}
|
||||
|
||||
// Token: 0x06009E51 RID: 40529 RVA: 0x00208A90 File Offset: 0x00206C90
|
||||
[Token(Token = "0x6009E51")]
|
||||
[Address(RVA = "0x5DAD80", Offset = "0x5D9D80", VA = "0x1805DAD80", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
object[] array = new object[0];
|
||||
DerInteger seconds = this.accuracy.seconds;
|
||||
if (seconds == 0)
|
||||
{
|
||||
}
|
||||
int intValue = seconds.Value.IntValue;
|
||||
if (intValue != 0)
|
||||
{
|
||||
}
|
||||
array[0] = intValue;
|
||||
if ("." != 0)
|
||||
{
|
||||
}
|
||||
array[1] = ".";
|
||||
DerInteger millis = this.accuracy.millis;
|
||||
if (millis == 0)
|
||||
{
|
||||
}
|
||||
int intValue2 = millis.Value.IntValue;
|
||||
string text;
|
||||
if (text != 0)
|
||||
{
|
||||
}
|
||||
array[2] = text;
|
||||
DerInteger micros = this.accuracy.micros;
|
||||
if (micros != 0)
|
||||
{
|
||||
int intValue3 = micros.Value.IntValue;
|
||||
}
|
||||
string text2;
|
||||
if (text2 != 0)
|
||||
{
|
||||
}
|
||||
array[3] = text2;
|
||||
return string.Concat(array);
|
||||
}
|
||||
|
||||
// Token: 0x04006A54 RID: 27220
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A54")]
|
||||
private Accuracy accuracy;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001A49 RID: 6729
|
||||
[Token(Token = "0x2001A49")]
|
||||
public class TimeStampRequest : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06009E64 RID: 40548 RVA: 0x002092FC File Offset: 0x002074FC
|
||||
[Token(Token = "0x6009E64")]
|
||||
[Address(RVA = "0x5EFDA0", Offset = "0x5EEDA0", VA = "0x1805EFDA0")]
|
||||
public TimeStampRequest(TimeStampReq req)
|
||||
{
|
||||
this.req = req;
|
||||
X509Extensions x509Extensions = req.extensions;
|
||||
this.extensions = x509Extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06009E65 RID: 40549 RVA: 0x0020932C File Offset: 0x0020752C
|
||||
[Token(Token = "0x6009E65")]
|
||||
[Address(RVA = "0x5EFD30", Offset = "0x5EED30", VA = "0x1805EFD30")]
|
||||
public TimeStampRequest(byte[] req)
|
||||
{
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(req);
|
||||
}
|
||||
|
||||
// Token: 0x06009E66 RID: 40550 RVA: 0x00209340 File Offset: 0x00207540
|
||||
[Token(Token = "0x6009E66")]
|
||||
[Address(RVA = "0x5EFCC0", Offset = "0x5EECC0", VA = "0x1805EFCC0")]
|
||||
public TimeStampRequest(Stream input)
|
||||
{
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(input);
|
||||
}
|
||||
|
||||
// Token: 0x06009E67 RID: 40551 RVA: 0x00209354 File Offset: 0x00207554
|
||||
[Token(Token = "0x6009E67")]
|
||||
[Address(RVA = "0x5EFBB0", Offset = "0x5EEBB0", VA = "0x1805EFBB0")]
|
||||
private TimeStampRequest(Asn1InputStream str)
|
||||
{
|
||||
Asn1Object asn1Object = str.ReadObject();
|
||||
TimeStampReq instance = TimeStampReq.GetInstance(asn1Object);
|
||||
this.req = instance;
|
||||
}
|
||||
|
||||
// Token: 0x17001956 RID: 6486
|
||||
// (get) Token: 0x06009E68 RID: 40552 RVA: 0x00209398 File Offset: 0x00207598
|
||||
[Token(Token = "0x17001956")]
|
||||
public int Version
|
||||
{
|
||||
[Token(Token = "0x6009E68")]
|
||||
[Address(RVA = "0x5EFF00", Offset = "0x5EEF00", VA = "0x1805EFF00")]
|
||||
get
|
||||
{
|
||||
return this.req.version.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001957 RID: 6487
|
||||
// (get) Token: 0x06009E69 RID: 40553 RVA: 0x002093C0 File Offset: 0x002075C0
|
||||
[Token(Token = "0x17001957")]
|
||||
public string MessageImprintAlgOid
|
||||
{
|
||||
[Token(Token = "0x6009E69")]
|
||||
[Address(RVA = "0x5EFE30", Offset = "0x5EEE30", VA = "0x1805EFE30")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.req.messageImprint.hashAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E6A RID: 40554 RVA: 0x002093E8 File Offset: 0x002075E8
|
||||
[Token(Token = "0x6009E6A")]
|
||||
[Address(RVA = "0x5EF6E0", Offset = "0x5EE6E0", VA = "0x1805EF6E0")]
|
||||
public byte[] GetMessageImprintDigest()
|
||||
{
|
||||
return this.req.messageImprint.hashedMessage;
|
||||
}
|
||||
|
||||
// Token: 0x17001958 RID: 6488
|
||||
// (get) Token: 0x06009E6B RID: 40555 RVA: 0x0020940C File Offset: 0x0020760C
|
||||
[Token(Token = "0x17001958")]
|
||||
public string ReqPolicy
|
||||
{
|
||||
[Token(Token = "0x6009E6B")]
|
||||
[Address(RVA = "0x5EFEC0", Offset = "0x5EEEC0", VA = "0x1805EFEC0")]
|
||||
get
|
||||
{
|
||||
DerObjectIdentifier tsaPolicy = this.req.tsaPolicy;
|
||||
if (tsaPolicy == 0)
|
||||
{
|
||||
}
|
||||
return tsaPolicy.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001959 RID: 6489
|
||||
// (get) Token: 0x06009E6C RID: 40556 RVA: 0x00209438 File Offset: 0x00207638
|
||||
[Token(Token = "0x17001959")]
|
||||
public BigInteger Nonce
|
||||
{
|
||||
[Token(Token = "0x6009E6C")]
|
||||
[Address(RVA = "0x5EFE80", Offset = "0x5EEE80", VA = "0x1805EFE80")]
|
||||
get
|
||||
{
|
||||
DerInteger nonce = this.req.nonce;
|
||||
if (nonce == 0)
|
||||
{
|
||||
}
|
||||
return nonce.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700195A RID: 6490
|
||||
// (get) Token: 0x06009E6D RID: 40557 RVA: 0x00209464 File Offset: 0x00207664
|
||||
[Token(Token = "0x1700195A")]
|
||||
public bool CertReq
|
||||
{
|
||||
[Token(Token = "0x6009E6D")]
|
||||
[Address(RVA = "0x5EFDE0", Offset = "0x5EEDE0", VA = "0x1805EFDE0")]
|
||||
get
|
||||
{
|
||||
DerBoolean certReq = this.req.certReq;
|
||||
if (certReq == 0)
|
||||
{
|
||||
}
|
||||
return certReq.IsTrue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E6E RID: 40558 RVA: 0x00209490 File Offset: 0x00207690
|
||||
[Token(Token = "0x6009E6E")]
|
||||
[Address(RVA = "0x5EF730", Offset = "0x5EE730", VA = "0x1805EF730")]
|
||||
public void Validate(IList algorithms, IList policies, IList extensions)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009E6E)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequest::Validate(System.Collections.IList,System.Collections.IList,System.Collections.IList)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_FF:
|
||||
stloc:TspValidationException(var_13_10A, newobj:TspValidationException(TspValidationException::.ctor, ldstr:string("imprint digest the wrong length"), ldc.i4:int32(4)))
|
||||
}
|
||||
|
||||
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: 0x06009E6F RID: 40559 RVA: 0x002095A8 File Offset: 0x002077A8
|
||||
[Token(Token = "0x6009E6F")]
|
||||
[Address(RVA = "0x423720", Offset = "0x422720", VA = "0x180423720")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.req.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x1700195B RID: 6491
|
||||
// (get) Token: 0x06009E70 RID: 40560 RVA: 0x002095C8 File Offset: 0x002077C8
|
||||
[Token(Token = "0x1700195B")]
|
||||
internal X509Extensions Extensions
|
||||
{
|
||||
[Token(Token = "0x6009E70")]
|
||||
[Address(RVA = "0x5EF710", Offset = "0x5EE710", VA = "0x1805EF710")]
|
||||
get
|
||||
{
|
||||
return this.req.extensions;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700195C RID: 6492
|
||||
// (get) Token: 0x06009E71 RID: 40561 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x1700195C")]
|
||||
public virtual bool HasExtensions
|
||||
{
|
||||
[Token(Token = "0x6009E71")]
|
||||
[Address(RVA = "0x5EFE20", Offset = "0x5EEE20", VA = "0x1805EFE20", Slot = "13")]
|
||||
get
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E72 RID: 40562 RVA: 0x002095E8 File Offset: 0x002077E8
|
||||
[Token(Token = "0x6009E72")]
|
||||
[Address(RVA = "0x5EF6C0", Offset = "0x5EE6C0", VA = "0x1805EF6C0", Slot = "14")]
|
||||
public virtual X509Extension GetExtension(DerObjectIdentifier oid)
|
||||
{
|
||||
X509Extensions x509Extensions = this.extensions;
|
||||
if (x509Extensions == 0)
|
||||
{
|
||||
}
|
||||
return x509Extensions.GetExtension(oid);
|
||||
}
|
||||
|
||||
// Token: 0x06009E73 RID: 40563 RVA: 0x0020960C File Offset: 0x0020780C
|
||||
[Token(Token = "0x6009E73")]
|
||||
[Address(RVA = "0x5EF660", Offset = "0x5EE660", VA = "0x1805EF660", Slot = "15")]
|
||||
public virtual IList GetExtensionOids()
|
||||
{
|
||||
return TspUtil.GetExtensionOids(this.extensions);
|
||||
}
|
||||
|
||||
// Token: 0x06009E74 RID: 40564 RVA: 0x00209624 File Offset: 0x00207824
|
||||
[Token(Token = "0x6009E74")]
|
||||
[Address(RVA = "0x5EF710", Offset = "0x5EE710", VA = "0x1805EF710", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.req.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x04006A68 RID: 27240
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A68")]
|
||||
private TimeStampReq req;
|
||||
|
||||
// Token: 0x04006A69 RID: 27241
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A69")]
|
||||
private X509Extensions extensions;
|
||||
}
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x02001A4A RID: 6730
|
||||
[Token(Token = "0x2001A4A")]
|
||||
public class TimeStampRequestGenerator
|
||||
{
|
||||
// Token: 0x06009E75 RID: 40565 RVA: 0x00209644 File Offset: 0x00207844
|
||||
[Token(Token = "0x6009E75")]
|
||||
[Address(RVA = "0x5EF580", Offset = "0x5EE580", VA = "0x1805EF580")]
|
||||
public void SetReqPolicy(string reqPolicy)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(reqPolicy);
|
||||
this.reqPolicy = derObjectIdentifier;
|
||||
}
|
||||
|
||||
// Token: 0x06009E76 RID: 40566 RVA: 0x00209660 File Offset: 0x00207860
|
||||
[Token(Token = "0x6009E76")]
|
||||
[Address(RVA = "0x5EF510", Offset = "0x5EE510", VA = "0x1805EF510")]
|
||||
public void SetCertReq(bool certReq)
|
||||
{
|
||||
DerBoolean instance = DerBoolean.GetInstance(certReq);
|
||||
this.certReq = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06009E77 RID: 40567 RVA: 0x0020967C File Offset: 0x0020787C
|
||||
[Token(Token = "0x6009E77")]
|
||||
[Address(RVA = "0x5EF170", Offset = "0x5EE170", VA = "0x1805EF170")]
|
||||
[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: 0x06009E78 RID: 40568 RVA: 0x002096BC File Offset: 0x002078BC
|
||||
[Token(Token = "0x6009E78")]
|
||||
[Address(RVA = "0x5EF070", Offset = "0x5EE070", VA = "0x1805EF070")]
|
||||
[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: 0x06009E79 RID: 40569 RVA: 0x002096F4 File Offset: 0x002078F4
|
||||
[Token(Token = "0x6009E79")]
|
||||
[Address(RVA = "0x5EEF30", Offset = "0x5EDF30", VA = "0x1805EEF30", Slot = "4")]
|
||||
public virtual void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extValue)
|
||||
{
|
||||
byte[] encoded = extValue.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009E7A RID: 40570 RVA: 0x00209710 File Offset: 0x00207910
|
||||
[Token(Token = "0x6009E7A")]
|
||||
[Address(RVA = "0x5EEF90", Offset = "0x5EDF90", VA = "0x1805EEF90", 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: 0x06009E7B RID: 40571 RVA: 0x00209740 File Offset: 0x00207940
|
||||
[Token(Token = "0x6009E7B")]
|
||||
[Address(RVA = "0x5EF280", Offset = "0x5EE280", VA = "0x1805EF280")]
|
||||
public TimeStampRequest Generate(string digestAlgorithm, byte[] digest)
|
||||
{
|
||||
int num = 0;
|
||||
return this.Generate(digestAlgorithm, digest, num);
|
||||
}
|
||||
|
||||
// Token: 0x06009E7C RID: 40572 RVA: 0x00209758 File Offset: 0x00207958
|
||||
[Token(Token = "0x6009E7C")]
|
||||
[Address(RVA = "0x5EF300", Offset = "0x5EE300", VA = "0x1805EF300")]
|
||||
public TimeStampRequest Generate(string digestAlgorithmOid, byte[] digest, BigInteger nonce)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009E7C)
|
||||
|
||||
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: 0x06009E7D RID: 40573 RVA: 0x00209808 File Offset: 0x00207A08
|
||||
[Token(Token = "0x6009E7D")]
|
||||
[Address(RVA = "0x5EF2A0", Offset = "0x5EE2A0", VA = "0x1805EF2A0", Slot = "6")]
|
||||
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest)
|
||||
{
|
||||
string identifier = digestAlgorithm.identifier;
|
||||
int num = 0;
|
||||
return this.Generate(identifier, digest, num);
|
||||
}
|
||||
|
||||
// Token: 0x06009E7E RID: 40574 RVA: 0x00209830 File Offset: 0x00207A30
|
||||
[Token(Token = "0x6009E7E")]
|
||||
[Address(RVA = "0x5EF2D0", Offset = "0x5EE2D0", VA = "0x1805EF2D0", Slot = "7")]
|
||||
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest, BigInteger nonce)
|
||||
{
|
||||
string identifier = digestAlgorithm.identifier;
|
||||
return this.Generate(identifier, digest, nonce);
|
||||
}
|
||||
|
||||
// Token: 0x06009E7F RID: 40575 RVA: 0x00209854 File Offset: 0x00207A54
|
||||
[Token(Token = "0x6009E7F")]
|
||||
[Address(RVA = "0x5EF5F0", Offset = "0x5EE5F0", VA = "0x1805EF5F0")]
|
||||
public TimeStampRequestGenerator()
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable();
|
||||
this.extensions = dictionary;
|
||||
IList list = Platform.CreateArrayList();
|
||||
this.extOrdering = list;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x04006A6A RID: 27242
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A6A")]
|
||||
private DerObjectIdentifier reqPolicy;
|
||||
|
||||
// Token: 0x04006A6B RID: 27243
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A6B")]
|
||||
private DerBoolean certReq;
|
||||
|
||||
// Token: 0x04006A6C RID: 27244
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006A6C")]
|
||||
private IDictionary extensions;
|
||||
|
||||
// Token: 0x04006A6D RID: 27245
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006A6D")]
|
||||
private IList extOrdering;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
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 BestHTTP.SecureProtocol.Org.BouncyCastle.Cms;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001A4B RID: 6731
|
||||
[Token(Token = "0x2001A4B")]
|
||||
public class TimeStampResponse
|
||||
{
|
||||
// Token: 0x06009E80 RID: 40576 RVA: 0x00209888 File Offset: 0x00207A88
|
||||
[Token(Token = "0x6009E80")]
|
||||
[Address(RVA = "0x5F1090", Offset = "0x5F0090", VA = "0x1805F1090")]
|
||||
public TimeStampResponse(TimeStampResp resp)
|
||||
{
|
||||
this.resp = resp;
|
||||
ContentInfo contentInfo = resp.timeStampToken;
|
||||
if (contentInfo != 0)
|
||||
{
|
||||
TimeStampToken timeStampToken = new TimeStampToken(contentInfo);
|
||||
CmsSignedData cmsSignedData = new CmsSignedData(contentInfo);
|
||||
this.timeStampToken = timeStampToken;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E81 RID: 40577 RVA: 0x002098C8 File Offset: 0x00207AC8
|
||||
[Token(Token = "0x6009E81")]
|
||||
[Address(RVA = "0x5F0F90", Offset = "0x5EFF90", VA = "0x1805F0F90")]
|
||||
public TimeStampResponse(byte[] resp)
|
||||
{
|
||||
TimeStampResp timeStampResp = TimeStampResponse.readTimeStampResp(new Asn1InputStream(resp));
|
||||
}
|
||||
|
||||
// Token: 0x06009E82 RID: 40578 RVA: 0x002098E4 File Offset: 0x00207AE4
|
||||
[Token(Token = "0x6009E82")]
|
||||
[Address(RVA = "0x5F1010", Offset = "0x5F0010", VA = "0x1805F1010")]
|
||||
public TimeStampResponse(Stream input)
|
||||
{
|
||||
TimeStampResp timeStampResp = TimeStampResponse.readTimeStampResp(new Asn1InputStream(input));
|
||||
}
|
||||
|
||||
// Token: 0x06009E83 RID: 40579 RVA: 0x00209900 File Offset: 0x00207B00
|
||||
[Token(Token = "0x6009E83")]
|
||||
[Address(RVA = "0x5F11A0", Offset = "0x5F01A0", VA = "0x1805F11A0")]
|
||||
private static TimeStampResp readTimeStampResp(Asn1InputStream input)
|
||||
{
|
||||
Asn1Object asn1Object = input.ReadObject();
|
||||
return TimeStampResp.GetInstance(asn1Object);
|
||||
}
|
||||
|
||||
// Token: 0x1700195D RID: 6493
|
||||
// (get) Token: 0x06009E84 RID: 40580 RVA: 0x00209944 File Offset: 0x00207B44
|
||||
[Token(Token = "0x1700195D")]
|
||||
public int Status
|
||||
{
|
||||
[Token(Token = "0x6009E84")]
|
||||
[Address(RVA = "0x5F1160", Offset = "0x5F0160", VA = "0x1805F1160")]
|
||||
get
|
||||
{
|
||||
return this.resp.pkiStatusInfo.Status.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E85 RID: 40581 RVA: 0x0020996C File Offset: 0x00207B6C
|
||||
[Token(Token = "0x6009E85")]
|
||||
[Address(RVA = "0x5F08C0", Offset = "0x5EF8C0", VA = "0x1805F08C0")]
|
||||
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: 0x06009E86 RID: 40582 RVA: 0x002099DC File Offset: 0x00207BDC
|
||||
[Token(Token = "0x6009E86")]
|
||||
[Address(RVA = "0x5F0830", Offset = "0x5EF830", VA = "0x1805F0830")]
|
||||
public PkiFailureInfo GetFailInfo()
|
||||
{
|
||||
DerBitString failInfo = this.resp.pkiStatusInfo.failInfo;
|
||||
if (failInfo != 0)
|
||||
{
|
||||
return new PkiFailureInfo(failInfo);
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x1700195E RID: 6494
|
||||
// (get) Token: 0x06009E87 RID: 40583 RVA: 0x00209A0C File Offset: 0x00207C0C
|
||||
[Token(Token = "0x1700195E")]
|
||||
public TimeStampToken TimeStampToken
|
||||
{
|
||||
[Token(Token = "0x6009E87")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.timeStampToken;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E88 RID: 40584 RVA: 0x00209A20 File Offset: 0x00207C20
|
||||
[Token(Token = "0x6009E88")]
|
||||
[Address(RVA = "0x5F09F0", Offset = "0x5EF9F0", VA = "0x1805F09F0")]
|
||||
public void Validate(TimeStampRequest request)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009E88)
|
||||
|
||||
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: 0x06009E89 RID: 40585 RVA: 0x00209C28 File Offset: 0x00207E28
|
||||
[Token(Token = "0x6009E89")]
|
||||
[Address(RVA = "0x423720", Offset = "0x422720", VA = "0x180423720")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.resp.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x04006A6E RID: 27246
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A6E")]
|
||||
private TimeStampResp resp;
|
||||
|
||||
// Token: 0x04006A6F RID: 27247
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A6F")]
|
||||
private TimeStampToken timeStampToken;
|
||||
}
|
||||
}
|
||||
+205
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x02001A4C RID: 6732
|
||||
[Token(Token = "0x2001A4C")]
|
||||
public class TimeStampResponseGenerator
|
||||
{
|
||||
// Token: 0x06009E8A RID: 40586 RVA: 0x00209C48 File Offset: 0x00207E48
|
||||
[Token(Token = "0x6009E8A")]
|
||||
[Address(RVA = "0x5F0750", Offset = "0x5EF750", VA = "0x1805F0750")]
|
||||
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009E8B RID: 40587 RVA: 0x00209C5C File Offset: 0x00207E5C
|
||||
[Token(Token = "0x6009E8B")]
|
||||
[Address(RVA = "0x5F0770", Offset = "0x5EF770", VA = "0x1805F0770")]
|
||||
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms, IList acceptedPolicy)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009E8C RID: 40588 RVA: 0x00209C6C File Offset: 0x00207E6C
|
||||
[Token(Token = "0x6009E8C")]
|
||||
[Address(RVA = "0x5F0790", Offset = "0x5EF790", VA = "0x1805F0790")]
|
||||
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms, IList acceptedPolicies, IList acceptedExtensions)
|
||||
{
|
||||
this.acceptedExtensions = 0;
|
||||
this.tokenGenerator = tokenGenerator;
|
||||
this.acceptedAlgorithms = acceptedAlgorithms;
|
||||
this.acceptedPolicies = acceptedPolicies;
|
||||
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(Array.Empty<Asn1Encodable>());
|
||||
this.statusStrings = asn1EncodableVector;
|
||||
}
|
||||
|
||||
// Token: 0x06009E8D RID: 40589 RVA: 0x00209CB0 File Offset: 0x00207EB0
|
||||
[Token(Token = "0x6009E8D")]
|
||||
[Address(RVA = "0x5EFF40", Offset = "0x5EEF40", VA = "0x1805EFF40")]
|
||||
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: 0x06009E8E RID: 40590 RVA: 0x00209CEC File Offset: 0x00207EEC
|
||||
[Token(Token = "0x6009E8E")]
|
||||
[Address(RVA = "0x5F0740", Offset = "0x5EF740", VA = "0x1805F0740")]
|
||||
private void SetFailInfoField(int field)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009E8F RID: 40591 RVA: 0x00209CFC File Offset: 0x00207EFC
|
||||
[Token(Token = "0x6009E8F")]
|
||||
[Address(RVA = "0x5F0450", Offset = "0x5EF450", VA = "0x1805F0450")]
|
||||
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: 0x06009E90 RID: 40592 RVA: 0x00209DBC File Offset: 0x00207FBC
|
||||
[Token(Token = "0x6009E90")]
|
||||
[Address(RVA = "0x5F0120", Offset = "0x5EF120", VA = "0x1805F0120")]
|
||||
public TimeStampResponse Generate(TimeStampRequest request, BigInteger serialNumber, DateTime genTime)
|
||||
{
|
||||
DateTimeObject dateTimeObject = new DateTimeObject(genTime);
|
||||
return this.Generate(request, serialNumber, dateTimeObject);
|
||||
}
|
||||
|
||||
// Token: 0x06009E91 RID: 40593 RVA: 0x00209DDC File Offset: 0x00207FDC
|
||||
[Token(Token = "0x6009E91")]
|
||||
[Address(RVA = "0x5F01C0", Offset = "0x5EF1C0", VA = "0x1805F01C0")]
|
||||
public TimeStampResponse Generate(TimeStampRequest request, BigInteger serialNumber, DateTimeObject genTime)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009E91)
|
||||
|
||||
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: 0x06009E92 RID: 40594 RVA: 0x00209ED4 File Offset: 0x002080D4
|
||||
[Token(Token = "0x6009E92")]
|
||||
[Address(RVA = "0x5F0020", Offset = "0x5EF020", VA = "0x1805F0020")]
|
||||
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: 0x04006A70 RID: 27248
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A70")]
|
||||
private PkiStatus status;
|
||||
|
||||
// Token: 0x04006A71 RID: 27249
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A71")]
|
||||
private Asn1EncodableVector statusStrings;
|
||||
|
||||
// Token: 0x04006A72 RID: 27250
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006A72")]
|
||||
private int failInfo;
|
||||
|
||||
// Token: 0x04006A73 RID: 27251
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006A73")]
|
||||
private TimeStampTokenGenerator tokenGenerator;
|
||||
|
||||
// Token: 0x04006A74 RID: 27252
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006A74")]
|
||||
private IList acceptedAlgorithms;
|
||||
|
||||
// Token: 0x04006A75 RID: 27253
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006A75")]
|
||||
private IList acceptedPolicies;
|
||||
|
||||
// Token: 0x04006A76 RID: 27254
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006A76")]
|
||||
private IList acceptedExtensions;
|
||||
|
||||
// Token: 0x02001A4D RID: 6733
|
||||
[Token(Token = "0x2001A4D")]
|
||||
private class FailInfo : DerBitString
|
||||
{
|
||||
// Token: 0x06009E93 RID: 40595 RVA: 0x00209F20 File Offset: 0x00208120
|
||||
[Token(Token = "0x6009E93")]
|
||||
[Address(RVA = "0x5DACE0", Offset = "0x5D9CE0", VA = "0x1805DACE0")]
|
||||
internal FailInfo(int failInfoValue)
|
||||
: base(failInfoValue)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,388 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x02001A4E RID: 6734
|
||||
[Token(Token = "0x2001A4E")]
|
||||
public class TimeStampToken
|
||||
{
|
||||
// Token: 0x06009E94 RID: 40596 RVA: 0x00209F34 File Offset: 0x00208134
|
||||
[Token(Token = "0x6009E94")]
|
||||
[Address(RVA = "0x5F26C0", Offset = "0x5F16C0", VA = "0x1805F26C0")]
|
||||
public TimeStampToken(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.ContentInfo contentInfo)
|
||||
{
|
||||
CmsSignedData cmsSignedData = new CmsSignedData(contentInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06009E95 RID: 40597 RVA: 0x00209F48 File Offset: 0x00208148
|
||||
[Token(Token = "0x6009E95")]
|
||||
[Address(RVA = "0x5F2730", Offset = "0x5F1730", VA = "0x1805F2730")]
|
||||
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: 0x1700195F RID: 6495
|
||||
// (get) Token: 0x06009E96 RID: 40598 RVA: 0x0020A130 File Offset: 0x00208330
|
||||
[Token(Token = "0x1700195F")]
|
||||
public TimeStampTokenInfo TimeStampInfo
|
||||
{
|
||||
[Token(Token = "0x6009E96")]
|
||||
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001960 RID: 6496
|
||||
// (get) Token: 0x06009E97 RID: 40599 RVA: 0x0020A144 File Offset: 0x00208344
|
||||
[Token(Token = "0x17001960")]
|
||||
public SignerID SignerID
|
||||
{
|
||||
[Token(Token = "0x6009E97")]
|
||||
[Address(RVA = "0x5F2DD0", Offset = "0x5F1DD0", VA = "0x1805F2DD0")]
|
||||
get
|
||||
{
|
||||
return this.tsaSignerInfo.sid;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001961 RID: 6497
|
||||
// (get) Token: 0x06009E98 RID: 40600 RVA: 0x0020A164 File Offset: 0x00208364
|
||||
[Token(Token = "0x17001961")]
|
||||
public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable SignedAttributes
|
||||
{
|
||||
[Token(Token = "0x6009E98")]
|
||||
[Address(RVA = "0x5F2DB0", Offset = "0x5F1DB0", VA = "0x1805F2DB0")]
|
||||
get
|
||||
{
|
||||
return this.tsaSignerInfo.SignedAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001962 RID: 6498
|
||||
// (get) Token: 0x06009E99 RID: 40601 RVA: 0x0020A184 File Offset: 0x00208384
|
||||
[Token(Token = "0x17001962")]
|
||||
public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable UnsignedAttributes
|
||||
{
|
||||
[Token(Token = "0x6009E99")]
|
||||
[Address(RVA = "0x5F2DF0", Offset = "0x5F1DF0", VA = "0x1805F2DF0")]
|
||||
get
|
||||
{
|
||||
return this.tsaSignerInfo.UnsignedAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009E9A RID: 40602 RVA: 0x0020A1A4 File Offset: 0x002083A4
|
||||
[Token(Token = "0x6009E9A")]
|
||||
[Address(RVA = "0x5F1F70", Offset = "0x5F0F70", VA = "0x1805F1F70")]
|
||||
public IX509Store GetCertificates(string type)
|
||||
{
|
||||
return this.tsToken.GetCertificates(type);
|
||||
}
|
||||
|
||||
// Token: 0x06009E9B RID: 40603 RVA: 0x0020A1C4 File Offset: 0x002083C4
|
||||
[Token(Token = "0x6009E9B")]
|
||||
[Address(RVA = "0x5F1F90", Offset = "0x5F0F90", VA = "0x1805F1F90")]
|
||||
public IX509Store GetCrls(string type)
|
||||
{
|
||||
return this.tsToken.GetCrls(type);
|
||||
}
|
||||
|
||||
// Token: 0x06009E9C RID: 40604 RVA: 0x0020A1E4 File Offset: 0x002083E4
|
||||
[Token(Token = "0x6009E9C")]
|
||||
[Address(RVA = "0x5F1F50", Offset = "0x5F0F50", VA = "0x1805F1F50")]
|
||||
public IX509Store GetAttributeCertificates(string type)
|
||||
{
|
||||
return this.tsToken.GetAttributeCertificates(type);
|
||||
}
|
||||
|
||||
// Token: 0x06009E9D RID: 40605 RVA: 0x0020A204 File Offset: 0x00208404
|
||||
[Token(Token = "0x6009E9D")]
|
||||
[Address(RVA = "0x5F1FD0", Offset = "0x5F0FD0", VA = "0x1805F1FD0")]
|
||||
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: 0x06009E9E RID: 40606 RVA: 0x0020A468 File Offset: 0x00208668
|
||||
[Token(Token = "0x6009E9E")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
public CmsSignedData ToCmsSignedData()
|
||||
{
|
||||
return this.tsToken;
|
||||
}
|
||||
|
||||
// Token: 0x06009E9F RID: 40607 RVA: 0x0020A47C File Offset: 0x0020867C
|
||||
[Token(Token = "0x6009E9F")]
|
||||
[Address(RVA = "0x5F1FB0", Offset = "0x5F0FB0", VA = "0x1805F1FB0")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.tsToken.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x04006A77 RID: 27255
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A77")]
|
||||
private readonly CmsSignedData tsToken;
|
||||
|
||||
// Token: 0x04006A78 RID: 27256
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A78")]
|
||||
private readonly SignerInformation tsaSignerInfo;
|
||||
|
||||
// Token: 0x04006A79 RID: 27257
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006A79")]
|
||||
private readonly TimeStampTokenInfo tstInfo;
|
||||
|
||||
// Token: 0x04006A7A RID: 27258
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006A7A")]
|
||||
private readonly TimeStampToken.CertID certID;
|
||||
|
||||
// Token: 0x02001A4F RID: 6735
|
||||
[Token(Token = "0x2001A4F")]
|
||||
private class CertID
|
||||
{
|
||||
// Token: 0x06009EA0 RID: 40608 RVA: 0x0020A49C File Offset: 0x0020869C
|
||||
[Token(Token = "0x6009EA0")]
|
||||
[Address(RVA = "0x5DAC50", Offset = "0x5D9C50", VA = "0x1805DAC50")]
|
||||
internal CertID(EssCertID certID)
|
||||
{
|
||||
this.certID = certID;
|
||||
this.certIDv2 = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x06009EA1 RID: 40609 RVA: 0x0020A4C0 File Offset: 0x002086C0
|
||||
[Token(Token = "0x6009EA1")]
|
||||
[Address(RVA = "0x5DAC80", Offset = "0x5D9C80", VA = "0x1805DAC80")]
|
||||
internal CertID(EssCertIDv2 certID)
|
||||
{
|
||||
this.certIDv2 = certID;
|
||||
this.certID = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x06009EA2 RID: 40610 RVA: 0x0020A4E4 File Offset: 0x002086E4
|
||||
[Token(Token = "0x6009EA2")]
|
||||
[Address(RVA = "0x5DAA90", Offset = "0x5D9A90", VA = "0x1805DAA90")]
|
||||
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: 0x06009EA3 RID: 40611 RVA: 0x0020A53C File Offset: 0x0020873C
|
||||
[Token(Token = "0x6009EA3")]
|
||||
[Address(RVA = "0x5DABA0", Offset = "0x5D9BA0", VA = "0x1805DABA0")]
|
||||
public AlgorithmIdentifier GetHashAlgorithm()
|
||||
{
|
||||
if (this.certID != (ulong)0L)
|
||||
{
|
||||
return new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1);
|
||||
}
|
||||
return this.certIDv2.hashAlgorithm;
|
||||
}
|
||||
|
||||
// Token: 0x06009EA4 RID: 40612 RVA: 0x0020A570 File Offset: 0x00208770
|
||||
[Token(Token = "0x6009EA4")]
|
||||
[Address(RVA = "0x5DAA50", Offset = "0x5D9A50", VA = "0x1805DAA50")]
|
||||
public byte[] GetCertHash()
|
||||
{
|
||||
EssCertID essCertID = this.certID;
|
||||
if (essCertID != 0)
|
||||
{
|
||||
return essCertID.GetCertHash();
|
||||
}
|
||||
return this.certIDv2.GetCertHash();
|
||||
}
|
||||
|
||||
// Token: 0x17001963 RID: 6499
|
||||
// (get) Token: 0x06009EA5 RID: 40613 RVA: 0x0020A5A0 File Offset: 0x002087A0
|
||||
[Token(Token = "0x17001963")]
|
||||
public IssuerSerial IssuerSerial
|
||||
{
|
||||
[Token(Token = "0x6009EA5")]
|
||||
[Address(RVA = "0x5DACB0", Offset = "0x5D9CB0", VA = "0x1805DACB0")]
|
||||
get
|
||||
{
|
||||
EssCertID essCertID = this.certID;
|
||||
if (essCertID != 0)
|
||||
{
|
||||
return essCertID.issuerSerial;
|
||||
}
|
||||
return this.certIDv2.issuerSerial;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006A7B RID: 27259
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A7B")]
|
||||
private EssCertID certID;
|
||||
|
||||
// Token: 0x04006A7C RID: 27260
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A7C")]
|
||||
private EssCertIDv2 certIDv2;
|
||||
}
|
||||
}
|
||||
}
|
||||
+261
@@ -0,0 +1,261 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x02001A50 RID: 6736
|
||||
[Token(Token = "0x2001A50")]
|
||||
public class TimeStampTokenGenerator
|
||||
{
|
||||
// Token: 0x06009EA6 RID: 40614 RVA: 0x0020A5D0 File Offset: 0x002087D0
|
||||
[Token(Token = "0x6009EA6")]
|
||||
[Address(RVA = "0x5F1C20", Offset = "0x5F0C20", VA = "0x1805F1C20")]
|
||||
public TimeStampTokenGenerator(AsymmetricKeyParameter key, X509Certificate cert, string digestOID, string tsaPolicyOID)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009EA7 RID: 40615 RVA: 0x0020A5E0 File Offset: 0x002087E0
|
||||
[Token(Token = "0x6009EA7")]
|
||||
[Address(RVA = "0x5F1940", Offset = "0x5F0940", VA = "0x1805F1940")]
|
||||
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: 0x06009EA8 RID: 40616 RVA: 0x0020A6B4 File Offset: 0x002088B4
|
||||
[Token(Token = "0x6009EA8")]
|
||||
[Address(RVA = "0x417A10", Offset = "0x416A10", VA = "0x180417A10")]
|
||||
public void SetCertificates(IX509Store certificates)
|
||||
{
|
||||
this.x509Certs = certificates;
|
||||
}
|
||||
|
||||
// Token: 0x06009EA9 RID: 40617 RVA: 0x0020A6C8 File Offset: 0x002088C8
|
||||
[Token(Token = "0x6009EA9")]
|
||||
[Address(RVA = "0x417A20", Offset = "0x416A20", VA = "0x180417A20")]
|
||||
public void SetCrls(IX509Store crls)
|
||||
{
|
||||
this.x509Crls = crls;
|
||||
}
|
||||
|
||||
// Token: 0x06009EAA RID: 40618 RVA: 0x0020A6DC File Offset: 0x002088DC
|
||||
[Token(Token = "0x6009EAA")]
|
||||
[Address(RVA = "0x470D10", Offset = "0x46FD10", VA = "0x180470D10")]
|
||||
public void SetAccuracySeconds(int accuracySeconds)
|
||||
{
|
||||
this.accuracySeconds = accuracySeconds;
|
||||
}
|
||||
|
||||
// Token: 0x06009EAB RID: 40619 RVA: 0x0020A6F0 File Offset: 0x002088F0
|
||||
[Token(Token = "0x6009EAB")]
|
||||
[Address(RVA = "0x5F1920", Offset = "0x5F0920", VA = "0x1805F1920")]
|
||||
public void SetAccuracyMillis(int accuracyMillis)
|
||||
{
|
||||
this.accuracyMillis = accuracyMillis;
|
||||
}
|
||||
|
||||
// Token: 0x06009EAC RID: 40620 RVA: 0x0020A704 File Offset: 0x00208904
|
||||
[Token(Token = "0x6009EAC")]
|
||||
[Address(RVA = "0x5F1910", Offset = "0x5F0910", VA = "0x1805F1910")]
|
||||
public void SetAccuracyMicros(int accuracyMicros)
|
||||
{
|
||||
this.accuracyMicros = accuracyMicros;
|
||||
}
|
||||
|
||||
// Token: 0x06009EAD RID: 40621 RVA: 0x0020A718 File Offset: 0x00208918
|
||||
[Token(Token = "0x6009EAD")]
|
||||
[Address(RVA = "0x5F1930", Offset = "0x5F0930", VA = "0x1805F1930")]
|
||||
public void SetOrdering(bool ordering)
|
||||
{
|
||||
this.ordering = ordering;
|
||||
}
|
||||
|
||||
// Token: 0x06009EAE RID: 40622 RVA: 0x0020A72C File Offset: 0x0020892C
|
||||
[Token(Token = "0x6009EAE")]
|
||||
[Address(RVA = "0x415810", Offset = "0x414810", VA = "0x180415810")]
|
||||
public void SetTsa(GeneralName tsa)
|
||||
{
|
||||
this.tsa = tsa;
|
||||
}
|
||||
|
||||
// Token: 0x06009EAF RID: 40623 RVA: 0x0020A740 File Offset: 0x00208940
|
||||
[Token(Token = "0x6009EAF")]
|
||||
[Address(RVA = "0x5F12A0", Offset = "0x5F02A0", VA = "0x1805F12A0")]
|
||||
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: 0x04006A7D RID: 27261
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A7D")]
|
||||
private int accuracySeconds;
|
||||
|
||||
// Token: 0x04006A7E RID: 27262
|
||||
[FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x4006A7E")]
|
||||
private int accuracyMillis;
|
||||
|
||||
// Token: 0x04006A7F RID: 27263
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A7F")]
|
||||
private int accuracyMicros;
|
||||
|
||||
// Token: 0x04006A80 RID: 27264
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4006A80")]
|
||||
private bool ordering;
|
||||
|
||||
// Token: 0x04006A81 RID: 27265
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006A81")]
|
||||
private GeneralName tsa;
|
||||
|
||||
// Token: 0x04006A82 RID: 27266
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006A82")]
|
||||
private string tsaPolicyOID;
|
||||
|
||||
// Token: 0x04006A83 RID: 27267
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006A83")]
|
||||
private AsymmetricKeyParameter key;
|
||||
|
||||
// Token: 0x04006A84 RID: 27268
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006A84")]
|
||||
private X509Certificate cert;
|
||||
|
||||
// Token: 0x04006A85 RID: 27269
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006A85")]
|
||||
private string digestOID;
|
||||
|
||||
// Token: 0x04006A86 RID: 27270
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4006A86")]
|
||||
private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable signedAttr;
|
||||
|
||||
// Token: 0x04006A87 RID: 27271
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4006A87")]
|
||||
private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable unsignedAttr;
|
||||
|
||||
// Token: 0x04006A88 RID: 27272
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4006A88")]
|
||||
private IX509Store x509Certs;
|
||||
|
||||
// Token: 0x04006A89 RID: 27273
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4006A89")]
|
||||
private IX509Store x509Crls;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
using System;
|
||||
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: 0x02001A51 RID: 6737
|
||||
[Token(Token = "0x2001A51")]
|
||||
public class TimeStampTokenInfo
|
||||
{
|
||||
// Token: 0x06009EB0 RID: 40624 RVA: 0x0020A940 File Offset: 0x00208B40
|
||||
[Token(Token = "0x6009EB0")]
|
||||
[Address(RVA = "0x5F1C80", Offset = "0x5F0C80", VA = "0x1805F1C80")]
|
||||
public TimeStampTokenInfo(TstInfo tstInfo)
|
||||
{
|
||||
this.tstInfo = tstInfo;
|
||||
DateTime dateTime = tstInfo.genTime.ToDateTime();
|
||||
this.genTime = dateTime;
|
||||
}
|
||||
|
||||
// Token: 0x17001964 RID: 6500
|
||||
// (get) Token: 0x06009EB1 RID: 40625 RVA: 0x0020A988 File Offset: 0x00208B88
|
||||
[Token(Token = "0x17001964")]
|
||||
public bool IsOrdered
|
||||
{
|
||||
[Token(Token = "0x6009EB1")]
|
||||
[Address(RVA = "0x5F1E10", Offset = "0x5F0E10", VA = "0x1805F1E10")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.ordering.IsTrue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001965 RID: 6501
|
||||
// (get) Token: 0x06009EB2 RID: 40626 RVA: 0x0020A9AC File Offset: 0x00208BAC
|
||||
[Token(Token = "0x17001965")]
|
||||
public Accuracy Accuracy
|
||||
{
|
||||
[Token(Token = "0x6009EB2")]
|
||||
[Address(RVA = "0x5EF710", Offset = "0x5EE710", VA = "0x1805EF710")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.accuracy;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001966 RID: 6502
|
||||
// (get) Token: 0x06009EB3 RID: 40627 RVA: 0x0020A9CC File Offset: 0x00208BCC
|
||||
[Token(Token = "0x17001966")]
|
||||
public DateTime GenTime
|
||||
{
|
||||
[Token(Token = "0x6009EB3")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.genTime;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001967 RID: 6503
|
||||
// (get) Token: 0x06009EB4 RID: 40628 RVA: 0x0020A9E0 File Offset: 0x00208BE0
|
||||
[Token(Token = "0x17001967")]
|
||||
public GenTimeAccuracy GenTimeAccuracy
|
||||
{
|
||||
[Token(Token = "0x6009EB4")]
|
||||
[Address(RVA = "0x5F1D60", Offset = "0x5F0D60", VA = "0x1805F1D60")]
|
||||
get
|
||||
{
|
||||
Accuracy accuracy = this.tstInfo.accuracy;
|
||||
if (accuracy == 0)
|
||||
{
|
||||
}
|
||||
GenTimeAccuracy genTimeAccuracy;
|
||||
genTimeAccuracy.accuracy = accuracy;
|
||||
return genTimeAccuracy;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001968 RID: 6504
|
||||
// (get) Token: 0x06009EB5 RID: 40629 RVA: 0x0020AA10 File Offset: 0x00208C10
|
||||
[Token(Token = "0x17001968")]
|
||||
public string Policy
|
||||
{
|
||||
[Token(Token = "0x6009EB5")]
|
||||
[Address(RVA = "0x5F1ED0", Offset = "0x5F0ED0", VA = "0x1805F1ED0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.tsaPolicyId.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001969 RID: 6505
|
||||
// (get) Token: 0x06009EB6 RID: 40630 RVA: 0x0020AA34 File Offset: 0x00208C34
|
||||
[Token(Token = "0x17001969")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009EB6")]
|
||||
[Address(RVA = "0x5F1F00", Offset = "0x5F0F00", VA = "0x1805F1F00")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.serialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700196A RID: 6506
|
||||
// (get) Token: 0x06009EB7 RID: 40631 RVA: 0x0020AA58 File Offset: 0x00208C58
|
||||
[Token(Token = "0x1700196A")]
|
||||
public GeneralName Tsa
|
||||
{
|
||||
[Token(Token = "0x6009EB7")]
|
||||
[Address(RVA = "0x5F1F30", Offset = "0x5F0F30", VA = "0x1805F1F30")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.tsa;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700196B RID: 6507
|
||||
// (get) Token: 0x06009EB8 RID: 40632 RVA: 0x0020AA78 File Offset: 0x00208C78
|
||||
[Token(Token = "0x1700196B")]
|
||||
public BigInteger Nonce
|
||||
{
|
||||
[Token(Token = "0x6009EB8")]
|
||||
[Address(RVA = "0x5F1E90", Offset = "0x5F0E90", VA = "0x1805F1E90")]
|
||||
get
|
||||
{
|
||||
DerInteger nonce = this.tstInfo.nonce;
|
||||
if (nonce == 0)
|
||||
{
|
||||
}
|
||||
return nonce.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700196C RID: 6508
|
||||
// (get) Token: 0x06009EB9 RID: 40633 RVA: 0x0020AAA4 File Offset: 0x00208CA4
|
||||
[Token(Token = "0x1700196C")]
|
||||
public AlgorithmIdentifier HashAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6009EB9")]
|
||||
[Address(RVA = "0x5F1DE0", Offset = "0x5F0DE0", VA = "0x1805F1DE0")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo.messageImprint.hashAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700196D RID: 6509
|
||||
// (get) Token: 0x06009EBA RID: 40634 RVA: 0x0020AAC8 File Offset: 0x00208CC8
|
||||
[Token(Token = "0x1700196D")]
|
||||
public string MessageImprintAlgOid
|
||||
{
|
||||
[Token(Token = "0x6009EBA")]
|
||||
[Address(RVA = "0x5F1E40", Offset = "0x5F0E40", VA = "0x1805F1E40")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.tstInfo.messageImprint.hashAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009EBB RID: 40635 RVA: 0x0020AAF0 File Offset: 0x00208CF0
|
||||
[Token(Token = "0x6009EBB")]
|
||||
[Address(RVA = "0x5F1C50", Offset = "0x5F0C50", VA = "0x1805F1C50")]
|
||||
public byte[] GetMessageImprintDigest()
|
||||
{
|
||||
return this.tstInfo.messageImprint.hashedMessage;
|
||||
}
|
||||
|
||||
// Token: 0x06009EBC RID: 40636 RVA: 0x0020AB14 File Offset: 0x00208D14
|
||||
[Token(Token = "0x6009EBC")]
|
||||
[Address(RVA = "0x423720", Offset = "0x422720", VA = "0x180423720")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.tstInfo.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x1700196E RID: 6510
|
||||
// (get) Token: 0x06009EBD RID: 40637 RVA: 0x0020AB34 File Offset: 0x00208D34
|
||||
[Token(Token = "0x1700196E")]
|
||||
public TstInfo TstInfo
|
||||
{
|
||||
[Token(Token = "0x6009EBD")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
get
|
||||
{
|
||||
return this.tstInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006A8A RID: 27274
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006A8A")]
|
||||
private TstInfo tstInfo;
|
||||
|
||||
// Token: 0x04006A8B RID: 27275
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006A8B")]
|
||||
private DateTime genTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x02001A45 RID: 6725
|
||||
[Token(Token = "0x2001A45")]
|
||||
public abstract class TspAlgorithms
|
||||
{
|
||||
// Token: 0x06009E52 RID: 40530 RVA: 0x00208B4C File Offset: 0x00206D4C
|
||||
[Token(Token = "0x6009E52")]
|
||||
[Address(RVA = "0x5F2E10", Offset = "0x5F1E10", VA = "0x1805F2E10")]
|
||||
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: 0x06009E53 RID: 40531 RVA: 0x00208D94 File Offset: 0x00206F94
|
||||
[Token(Token = "0x6009E53")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
protected TspAlgorithms()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04006A55 RID: 27221
|
||||
[Token(Token = "0x4006A55")]
|
||||
public static readonly string MD5 = PkcsObjectIdentifiers.MD5.identifier;
|
||||
|
||||
// Token: 0x04006A56 RID: 27222
|
||||
[Token(Token = "0x4006A56")]
|
||||
public static readonly string Sha1 = OiwObjectIdentifiers.IdSha1.identifier;
|
||||
|
||||
// Token: 0x04006A57 RID: 27223
|
||||
[Token(Token = "0x4006A57")]
|
||||
public static readonly string Sha224 = NistObjectIdentifiers.IdSha224.identifier;
|
||||
|
||||
// Token: 0x04006A58 RID: 27224
|
||||
[Token(Token = "0x4006A58")]
|
||||
public static readonly string Sha256 = NistObjectIdentifiers.IdSha256.identifier;
|
||||
|
||||
// Token: 0x04006A59 RID: 27225
|
||||
[Token(Token = "0x4006A59")]
|
||||
public static readonly string Sha384 = NistObjectIdentifiers.IdSha384.identifier;
|
||||
|
||||
// Token: 0x04006A5A RID: 27226
|
||||
[Token(Token = "0x4006A5A")]
|
||||
public static readonly string Sha512 = NistObjectIdentifiers.IdSha512.identifier;
|
||||
|
||||
// Token: 0x04006A5B RID: 27227
|
||||
[Token(Token = "0x4006A5B")]
|
||||
public static readonly string RipeMD128 = TeleTrusTObjectIdentifiers.RipeMD128.identifier;
|
||||
|
||||
// Token: 0x04006A5C RID: 27228
|
||||
[Token(Token = "0x4006A5C")]
|
||||
public static readonly string RipeMD160 = TeleTrusTObjectIdentifiers.RipeMD160.identifier;
|
||||
|
||||
// Token: 0x04006A5D RID: 27229
|
||||
[Token(Token = "0x4006A5D")]
|
||||
public static readonly string RipeMD256 = TeleTrusTObjectIdentifiers.RipeMD256.identifier;
|
||||
|
||||
// Token: 0x04006A5E RID: 27230
|
||||
[Token(Token = "0x4006A5E")]
|
||||
public static readonly string Gost3411 = CryptoProObjectIdentifiers.GostR3411.identifier;
|
||||
|
||||
// Token: 0x04006A5F RID: 27231
|
||||
[Token(Token = "0x4006A5F")]
|
||||
public static readonly string Gost3411_2012_256 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256.identifier;
|
||||
|
||||
// Token: 0x04006A60 RID: 27232
|
||||
[Token(Token = "0x4006A60")]
|
||||
public static readonly string Gost3411_2012_512 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512.identifier;
|
||||
|
||||
// Token: 0x04006A61 RID: 27233
|
||||
[Token(Token = "0x4006A61")]
|
||||
public static readonly string SM3 = GMObjectIdentifiers.sm3.identifier;
|
||||
|
||||
// Token: 0x04006A62 RID: 27234
|
||||
[Token(Token = "0x4006A62")]
|
||||
public static readonly IList Allowed;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001A46 RID: 6726
|
||||
[Token(Token = "0x2001A46")]
|
||||
[Serializable]
|
||||
public class TspException : Exception
|
||||
{
|
||||
// Token: 0x06009E54 RID: 40532 RVA: 0x00208DA8 File Offset: 0x00206FA8
|
||||
[Token(Token = "0x6009E54")]
|
||||
[Address(RVA = "0x4F1F20", Offset = "0x4F0F20", VA = "0x1804F1F20")]
|
||||
public TspException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009E55 RID: 40533 RVA: 0x00208DBC File Offset: 0x00206FBC
|
||||
[Token(Token = "0x6009E55")]
|
||||
[Address(RVA = "0x4F1F80", Offset = "0x4F0F80", VA = "0x1804F1F80")]
|
||||
public TspException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009E56 RID: 40534 RVA: 0x00208DD0 File Offset: 0x00206FD0
|
||||
[Token(Token = "0x6009E56")]
|
||||
[Address(RVA = "0x4F1FF0", Offset = "0x4F0FF0", VA = "0x1804F1FF0")]
|
||||
public TspException(string message, Exception e)
|
||||
: base(message, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x02001A47 RID: 6727
|
||||
[Token(Token = "0x2001A47")]
|
||||
public class TspUtil
|
||||
{
|
||||
// Token: 0x06009E57 RID: 40535 RVA: 0x00208DE8 File Offset: 0x00206FE8
|
||||
[Token(Token = "0x6009E57")]
|
||||
[Address(RVA = "0x4F2E40", Offset = "0x4F1E40", VA = "0x1804F2E40")]
|
||||
static TspUtil()
|
||||
{
|
||||
HashSet hashSet = new HashSet();
|
||||
Hashtable hashtable = new Hashtable();
|
||||
hashSet.impl = hashtable;
|
||||
UnmodifiableSetProxy unmodifiableSetProxy;
|
||||
unmodifiableSetProxy.s = hashSet;
|
||||
TspUtil.EmptySet = unmodifiableSetProxy;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
UnmodifiableListProxy unmodifiableListProxy;
|
||||
unmodifiableListProxy.l = arrayList;
|
||||
TspUtil.EmptyList = unmodifiableListProxy;
|
||||
TspUtil.digestLengths = new Hashtable();
|
||||
TspUtil.digestNames = new Hashtable();
|
||||
IDictionary dictionary = TspUtil.digestLengths;
|
||||
DerObjectIdentifier md = PkcsObjectIdentifiers.MD5;
|
||||
IDictionary dictionary2 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha = OiwObjectIdentifiers.IdSha1;
|
||||
IDictionary dictionary3 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha2 = NistObjectIdentifiers.IdSha224;
|
||||
IDictionary dictionary4 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha3 = NistObjectIdentifiers.IdSha256;
|
||||
IDictionary dictionary5 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha4 = NistObjectIdentifiers.IdSha384;
|
||||
IDictionary dictionary6 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier idSha5 = NistObjectIdentifiers.IdSha512;
|
||||
IDictionary dictionary7 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier ripeMD = TeleTrusTObjectIdentifiers.RipeMD128;
|
||||
IDictionary dictionary8 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier ripeMD2 = TeleTrusTObjectIdentifiers.RipeMD160;
|
||||
IDictionary dictionary9 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier ripeMD3 = TeleTrusTObjectIdentifiers.RipeMD256;
|
||||
IDictionary dictionary10 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier gostR = CryptoProObjectIdentifiers.GostR3411;
|
||||
IDictionary dictionary11 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_ = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256;
|
||||
IDictionary dictionary12 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_2 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512;
|
||||
IDictionary dictionary13 = TspUtil.digestLengths;
|
||||
DerObjectIdentifier sm = GMObjectIdentifiers.sm3;
|
||||
IDictionary dictionary14 = TspUtil.digestNames;
|
||||
DerObjectIdentifier md2 = PkcsObjectIdentifiers.MD5;
|
||||
IDictionary dictionary15 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha6 = OiwObjectIdentifiers.IdSha1;
|
||||
IDictionary dictionary16 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha7 = NistObjectIdentifiers.IdSha224;
|
||||
IDictionary dictionary17 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha8 = NistObjectIdentifiers.IdSha256;
|
||||
IDictionary dictionary18 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha9 = NistObjectIdentifiers.IdSha384;
|
||||
IDictionary dictionary19 = TspUtil.digestNames;
|
||||
DerObjectIdentifier idSha10 = NistObjectIdentifiers.IdSha512;
|
||||
IDictionary dictionary20 = TspUtil.digestNames;
|
||||
DerObjectIdentifier md5WithRsaEncryption = PkcsObjectIdentifiers.MD5WithRsaEncryption;
|
||||
IDictionary dictionary21 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha1WithRsaEncryption = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
|
||||
IDictionary dictionary22 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha224WithRsaEncryption = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
|
||||
IDictionary dictionary23 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha256WithRsaEncryption = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
|
||||
IDictionary dictionary24 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha384WithRsaEncryption = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
|
||||
IDictionary dictionary25 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha512WithRsaEncryption = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
|
||||
IDictionary dictionary26 = TspUtil.digestNames;
|
||||
DerObjectIdentifier ripeMD4 = TeleTrusTObjectIdentifiers.RipeMD128;
|
||||
IDictionary dictionary27 = TspUtil.digestNames;
|
||||
DerObjectIdentifier ripeMD5 = TeleTrusTObjectIdentifiers.RipeMD160;
|
||||
IDictionary dictionary28 = TspUtil.digestNames;
|
||||
DerObjectIdentifier ripeMD6 = TeleTrusTObjectIdentifiers.RipeMD256;
|
||||
IDictionary dictionary29 = TspUtil.digestNames;
|
||||
DerObjectIdentifier gostR2 = CryptoProObjectIdentifiers.GostR3411;
|
||||
IDictionary dictionary30 = TspUtil.digestNames;
|
||||
DerObjectIdentifier dsaWithSha = OiwObjectIdentifiers.DsaWithSha1;
|
||||
IDictionary dictionary31 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sha1WithRsa = OiwObjectIdentifiers.Sha1WithRsa;
|
||||
IDictionary dictionary32 = TspUtil.digestNames;
|
||||
DerObjectIdentifier md5WithRsa = OiwObjectIdentifiers.MD5WithRsa;
|
||||
IDictionary dictionary33 = TspUtil.digestNames;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_3 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256;
|
||||
IDictionary dictionary34 = TspUtil.digestNames;
|
||||
DerObjectIdentifier id_tc26_gost_3411_12_4 = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512;
|
||||
IDictionary dictionary35 = TspUtil.digestNames;
|
||||
DerObjectIdentifier sm2 = GMObjectIdentifiers.sm3;
|
||||
}
|
||||
|
||||
// Token: 0x06009E58 RID: 40536 RVA: 0x00209030 File Offset: 0x00207230
|
||||
[Token(Token = "0x6009E58")]
|
||||
[Address(RVA = "0x4F25B0", Offset = "0x4F15B0", VA = "0x1804F25B0")]
|
||||
public static ICollection GetSignatureTimestamps(SignerInformation signerInfo)
|
||||
{
|
||||
byte[] array;
|
||||
do
|
||||
{
|
||||
ArrayList arrayList = new ArrayList();
|
||||
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_EF;
|
||||
}
|
||||
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[] messageImprintDigest = tstInfo.GetMessageImprintDigest();
|
||||
if (!Arrays.ConstantTimeAreEqual(array, messageImprintDigest))
|
||||
{
|
||||
goto IL_A7;
|
||||
}
|
||||
if ((uint)(-1) != 0U)
|
||||
{
|
||||
}
|
||||
if (array != 0)
|
||||
{
|
||||
goto IL_E9;
|
||||
}
|
||||
while ((ulong)((uint)(-1)) == (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
}
|
||||
if ((uint)(-1) != 0U)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (array != 0);
|
||||
throw new NullReferenceException();
|
||||
IL_A7:
|
||||
TspValidationException ex = new TspValidationException("Incorrect digest in message imprint");
|
||||
throw new NullReferenceException();
|
||||
IL_E9:
|
||||
throw new NullReferenceException();
|
||||
IL_EF:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009E59 RID: 40537 RVA: 0x00209138 File Offset: 0x00207338
|
||||
[Token(Token = "0x6009E59")]
|
||||
[Address(RVA = "0x4F2B60", Offset = "0x4F1B60", VA = "0x1804F2B60")]
|
||||
public static void ValidateCertificate(X509Certificate cert)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009E59)
|
||||
|
||||
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: 0x06009E5A RID: 40538 RVA: 0x002091A8 File Offset: 0x002073A8
|
||||
[Token(Token = "0x6009E5A")]
|
||||
[Address(RVA = "0x4F21D0", Offset = "0x4F11D0", VA = "0x1804F21D0")]
|
||||
internal static string GetDigestAlgName(string digestAlgOID)
|
||||
{
|
||||
IDictionary dictionary = TspUtil.digestNames;
|
||||
return digestAlgOID;
|
||||
}
|
||||
|
||||
// Token: 0x06009E5B RID: 40539 RVA: 0x002091C4 File Offset: 0x002073C4
|
||||
[Token(Token = "0x6009E5B")]
|
||||
[Address(RVA = "0x4F2280", Offset = "0x4F1280", VA = "0x1804F2280")]
|
||||
internal static int GetDigestLength(string digestAlgOID)
|
||||
{
|
||||
IDictionary dictionary = TspUtil.digestLengths;
|
||||
IDictionary dictionary2 = TspUtil.digestLengths;
|
||||
ISet emptySet = TspUtil.EmptySet;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009E5C RID: 40540 RVA: 0x002091F8 File Offset: 0x002073F8
|
||||
[Token(Token = "0x6009E5C")]
|
||||
[Address(RVA = "0x4F2070", Offset = "0x4F1070", VA = "0x1804F2070")]
|
||||
internal static IDigest CreateDigestInstance(string digestAlgOID)
|
||||
{
|
||||
return DigestUtilities.GetDigest(TspUtil.GetDigestAlgName(digestAlgOID));
|
||||
}
|
||||
|
||||
// Token: 0x06009E5D RID: 40541 RVA: 0x00209210 File Offset: 0x00207410
|
||||
[Token(Token = "0x6009E5D")]
|
||||
[Address(RVA = "0x4F20F0", Offset = "0x4F10F0", VA = "0x1804F20F0")]
|
||||
internal static ISet GetCriticalExtensionOids(X509Extensions extensions)
|
||||
{
|
||||
if (extensions != 0)
|
||||
{
|
||||
HashSet hashSet = new HashSet(extensions.GetCriticalExtensionOids());
|
||||
UnmodifiableSetProxy unmodifiableSetProxy;
|
||||
unmodifiableSetProxy.s = hashSet;
|
||||
}
|
||||
return TspUtil.EmptySet;
|
||||
}
|
||||
|
||||
// Token: 0x06009E5E RID: 40542 RVA: 0x0020923C File Offset: 0x0020743C
|
||||
[Token(Token = "0x6009E5E")]
|
||||
[Address(RVA = "0x4F24D0", Offset = "0x4F14D0", VA = "0x1804F24D0")]
|
||||
internal static ISet GetNonCriticalExtensionOids(X509Extensions extensions)
|
||||
{
|
||||
if (extensions != 0)
|
||||
{
|
||||
HashSet hashSet = new HashSet(extensions.GetNonCriticalExtensionOids());
|
||||
UnmodifiableSetProxy unmodifiableSetProxy;
|
||||
unmodifiableSetProxy.s = hashSet;
|
||||
}
|
||||
return TspUtil.EmptySet;
|
||||
}
|
||||
|
||||
// Token: 0x06009E5F RID: 40543 RVA: 0x00209268 File Offset: 0x00207468
|
||||
[Token(Token = "0x6009E5F")]
|
||||
[Address(RVA = "0x4F23B0", Offset = "0x4F13B0", VA = "0x1804F23B0")]
|
||||
internal static IList GetExtensionOids(X509Extensions extensions)
|
||||
{
|
||||
if (extensions != 0)
|
||||
{
|
||||
ArrayList arrayList = new ArrayList(extensions.GetExtensionOids());
|
||||
UnmodifiableListProxy unmodifiableListProxy;
|
||||
unmodifiableListProxy.l = arrayList;
|
||||
}
|
||||
return TspUtil.EmptyList;
|
||||
}
|
||||
|
||||
// Token: 0x06009E60 RID: 40544 RVA: 0x00209294 File Offset: 0x00207494
|
||||
[Token(Token = "0x6009E60")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public TspUtil()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04006A63 RID: 27235
|
||||
[Token(Token = "0x4006A63")]
|
||||
private static ISet EmptySet;
|
||||
|
||||
// Token: 0x04006A64 RID: 27236
|
||||
[Token(Token = "0x4006A64")]
|
||||
private static IList EmptyList;
|
||||
|
||||
// Token: 0x04006A65 RID: 27237
|
||||
[Token(Token = "0x4006A65")]
|
||||
private static readonly IDictionary digestLengths;
|
||||
|
||||
// Token: 0x04006A66 RID: 27238
|
||||
[Token(Token = "0x4006A66")]
|
||||
private static readonly IDictionary digestNames;
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
||||
{
|
||||
// Token: 0x02001A48 RID: 6728
|
||||
[Token(Token = "0x2001A48")]
|
||||
[Serializable]
|
||||
public class TspValidationException : TspException
|
||||
{
|
||||
// Token: 0x06009E61 RID: 40545 RVA: 0x002092A8 File Offset: 0x002074A8
|
||||
[Token(Token = "0x6009E61")]
|
||||
[Address(RVA = "0x4F3EE0", Offset = "0x4F2EE0", VA = "0x1804F3EE0")]
|
||||
public TspValidationException(string message)
|
||||
: base(message)
|
||||
{
|
||||
this.failureCode = (int)((ulong)4294967295L);
|
||||
}
|
||||
|
||||
// Token: 0x06009E62 RID: 40546 RVA: 0x002092CC File Offset: 0x002074CC
|
||||
[Token(Token = "0x6009E62")]
|
||||
[Address(RVA = "0x4F3E60", Offset = "0x4F2E60", VA = "0x1804F3E60")]
|
||||
public TspValidationException(string message, int failureCode)
|
||||
: base(message)
|
||||
{
|
||||
this.failureCode = failureCode;
|
||||
}
|
||||
|
||||
// Token: 0x17001955 RID: 6485
|
||||
// (get) Token: 0x06009E63 RID: 40547 RVA: 0x002092E8 File Offset: 0x002074E8
|
||||
[Token(Token = "0x17001955")]
|
||||
public int FailureCode
|
||||
{
|
||||
[Token(Token = "0x6009E63")]
|
||||
[Address(RVA = "0x4F3F50", Offset = "0x4F2F50", VA = "0x1804F3F50")]
|
||||
get
|
||||
{
|
||||
return this.failureCode;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006A67 RID: 27239
|
||||
[FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x4006A67")]
|
||||
private int failureCode;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user