196 lines
7.2 KiB
C#
196 lines
7.2 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
|
|
{
|
|
// Token: 0x02001932 RID: 6450
|
|
[Token(Token = "0x2001932")]
|
|
[StructLayout(3)]
|
|
public class PkiArchiveOptions : Asn1Encodable, IAsn1Choice
|
|
{
|
|
// Token: 0x0600AD0B RID: 44299 RVA: 0x00287D4C File Offset: 0x00285F4C
|
|
[Token(Token = "0x600AD0B")]
|
|
[Address(RVA = "0x1EDED60", Offset = "0x1EDD760", VA = "0x181EDED60")]
|
|
public static PkiArchiveOptions GetInstance(object obj)
|
|
{
|
|
while (obj != 0)
|
|
{
|
|
if (obj == 0)
|
|
{
|
|
if (obj == 0)
|
|
{
|
|
break;
|
|
}
|
|
if (obj != 0)
|
|
{
|
|
PkiArchiveOptions pkiArchiveOptions;
|
|
if (pkiArchiveOptions != 0)
|
|
{
|
|
if (pkiArchiveOptions != 0 && pkiArchiveOptions != (ulong)1L)
|
|
{
|
|
IL_68:
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
Asn1Object asn1Object;
|
|
EncryptedKey instance = EncryptedKey.GetInstance(asn1Object);
|
|
pkiArchiveOptions.value = instance;
|
|
return pkiArchiveOptions;
|
|
}
|
|
}
|
|
else if (obj != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
string typeName = Platform.GetTypeName(obj);
|
|
string text = "Invalid object: " + typeName;
|
|
ArgumentException ex = new ArgumentException(text, "obj");
|
|
goto IL_68;
|
|
}
|
|
|
|
// Token: 0x0600AD0C RID: 44300 RVA: 0x00287DE8 File Offset: 0x00285FE8
|
|
[Token(Token = "0x600AD0C")]
|
|
[Address(RVA = "0x1EDF260", Offset = "0x1EDDC60", VA = "0x181EDF260")]
|
|
private PkiArchiveOptions(Asn1TaggedObject tagged)
|
|
{
|
|
int tagNo = tagged.tagNo;
|
|
if (tagNo == 0)
|
|
{
|
|
EncryptedKey instance = EncryptedKey.GetInstance(tagged.GetObject());
|
|
this.value = instance;
|
|
return;
|
|
}
|
|
if (tagNo == 0)
|
|
{
|
|
int num = 0;
|
|
Asn1OctetString instance2 = Asn1OctetString.GetInstance(tagged, num != 0);
|
|
this.value = instance2;
|
|
return;
|
|
}
|
|
if (tagNo == 1)
|
|
{
|
|
int num2 = 0;
|
|
DerBoolean instance3 = DerBoolean.GetInstance(tagged, num2 != 0);
|
|
this.value = instance3;
|
|
return;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600AD0D RID: 44301 RVA: 0x00287E78 File Offset: 0x00286078
|
|
[Token(Token = "0x600AD0D")]
|
|
[Address(RVA = "0x579A20", Offset = "0x578420", VA = "0x180579A20")]
|
|
public PkiArchiveOptions(EncryptedKey encKey)
|
|
{
|
|
this.value = encKey;
|
|
}
|
|
|
|
// Token: 0x0600AD0E RID: 44302 RVA: 0x00287E94 File Offset: 0x00286094
|
|
[Token(Token = "0x600AD0E")]
|
|
[Address(RVA = "0x579A20", Offset = "0x578420", VA = "0x180579A20")]
|
|
public PkiArchiveOptions(Asn1OctetString keyGenParameters)
|
|
{
|
|
this.value = keyGenParameters;
|
|
}
|
|
|
|
// Token: 0x0600AD0F RID: 44303 RVA: 0x00287EB0 File Offset: 0x002860B0
|
|
[Token(Token = "0x600AD0F")]
|
|
[Address(RVA = "0x1EDF160", Offset = "0x1EDDB60", VA = "0x181EDF160")]
|
|
public PkiArchiveOptions(bool archiveRemGenPrivKey)
|
|
{
|
|
if (archiveRemGenPrivKey)
|
|
{
|
|
DerBoolean @true = DerBoolean.True;
|
|
this.value = @true;
|
|
return;
|
|
}
|
|
DerBoolean @false = DerBoolean.False;
|
|
this.value = @false;
|
|
}
|
|
|
|
// Token: 0x17001B86 RID: 7046
|
|
// (get) Token: 0x0600AD10 RID: 44304 RVA: 0x00287EE4 File Offset: 0x002860E4
|
|
[Token(Token = "0x17001B86")]
|
|
public virtual int Type
|
|
{
|
|
[Token(Token = "0x600AD10")]
|
|
[Address(RVA = "0x1EDF3A0", Offset = "0x1EDDDA0", VA = "0x181EDF3A0", Slot = "6")]
|
|
get
|
|
{
|
|
Asn1Encodable asn1Encodable = this.value;
|
|
if (asn1Encodable != 0)
|
|
{
|
|
if (asn1Encodable != 0)
|
|
{
|
|
return 0;
|
|
}
|
|
if (asn1Encodable == 0 || asn1Encodable == 0)
|
|
{
|
|
}
|
|
}
|
|
return 2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001B87 RID: 7047
|
|
// (get) Token: 0x0600AD11 RID: 44305 RVA: 0x00287F10 File Offset: 0x00286110
|
|
[Token(Token = "0x17001B87")]
|
|
public virtual Asn1Encodable Value
|
|
{
|
|
[Token(Token = "0x600AD11")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "7")]
|
|
get
|
|
{
|
|
return this.value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600AD12 RID: 44306 RVA: 0x00287F24 File Offset: 0x00286124
|
|
[Token(Token = "0x600AD12")]
|
|
[Address(RVA = "0x1EDF040", Offset = "0x1EDDA40", VA = "0x181EDF040", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AD12)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf.PkiArchiveOptions::ToAsn1Object()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_30:
|
|
stloc:DerTaggedObject(var_5_39, newobj:DerTaggedObject(DerTaggedObject::.ctor, ldloc:int32[exp:bool](var_6), ldc.i4:int32(2), ldloc:Asn1Encodable(var_0_06)))
|
|
stloc:int32(var_6, ldc.i4:int32(0))
|
|
}
|
|
|
|
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: 0x040071EC RID: 29164
|
|
[Token(Token = "0x40071EC")]
|
|
public const int encryptedPrivKey = 0;
|
|
|
|
// Token: 0x040071ED RID: 29165
|
|
[Token(Token = "0x40071ED")]
|
|
public const int keyGenParameters = 1;
|
|
|
|
// Token: 0x040071EE RID: 29166
|
|
[Token(Token = "0x40071EE")]
|
|
public const int archiveRemGenPrivKey = 2;
|
|
|
|
// Token: 0x040071EF RID: 29167
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40071EF")]
|
|
private readonly Asn1Encodable value;
|
|
}
|
|
}
|