172 lines
8.7 KiB
C#
172 lines
8.7 KiB
C#
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: 0x0200196A RID: 6506
|
|
[Token(Token = "0x200196A")]
|
|
public class TimeStampRequestGenerator
|
|
{
|
|
// Token: 0x06009AA7 RID: 39591 RVA: 0x002005AC File Offset: 0x001FE7AC
|
|
[Token(Token = "0x6009AA7")]
|
|
[Address(RVA = "0x1B29B10", Offset = "0x1B28910", VA = "0x181B29B10")]
|
|
public void SetReqPolicy(string reqPolicy)
|
|
{
|
|
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(reqPolicy);
|
|
this.reqPolicy = derObjectIdentifier;
|
|
}
|
|
|
|
// Token: 0x06009AA8 RID: 39592 RVA: 0x002005C8 File Offset: 0x001FE7C8
|
|
[Token(Token = "0x6009AA8")]
|
|
[Address(RVA = "0x1B29AA0", Offset = "0x1B288A0", VA = "0x181B29AA0")]
|
|
public void SetCertReq(bool certReq)
|
|
{
|
|
DerBoolean instance = DerBoolean.GetInstance(certReq);
|
|
this.certReq = instance;
|
|
}
|
|
|
|
// Token: 0x06009AA9 RID: 39593 RVA: 0x002005E4 File Offset: 0x001FE7E4
|
|
[Token(Token = "0x6009AA9")]
|
|
[Address(RVA = "0x1B29700", Offset = "0x1B28500", VA = "0x181B29700")]
|
|
[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: 0x06009AAA RID: 39594 RVA: 0x00200624 File Offset: 0x001FE824
|
|
[Token(Token = "0x6009AAA")]
|
|
[Address(RVA = "0x1B29600", Offset = "0x1B28400", VA = "0x181B29600")]
|
|
[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: 0x06009AAB RID: 39595 RVA: 0x0020065C File Offset: 0x001FE85C
|
|
[Token(Token = "0x6009AAB")]
|
|
[Address(RVA = "0x1B294C0", Offset = "0x1B282C0", VA = "0x181B294C0", Slot = "4")]
|
|
public virtual void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extValue)
|
|
{
|
|
byte[] encoded = extValue.GetEncoded();
|
|
}
|
|
|
|
// Token: 0x06009AAC RID: 39596 RVA: 0x00200678 File Offset: 0x001FE878
|
|
[Token(Token = "0x6009AAC")]
|
|
[Address(RVA = "0x1B29520", Offset = "0x1B28320", VA = "0x181B29520", 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: 0x06009AAD RID: 39597 RVA: 0x002006A8 File Offset: 0x001FE8A8
|
|
[Token(Token = "0x6009AAD")]
|
|
[Address(RVA = "0x1B29810", Offset = "0x1B28610", VA = "0x181B29810")]
|
|
public TimeStampRequest Generate(string digestAlgorithm, byte[] digest)
|
|
{
|
|
int num = 0;
|
|
return this.Generate(digestAlgorithm, digest, num);
|
|
}
|
|
|
|
// Token: 0x06009AAE RID: 39598 RVA: 0x002006C0 File Offset: 0x001FE8C0
|
|
[Token(Token = "0x6009AAE")]
|
|
[Address(RVA = "0x1B29890", Offset = "0x1B28690", VA = "0x181B29890")]
|
|
public TimeStampRequest Generate(string digestAlgorithmOid, byte[] digest, BigInteger nonce)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009AAE)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009AAF RID: 39599 RVA: 0x00200770 File Offset: 0x001FE970
|
|
[Token(Token = "0x6009AAF")]
|
|
[Address(RVA = "0x1B29830", Offset = "0x1B28630", VA = "0x181B29830", Slot = "6")]
|
|
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest)
|
|
{
|
|
string identifier = digestAlgorithm.identifier;
|
|
int num = 0;
|
|
return this.Generate(identifier, digest, num);
|
|
}
|
|
|
|
// Token: 0x06009AB0 RID: 39600 RVA: 0x00200798 File Offset: 0x001FE998
|
|
[Token(Token = "0x6009AB0")]
|
|
[Address(RVA = "0x1B29860", Offset = "0x1B28660", VA = "0x181B29860", Slot = "7")]
|
|
public virtual TimeStampRequest Generate(DerObjectIdentifier digestAlgorithm, byte[] digest, BigInteger nonce)
|
|
{
|
|
string identifier = digestAlgorithm.identifier;
|
|
return this.Generate(identifier, digest, nonce);
|
|
}
|
|
|
|
// Token: 0x06009AB1 RID: 39601 RVA: 0x002007BC File Offset: 0x001FE9BC
|
|
[Token(Token = "0x6009AB1")]
|
|
[Address(RVA = "0x1B29B80", Offset = "0x1B28980", VA = "0x181B29B80")]
|
|
public TimeStampRequestGenerator()
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
this.extensions = dictionary;
|
|
IList list = Platform.CreateArrayList();
|
|
this.extOrdering = list;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x040068B1 RID: 26801
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40068B1")]
|
|
private DerObjectIdentifier reqPolicy;
|
|
|
|
// Token: 0x040068B2 RID: 26802
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40068B2")]
|
|
private DerBoolean certReq;
|
|
|
|
// Token: 0x040068B3 RID: 26803
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40068B3")]
|
|
private IDictionary extensions;
|
|
|
|
// Token: 0x040068B4 RID: 26804
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40068B4")]
|
|
private IList extOrdering;
|
|
}
|
|
}
|