304 lines
13 KiB
C#
304 lines
13 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
|
|
{
|
|
// Token: 0x02001DB6 RID: 7606
|
|
[Token(Token = "0x2001DB6")]
|
|
public class DerUtcTime : Asn1Object
|
|
{
|
|
// Token: 0x0600C0B4 RID: 49332 RVA: 0x002BDBAC File Offset: 0x002BBDAC
|
|
[Token(Token = "0x600C0B4")]
|
|
[Address(RVA = "0x1883C10", Offset = "0x1882A10", VA = "0x181883C10")]
|
|
public static DerUtcTime GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C0B4)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerUtcTime BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerUtcTime::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_16:
|
|
stloc:string(var_3_1C, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_4_2D, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("illegal object in GetInstance: "), ldloc:string(var_3_1C))))
|
|
}
|
|
|
|
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: 0x0600C0B5 RID: 49333 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600C0B5")]
|
|
[Address(RVA = "0x1883D40", Offset = "0x1882B40", VA = "0x181883D40")]
|
|
public static DerUtcTime GetInstance(Asn1TaggedObject obj, bool isExplicit)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600C0B6 RID: 49334 RVA: 0x002BDBE8 File Offset: 0x002BBDE8
|
|
[Token(Token = "0x600C0B6")]
|
|
[Address(RVA = "0x1884080", Offset = "0x1882E80", VA = "0x181884080")]
|
|
public DerUtcTime(string time)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C0B6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerUtcTime::.ctor(System.String)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_33:
|
|
stloc:ArgumentNullException(var_4_3D, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("time")))
|
|
}
|
|
|
|
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: 0x0600C0B7 RID: 49335 RVA: 0x002BDC34 File Offset: 0x002BBE34
|
|
[Token(Token = "0x600C0B7")]
|
|
[Address(RVA = "0x18841B0", Offset = "0x1882FB0", VA = "0x1818841B0")]
|
|
public DerUtcTime(DateTime time)
|
|
{
|
|
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
|
|
string text2;
|
|
string text = text2 + "Z";
|
|
this.time = text;
|
|
}
|
|
|
|
// Token: 0x0600C0B8 RID: 49336 RVA: 0x002BDC64 File Offset: 0x002BBE64
|
|
[Token(Token = "0x600C0B8")]
|
|
[Address(RVA = "0x187CB00", Offset = "0x187B900", VA = "0x18187CB00")]
|
|
internal DerUtcTime(byte[] bytes)
|
|
{
|
|
string text = Strings.FromAsciiByteArray(bytes);
|
|
this.time = text;
|
|
}
|
|
|
|
// Token: 0x0600C0B9 RID: 49337 RVA: 0x002BDC88 File Offset: 0x002BBE88
|
|
[Token(Token = "0x600C0B9")]
|
|
[Address(RVA = "0x1884030", Offset = "0x1882E30", VA = "0x181884030")]
|
|
public DateTime ToDateTime()
|
|
{
|
|
string timeString = this.TimeString;
|
|
return this.ParseDateString(timeString, "yyMMddHHmmss'GMT'zzz");
|
|
}
|
|
|
|
// Token: 0x0600C0BA RID: 49338 RVA: 0x002BDCA8 File Offset: 0x002BBEA8
|
|
[Token(Token = "0x600C0BA")]
|
|
[Address(RVA = "0x1883F80", Offset = "0x1882D80", VA = "0x181883F80")]
|
|
public DateTime ToAdjustedDateTime()
|
|
{
|
|
string timeString = this.TimeString;
|
|
int num = 0;
|
|
char c = timeString[num];
|
|
string text = timeString + timeString;
|
|
return this.ParseDateString(text, "yyyyMMddHHmmss'GMT'zzz");
|
|
}
|
|
|
|
// Token: 0x0600C0BB RID: 49339 RVA: 0x002BDCE0 File Offset: 0x002BBEE0
|
|
[Token(Token = "0x600C0BB")]
|
|
[Address(RVA = "0x1883EC0", Offset = "0x1882CC0", VA = "0x181883EC0")]
|
|
private DateTime ParseDateString(string dateStr, string formatStr)
|
|
{
|
|
DateTimeFormatInfo invariantInfo = DateTimeFormatInfo.InvariantInfo;
|
|
DateTime dateTime = DateTime.ParseExact(dateStr, formatStr, invariantInfo);
|
|
DateTime dateTime2;
|
|
return dateTime2;
|
|
}
|
|
|
|
// Token: 0x17001DB5 RID: 7605
|
|
// (get) Token: 0x0600C0BC RID: 49340 RVA: 0x002BDD00 File Offset: 0x002BBF00
|
|
[Token(Token = "0x17001DB5")]
|
|
public string TimeString
|
|
{
|
|
[Token(Token = "0x600C0BC")]
|
|
[Address(RVA = "0x18842B0", Offset = "0x18830B0", VA = "0x1818842B0")]
|
|
get
|
|
{
|
|
uint num2;
|
|
int num = this.time.IndexOf((char)num2);
|
|
uint num4;
|
|
int num3 = this.time.IndexOf((char)num4);
|
|
string text = this.time;
|
|
if (text.m_stringLength != 11)
|
|
{
|
|
int num5 = 0;
|
|
return text.Substring(num5, 12) + "GMT+00:00";
|
|
}
|
|
int num6 = 0;
|
|
string text2 = text.Substring(num6, 10);
|
|
uint num8;
|
|
int num7 = this.time.IndexOf((char)num8);
|
|
uint num9;
|
|
num7 = this.time.IndexOf((char)num9);
|
|
string text3 = this.time;
|
|
int stringLength = text3.m_stringLength;
|
|
string text4;
|
|
if (num7 == stringLength)
|
|
{
|
|
text4 = text3 + "00";
|
|
}
|
|
string[] array = new string[5];
|
|
string text7;
|
|
if (num7 != 10)
|
|
{
|
|
int num10 = 0;
|
|
string text5 = text4.Substring(num10, 12);
|
|
if (text5 != 0)
|
|
{
|
|
}
|
|
array[0] = text5;
|
|
if ("GMT" != 0)
|
|
{
|
|
}
|
|
array[1] = "GMT";
|
|
string text6 = text4.Substring(12, 3);
|
|
if (text6 != 0)
|
|
{
|
|
}
|
|
array[2] = text6;
|
|
if (":" != 0)
|
|
{
|
|
}
|
|
array[3] = ":";
|
|
text7 = text4.Substring(15, 2);
|
|
if (text7 != 0)
|
|
{
|
|
}
|
|
}
|
|
int num11 = 0;
|
|
string text8 = text7.Substring(num11, 10);
|
|
if (text8 != 0)
|
|
{
|
|
}
|
|
array[0] = text8;
|
|
if ("00GMT" != 0)
|
|
{
|
|
}
|
|
array[1] = "00GMT";
|
|
string text9 = text7.Substring(10, 3);
|
|
if (text9 != 0)
|
|
{
|
|
}
|
|
array[2] = text9;
|
|
if (":" != 0)
|
|
{
|
|
}
|
|
array[3] = ":";
|
|
string text10 = text7.Substring(13, 2);
|
|
if (text10 != 0)
|
|
{
|
|
}
|
|
array[4] = text10;
|
|
return string.Concat(array);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001DB6 RID: 7606
|
|
// (get) Token: 0x0600C0BD RID: 49341 RVA: 0x002BDEB8 File Offset: 0x002BC0B8
|
|
[Token(Token = "0x17001DB6")]
|
|
[Obsolete]
|
|
public string AdjustedTime
|
|
{
|
|
[Token(Token = "0x600C0BD")]
|
|
[Address(RVA = "0x1884240", Offset = "0x1883040", VA = "0x181884240")]
|
|
get
|
|
{
|
|
string timeString = this.TimeString;
|
|
int num = 0;
|
|
char c = timeString[num];
|
|
return timeString + timeString;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001DB7 RID: 7607
|
|
// (get) Token: 0x0600C0BE RID: 49342 RVA: 0x002BDEE4 File Offset: 0x002BC0E4
|
|
[Token(Token = "0x17001DB7")]
|
|
public string AdjustedTimeString
|
|
{
|
|
[Token(Token = "0x600C0BE")]
|
|
[Address(RVA = "0x1884240", Offset = "0x1883040", VA = "0x181884240")]
|
|
get
|
|
{
|
|
string timeString = this.TimeString;
|
|
int num = 0;
|
|
char c = timeString[num];
|
|
return timeString + timeString;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C0BF RID: 49343 RVA: 0x002BDF10 File Offset: 0x002BC110
|
|
[Token(Token = "0x600C0BF")]
|
|
[Address(RVA = "0x187B7B0", Offset = "0x187A5B0", VA = "0x18187B7B0")]
|
|
private byte[] GetOctets()
|
|
{
|
|
return Strings.ToAsciiByteArray(this.time);
|
|
}
|
|
|
|
// Token: 0x0600C0C0 RID: 49344 RVA: 0x002BDF28 File Offset: 0x002BC128
|
|
[Token(Token = "0x600C0C0")]
|
|
[Address(RVA = "0x1883B90", Offset = "0x1882990", VA = "0x181883B90", Slot = "6")]
|
|
internal override void Encode(DerOutputStream derOut)
|
|
{
|
|
int length = Strings.ToAsciiByteArray(this.time).Length;
|
|
derOut.WriteLength(length);
|
|
int num = derOut.ReadByte();
|
|
}
|
|
|
|
// Token: 0x0600C0C1 RID: 49345 RVA: 0x002BDF5C File Offset: 0x002BC15C
|
|
[Token(Token = "0x600C0C1")]
|
|
[Address(RVA = "0x1883AF0", Offset = "0x18828F0", VA = "0x181883AF0", Slot = "7")]
|
|
protected override bool Asn1Equals(Asn1Object asn1Object)
|
|
{
|
|
if (asn1Object != 0 && asn1Object != 0)
|
|
{
|
|
string text = this.time;
|
|
bool flag;
|
|
return flag;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C0C2 RID: 49346 RVA: 0x002BDF84 File Offset: 0x002BC184
|
|
[Token(Token = "0x600C0C2")]
|
|
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "8")]
|
|
protected override int Asn1GetHashCode()
|
|
{
|
|
object obj = ((ICloneable)this.time).Clone();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C0C3 RID: 49347 RVA: 0x002BDFA4 File Offset: 0x002BC1A4
|
|
[Token(Token = "0x600C0C3")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return this.time;
|
|
}
|
|
|
|
// Token: 0x040079C9 RID: 31177
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40079C9")]
|
|
private readonly string time;
|
|
}
|
|
}
|