174 lines
8.9 KiB
C#
174 lines
8.9 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
|
|
{
|
|
// Token: 0x0200138D RID: 5005
|
|
[Token(Token = "0x200138D")]
|
|
[StructLayout(3)]
|
|
public class TimeStampRequestGenerator
|
|
{
|
|
// Token: 0x06007ECD RID: 32461 RVA: 0x001A8F98 File Offset: 0x001A7198
|
|
[Token(Token = "0x6007ECD")]
|
|
[Address(RVA = "0x1C696D0", Offset = "0x1C680D0", VA = "0x181C696D0")]
|
|
public void SetReqPolicy(string reqPolicy)
|
|
{
|
|
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(reqPolicy);
|
|
this.reqPolicy = derObjectIdentifier;
|
|
}
|
|
|
|
// Token: 0x06007ECE RID: 32462 RVA: 0x001A8FB4 File Offset: 0x001A71B4
|
|
[Token(Token = "0x6007ECE")]
|
|
[Address(RVA = "0x1C69660", Offset = "0x1C68060", VA = "0x181C69660")]
|
|
public void SetCertReq(bool certReq)
|
|
{
|
|
DerBoolean instance = DerBoolean.GetInstance(certReq);
|
|
this.certReq = instance;
|
|
}
|
|
|
|
// Token: 0x06007ECF RID: 32463 RVA: 0x001A8FD0 File Offset: 0x001A71D0
|
|
[Token(Token = "0x6007ECF")]
|
|
[Address(RVA = "0x1C692C0", Offset = "0x1C67CC0", VA = "0x181C692C0")]
|
|
[Obsolete]
|
|
public void AddExtension(string oid, bool critical, Asn1Encodable value)
|
|
{
|
|
byte[] encoded = value.GetEncoded();
|
|
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
|
IDictionary dictionary = this.extensions;
|
|
DerOctetString derOctetString = new DerOctetString(encoded);
|
|
X509Extension x509Extension = new X509Extension(critical, derOctetString);
|
|
IList list = this.extOrdering;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007ED0 RID: 32464 RVA: 0x001A9010 File Offset: 0x001A7210
|
|
[Token(Token = "0x6007ED0")]
|
|
[Address(RVA = "0x1C691C0", Offset = "0x1C67BC0", VA = "0x181C691C0")]
|
|
[Obsolete]
|
|
public void AddExtension(string oid, bool critical, byte[] value)
|
|
{
|
|
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
|
IDictionary dictionary = this.extensions;
|
|
DerOctetString derOctetString = new DerOctetString(value);
|
|
X509Extension x509Extension = new X509Extension(critical, derOctetString);
|
|
IList list = this.extOrdering;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007ED1 RID: 32465 RVA: 0x001A9048 File Offset: 0x001A7248
|
|
[Token(Token = "0x6007ED1")]
|
|
[Address(RVA = "0x1C69080", Offset = "0x1C67A80", VA = "0x181C69080", Slot = "4")]
|
|
public virtual void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extValue)
|
|
{
|
|
byte[] encoded = extValue.GetEncoded();
|
|
}
|
|
|
|
// Token: 0x06007ED2 RID: 32466 RVA: 0x001A9064 File Offset: 0x001A7264
|
|
[Token(Token = "0x6007ED2")]
|
|
[Address(RVA = "0x1C690E0", Offset = "0x1C67AE0", VA = "0x181C690E0", Slot = "5")]
|
|
public virtual void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extValue)
|
|
{
|
|
IDictionary dictionary = this.extensions;
|
|
DerOctetString derOctetString = new DerOctetString(extValue);
|
|
X509Extension x509Extension = new X509Extension(critical, derOctetString);
|
|
IList list = this.extOrdering;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007ED3 RID: 32467 RVA: 0x001A9094 File Offset: 0x001A7294
|
|
[Token(Token = "0x6007ED3")]
|
|
[Address(RVA = "0x1C693D0", Offset = "0x1C67DD0", VA = "0x181C693D0")]
|
|
public TimeStampRequest Generate(string digestAlgorithm, byte[] digest)
|
|
{
|
|
int num = 0;
|
|
return this.Generate(digestAlgorithm, digest, num);
|
|
}
|
|
|
|
// Token: 0x06007ED4 RID: 32468 RVA: 0x001A90AC File Offset: 0x001A72AC
|
|
[Token(Token = "0x6007ED4")]
|
|
[Address(RVA = "0x1C69450", Offset = "0x1C67E50", VA = "0x181C69450")]
|
|
public TimeStampRequest Generate(string digestAlgorithmOid, byte[] digest, BigInteger nonce)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007ED4)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequest BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequestGenerator::Generate(System.String,System.Byte[],BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_95:
|
|
stloc:ArgumentException(var_15_9F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("No digest algorithm specified")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06007ED5 RID: 32469 RVA: 0x001A915C File Offset: 0x001A735C
|
|
[Token(Token = "0x6007ED5")]
|
|
[Address(RVA = "0x1C693F0", Offset = "0x1C67DF0", VA = "0x181C693F0", Slot = "6")]
|
|
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest)
|
|
{
|
|
string identifier = digestAlgorithm.identifier;
|
|
int num = 0;
|
|
return this.Generate(identifier, digest, num);
|
|
}
|
|
|
|
// Token: 0x06007ED6 RID: 32470 RVA: 0x001A9184 File Offset: 0x001A7384
|
|
[Token(Token = "0x6007ED6")]
|
|
[Address(RVA = "0x1C69420", Offset = "0x1C67E20", VA = "0x181C69420", Slot = "7")]
|
|
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest, BigInteger nonce)
|
|
{
|
|
string identifier = digestAlgorithm.identifier;
|
|
return this.Generate(identifier, digest, nonce);
|
|
}
|
|
|
|
// Token: 0x06007ED7 RID: 32471 RVA: 0x001A91A8 File Offset: 0x001A73A8
|
|
[Token(Token = "0x6007ED7")]
|
|
[Address(RVA = "0x1C69740", Offset = "0x1C68140", VA = "0x181C69740")]
|
|
public TimeStampRequestGenerator()
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
this.extensions = dictionary;
|
|
IList list = Platform.CreateArrayList();
|
|
this.extOrdering = list;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x04005A6E RID: 23150
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4005A6E")]
|
|
private DerObjectIdentifier reqPolicy;
|
|
|
|
// Token: 0x04005A6F RID: 23151
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4005A6F")]
|
|
private DerBoolean certReq;
|
|
|
|
// Token: 0x04005A70 RID: 23152
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4005A70")]
|
|
private IDictionary extensions;
|
|
|
|
// Token: 0x04005A71 RID: 23153
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4005A71")]
|
|
private IList extOrdering;
|
|
}
|
|
}
|