Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Tsp/TimeStampResponseGenerator.cs
T
2026-04-08 23:40:05 +02:00

209 lines
9.7 KiB
C#

using System;
using System.Collections;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp
{
// Token: 0x0200138F RID: 5007
[Token(Token = "0x200138F")]
[StructLayout(3)]
public class TimeStampResponseGenerator
{
// Token: 0x06007EE2 RID: 32482 RVA: 0x001A9598 File Offset: 0x001A7798
[Token(Token = "0x6007EE2")]
[Address(RVA = "0x1C6AA40", Offset = "0x1C69440", VA = "0x181C6AA40")]
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms)
{
}
// Token: 0x06007EE3 RID: 32483 RVA: 0x001A95AC File Offset: 0x001A77AC
[Token(Token = "0x6007EE3")]
[Address(RVA = "0x1C6AA60", Offset = "0x1C69460", VA = "0x181C6AA60")]
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms, IList acceptedPolicy)
{
}
// Token: 0x06007EE4 RID: 32484 RVA: 0x001A95BC File Offset: 0x001A77BC
[Token(Token = "0x6007EE4")]
[Address(RVA = "0x1C6AA80", Offset = "0x1C69480", VA = "0x181C6AA80")]
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, IList acceptedAlgorithms, IList acceptedPolicies, IList acceptedExtensions)
{
this.acceptedExtensions = 0;
this.tokenGenerator = tokenGenerator;
this.acceptedAlgorithms = acceptedAlgorithms;
this.acceptedPolicies = acceptedPolicies;
Asn1EncodableVector asn1EncodableVector;
this.statusStrings = asn1EncodableVector;
}
// Token: 0x06007EE5 RID: 32485 RVA: 0x001A95F4 File Offset: 0x001A77F4
[Token(Token = "0x6007EE5")]
[Address(RVA = "0x1C6A230", Offset = "0x1C68C30", VA = "0x181C6A230")]
private void AddStatusString(string statusString)
{
Asn1EncodableVector asn1EncodableVector = this.statusStrings;
Asn1Encodable[] array = new Asn1Encodable[1];
DerUtf8String derUtf8String = new DerUtf8String(statusString);
if (derUtf8String != 0)
{
}
array[0] = derUtf8String;
asn1EncodableVector.Add(array);
}
// Token: 0x06007EE6 RID: 32486 RVA: 0x001A9630 File Offset: 0x001A7830
[Token(Token = "0x6007EE6")]
[Address(RVA = "0x1C6AA30", Offset = "0x1C69430", VA = "0x181C6AA30")]
private void SetFailInfoField(int field)
{
}
// Token: 0x06007EE7 RID: 32487 RVA: 0x001A9640 File Offset: 0x001A7840
[Token(Token = "0x6007EE7")]
[Address(RVA = "0x1C6A740", Offset = "0x1C69140", VA = "0x181C6A740")]
private PkiStatusInfo GetPkiStatusInfo()
{
Asn1Encodable[] array = new Asn1Encodable[1];
PkiStatus pkiStatus = this.status;
int num;
DerInteger derInteger = new DerInteger(num);
num = (int)pkiStatus;
if (derInteger != 0)
{
}
array[0] = derInteger;
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
if (this.statusStrings.Count > 0)
{
Asn1Encodable[] array2 = new Asn1Encodable[1];
PkiFreeText pkiFreeText = new PkiFreeText(new DerSequence(this.statusStrings));
if (pkiFreeText != 0)
{
}
array2[0] = pkiFreeText;
asn1EncodableVector.Add(array2);
}
if (this.failInfo != 0)
{
Asn1Encodable[] array3 = new Asn1Encodable[1];
TimeStampResponseGenerator.FailInfo failInfo = new TimeStampResponseGenerator.FailInfo(this.failInfo);
if (failInfo != 0)
{
}
array3[0] = failInfo;
asn1EncodableVector.Add(array3);
}
return new PkiStatusInfo(new DerSequence(asn1EncodableVector));
}
// Token: 0x06007EE8 RID: 32488 RVA: 0x001A9700 File Offset: 0x001A7900
[Token(Token = "0x6007EE8")]
[Address(RVA = "0x1C6A410", Offset = "0x1C68E10", VA = "0x181C6A410")]
public TimeStampResponse Generate(TimeStampRequest request, BigInteger serialNumber, DateTime genTime)
{
DateTimeObject dateTimeObject;
dateTimeObject.dt = genTime;
return this.Generate(request, serialNumber, dateTimeObject);
}
// Token: 0x06007EE9 RID: 32489 RVA: 0x001A9720 File Offset: 0x001A7920
[Token(Token = "0x6007EE9")]
[Address(RVA = "0x1C6A4B0", Offset = "0x1C68EB0", VA = "0x181C6A4B0")]
public TimeStampResponse Generate(TimeStampRequest request, BigInteger serialNumber, DateTimeObject genTime)
{
/*
An exception occurred when decompiling this method (06007EE9)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampResponse BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampResponseGenerator::Generate(BestHTTP.SecureProtocol.Org.BouncyCastle.Tsp.TimeStampRequest,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date.DateTimeObject)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_D9:
stloc:TspValidationException(var_17_E8, newobj:TspValidationException(TspValidationException::.ctor, ldstr:string("The time source is not available."), ldc.i4:int32(512)))
}
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
--- End of inner exception stack trace ---
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
*/;
}
// Token: 0x06007EEA RID: 32490 RVA: 0x001A9818 File Offset: 0x001A7A18
[Token(Token = "0x6007EEA")]
[Address(RVA = "0x1C6A310", Offset = "0x1C68D10", VA = "0x181C6A310")]
public TimeStampResponse GenerateFailResponse(PkiStatus status, int failInfoField, string statusString)
{
this.status = status;
if (statusString != 0)
{
this.AddStatusString(statusString);
}
int num;
TimeStampResp timeStampResp = new TimeStampResp(this.GetPkiStatusInfo(), num);
num = 0;
return new TimeStampResponse(timeStampResp);
}
// Token: 0x04005A74 RID: 23156
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4005A74")]
private PkiStatus status;
// Token: 0x04005A75 RID: 23157
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4005A75")]
private Asn1EncodableVector statusStrings;
// Token: 0x04005A76 RID: 23158
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4005A76")]
private int failInfo;
// Token: 0x04005A77 RID: 23159
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4005A77")]
private TimeStampTokenGenerator tokenGenerator;
// Token: 0x04005A78 RID: 23160
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4005A78")]
private IList acceptedAlgorithms;
// Token: 0x04005A79 RID: 23161
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4005A79")]
private IList acceptedPolicies;
// Token: 0x04005A7A RID: 23162
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4005A7A")]
private IList acceptedExtensions;
// Token: 0x02001390 RID: 5008
[Token(Token = "0x2001390")]
private class FailInfo : DerBitString
{
// Token: 0x06007EEB RID: 32491 RVA: 0x001A9864 File Offset: 0x001A7A64
[Token(Token = "0x6007EEB")]
[Address(RVA = "0x1C5F5D0", Offset = "0x1C5DFD0", VA = "0x181C5F5D0")]
internal FailInfo(int failInfoValue)
: base(failInfoValue)
{
}
}
}
}