300 lines
11 KiB
C#
300 lines
11 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
|
|
{
|
|
// Token: 0x020018C1 RID: 6337
|
|
[Token(Token = "0x20018C1")]
|
|
[StructLayout(3)]
|
|
public class SignerInfo : Asn1Encodable
|
|
{
|
|
// Token: 0x0600AA48 RID: 43592 RVA: 0x0027BDA0 File Offset: 0x00279FA0
|
|
[Token(Token = "0x600AA48")]
|
|
[Address(RVA = "0x26344D0", Offset = "0x2632ED0", VA = "0x1826344D0")]
|
|
public static SignerInfo GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AA48)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs.SignerInfo BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs.SignerInfo::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_22:
|
|
stloc:string(var_6_28, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_7_40, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Unknown object in factory: "), ldloc:string(var_6_28)), ldstr:string("obj")))
|
|
}
|
|
|
|
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: 0x0600AA49 RID: 43593 RVA: 0x0027BDF0 File Offset: 0x00279FF0
|
|
[Token(Token = "0x600AA49")]
|
|
[Address(RVA = "0x2634DD0", Offset = "0x26337D0", VA = "0x182634DD0")]
|
|
public SignerInfo(DerInteger version, IssuerAndSerialNumber issuerAndSerialNumber, AlgorithmIdentifier digAlgorithm, Asn1Set authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, Asn1OctetString encryptedDigest, Asn1Set unauthenticatedAttributes)
|
|
{
|
|
this.authenticatedAttributes = 0;
|
|
this.digEncryptionAlgorithm = 0;
|
|
this.encryptedDigest = 0;
|
|
this.version = version;
|
|
this.digAlgorithm = digAlgorithm;
|
|
this.unauthenticatedAttributes = 0;
|
|
this.issuerAndSerialNumber = issuerAndSerialNumber;
|
|
}
|
|
|
|
// Token: 0x0600AA4A RID: 43594 RVA: 0x0027BE34 File Offset: 0x0027A034
|
|
[Token(Token = "0x600AA4A")]
|
|
[Address(RVA = "0x2634AA0", Offset = "0x26334A0", VA = "0x182634AA0")]
|
|
public SignerInfo(Asn1Sequence seq)
|
|
{
|
|
int num;
|
|
for (;;)
|
|
{
|
|
base..ctor();
|
|
IEnumerator enumerator = seq.GetEnumerator();
|
|
if (enumerator == 0)
|
|
{
|
|
}
|
|
num = 0;
|
|
if (enumerator != 0)
|
|
{
|
|
this.version = enumerator;
|
|
IssuerAndSerialNumber issuerAndSerialNumber;
|
|
this.issuerAndSerialNumber = issuerAndSerialNumber;
|
|
AlgorithmIdentifier instance = AlgorithmIdentifier.GetInstance(issuerAndSerialNumber);
|
|
this.digAlgorithm = instance;
|
|
Asn1Set asn1Set;
|
|
if (instance != 0 && instance != 0)
|
|
{
|
|
if (instance == 0)
|
|
{
|
|
continue;
|
|
}
|
|
this.authenticatedAttributes = asn1Set;
|
|
}
|
|
this.authenticatedAttributes = num;
|
|
AlgorithmIdentifier instance2 = AlgorithmIdentifier.GetInstance(asn1Set);
|
|
this.digEncryptionAlgorithm = instance2;
|
|
Asn1OctetString instance3 = Asn1OctetString.GetInstance(instance2);
|
|
this.encryptedDigest = instance3;
|
|
if (instance3 == 0)
|
|
{
|
|
break;
|
|
}
|
|
if (instance3 == 0 || instance3 != 0)
|
|
{
|
|
goto IL_9A;
|
|
}
|
|
}
|
|
}
|
|
this.unauthenticatedAttributes = num;
|
|
return;
|
|
IL_9A:
|
|
Asn1Set asn1Set2;
|
|
this.unauthenticatedAttributes = asn1Set2;
|
|
}
|
|
|
|
// Token: 0x17001AD4 RID: 6868
|
|
// (get) Token: 0x0600AA4B RID: 43595 RVA: 0x0027BEEC File Offset: 0x0027A0EC
|
|
[Token(Token = "0x17001AD4")]
|
|
public DerInteger Version
|
|
{
|
|
[Token(Token = "0x600AA4B")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
|
get
|
|
{
|
|
return this.version;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001AD5 RID: 6869
|
|
// (get) Token: 0x0600AA4C RID: 43596 RVA: 0x0027BF00 File Offset: 0x0027A100
|
|
[Token(Token = "0x17001AD5")]
|
|
public IssuerAndSerialNumber IssuerAndSerialNumber
|
|
{
|
|
[Token(Token = "0x600AA4C")]
|
|
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
|
get
|
|
{
|
|
return this.issuerAndSerialNumber;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001AD6 RID: 6870
|
|
// (get) Token: 0x0600AA4D RID: 43597 RVA: 0x0027BF14 File Offset: 0x0027A114
|
|
[Token(Token = "0x17001AD6")]
|
|
public Asn1Set AuthenticatedAttributes
|
|
{
|
|
[Token(Token = "0x600AA4D")]
|
|
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
|
get
|
|
{
|
|
return this.authenticatedAttributes;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001AD7 RID: 6871
|
|
// (get) Token: 0x0600AA4E RID: 43598 RVA: 0x0027BF28 File Offset: 0x0027A128
|
|
[Token(Token = "0x17001AD7")]
|
|
public AlgorithmIdentifier DigestAlgorithm
|
|
{
|
|
[Token(Token = "0x600AA4E")]
|
|
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
|
get
|
|
{
|
|
return this.digAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001AD8 RID: 6872
|
|
// (get) Token: 0x0600AA4F RID: 43599 RVA: 0x0027BF3C File Offset: 0x0027A13C
|
|
[Token(Token = "0x17001AD8")]
|
|
public Asn1OctetString EncryptedDigest
|
|
{
|
|
[Token(Token = "0x600AA4F")]
|
|
[Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")]
|
|
get
|
|
{
|
|
return this.encryptedDigest;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001AD9 RID: 6873
|
|
// (get) Token: 0x0600AA50 RID: 43600 RVA: 0x0027BF50 File Offset: 0x0027A150
|
|
[Token(Token = "0x17001AD9")]
|
|
public AlgorithmIdentifier DigestEncryptionAlgorithm
|
|
{
|
|
[Token(Token = "0x600AA50")]
|
|
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
|
|
get
|
|
{
|
|
return this.digEncryptionAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001ADA RID: 6874
|
|
// (get) Token: 0x0600AA51 RID: 43601 RVA: 0x0027BF64 File Offset: 0x0027A164
|
|
[Token(Token = "0x17001ADA")]
|
|
public Asn1Set UnauthenticatedAttributes
|
|
{
|
|
[Token(Token = "0x600AA51")]
|
|
[Address(RVA = "0x3D32F0", Offset = "0x3D1CF0", VA = "0x1803D32F0")]
|
|
get
|
|
{
|
|
return this.unauthenticatedAttributes;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600AA52 RID: 43602 RVA: 0x0027BF78 File Offset: 0x0027A178
|
|
[Token(Token = "0x600AA52")]
|
|
[Address(RVA = "0x26346C0", Offset = "0x26330C0", VA = "0x1826346C0", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[3];
|
|
DerInteger derInteger = this.version;
|
|
if (derInteger != 0)
|
|
{
|
|
}
|
|
array[0] = derInteger;
|
|
IssuerAndSerialNumber issuerAndSerialNumber = this.issuerAndSerialNumber;
|
|
if (issuerAndSerialNumber != 0)
|
|
{
|
|
}
|
|
array[1] = issuerAndSerialNumber;
|
|
AlgorithmIdentifier algorithmIdentifier = this.digAlgorithm;
|
|
if (algorithmIdentifier != 0)
|
|
{
|
|
}
|
|
array[2] = algorithmIdentifier;
|
|
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
|
|
if (this.authenticatedAttributes != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
Asn1Set asn1Set = this.authenticatedAttributes;
|
|
int num;
|
|
int num2;
|
|
DerTaggedObject derTaggedObject = new DerTaggedObject(num != 0, num2, asn1Set);
|
|
num2 = 0;
|
|
num = 0;
|
|
if (derTaggedObject != 0)
|
|
{
|
|
}
|
|
array2[0] = derTaggedObject;
|
|
asn1EncodableVector.Add(array2);
|
|
}
|
|
Asn1Encodable[] array3 = new Asn1Encodable[2];
|
|
AlgorithmIdentifier algorithmIdentifier2 = this.digEncryptionAlgorithm;
|
|
if (algorithmIdentifier2 != 0)
|
|
{
|
|
}
|
|
array3[0] = algorithmIdentifier2;
|
|
Asn1OctetString asn1OctetString = this.encryptedDigest;
|
|
if (asn1OctetString != 0)
|
|
{
|
|
}
|
|
array3[1] = asn1OctetString;
|
|
asn1EncodableVector.Add(array3);
|
|
if (this.unauthenticatedAttributes != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array4 = new Asn1Encodable[1];
|
|
Asn1Set asn1Set2 = this.unauthenticatedAttributes;
|
|
int num3;
|
|
DerTaggedObject derTaggedObject2 = new DerTaggedObject(num3 != 0, 1, asn1Set2);
|
|
num3 = 0;
|
|
if (derTaggedObject2 != 0)
|
|
{
|
|
}
|
|
array4[0] = derTaggedObject2;
|
|
asn1EncodableVector.Add(array4);
|
|
}
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x04006F91 RID: 28561
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006F91")]
|
|
private DerInteger version;
|
|
|
|
// Token: 0x04006F92 RID: 28562
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006F92")]
|
|
private IssuerAndSerialNumber issuerAndSerialNumber;
|
|
|
|
// Token: 0x04006F93 RID: 28563
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006F93")]
|
|
private AlgorithmIdentifier digAlgorithm;
|
|
|
|
// Token: 0x04006F94 RID: 28564
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006F94")]
|
|
private Asn1Set authenticatedAttributes;
|
|
|
|
// Token: 0x04006F95 RID: 28565
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4006F95")]
|
|
private AlgorithmIdentifier digEncryptionAlgorithm;
|
|
|
|
// Token: 0x04006F96 RID: 28566
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4006F96")]
|
|
private Asn1OctetString encryptedDigest;
|
|
|
|
// Token: 0x04006F97 RID: 28567
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4006F97")]
|
|
private Asn1Set unauthenticatedAttributes;
|
|
}
|
|
}
|