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: 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;
|
|
}
|
|
}
|