298 lines
11 KiB
C#
298 lines
11 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
|
|
{
|
|
// Token: 0x02001E9E RID: 7838
|
|
[Token(Token = "0x2001E9E")]
|
|
public class SignerInfo : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C622 RID: 50722 RVA: 0x002D42AC File Offset: 0x002D24AC
|
|
[Token(Token = "0x600C622")]
|
|
[Address(RVA = "0x2BD4310", Offset = "0x2BD3110", VA = "0x182BD4310")]
|
|
public static SignerInfo GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C622)
|
|
|
|
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: 0x0600C623 RID: 50723 RVA: 0x002D42FC File Offset: 0x002D24FC
|
|
[Token(Token = "0x600C623")]
|
|
[Address(RVA = "0x2BD4C10", Offset = "0x2BD3A10", VA = "0x182BD4C10")]
|
|
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: 0x0600C624 RID: 50724 RVA: 0x002D4340 File Offset: 0x002D2540
|
|
[Token(Token = "0x600C624")]
|
|
[Address(RVA = "0x2BD48E0", Offset = "0x2BD36E0", VA = "0x182BD48E0")]
|
|
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: 0x17001ED5 RID: 7893
|
|
// (get) Token: 0x0600C625 RID: 50725 RVA: 0x002D43F8 File Offset: 0x002D25F8
|
|
[Token(Token = "0x17001ED5")]
|
|
public DerInteger Version
|
|
{
|
|
[Token(Token = "0x600C625")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
|
get
|
|
{
|
|
return this.version;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001ED6 RID: 7894
|
|
// (get) Token: 0x0600C626 RID: 50726 RVA: 0x002D440C File Offset: 0x002D260C
|
|
[Token(Token = "0x17001ED6")]
|
|
public IssuerAndSerialNumber IssuerAndSerialNumber
|
|
{
|
|
[Token(Token = "0x600C626")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
|
get
|
|
{
|
|
return this.issuerAndSerialNumber;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001ED7 RID: 7895
|
|
// (get) Token: 0x0600C627 RID: 50727 RVA: 0x002D4420 File Offset: 0x002D2620
|
|
[Token(Token = "0x17001ED7")]
|
|
public Asn1Set AuthenticatedAttributes
|
|
{
|
|
[Token(Token = "0x600C627")]
|
|
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
|
get
|
|
{
|
|
return this.authenticatedAttributes;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001ED8 RID: 7896
|
|
// (get) Token: 0x0600C628 RID: 50728 RVA: 0x002D4434 File Offset: 0x002D2634
|
|
[Token(Token = "0x17001ED8")]
|
|
public AlgorithmIdentifier DigestAlgorithm
|
|
{
|
|
[Token(Token = "0x600C628")]
|
|
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
|
get
|
|
{
|
|
return this.digAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001ED9 RID: 7897
|
|
// (get) Token: 0x0600C629 RID: 50729 RVA: 0x002D4448 File Offset: 0x002D2648
|
|
[Token(Token = "0x17001ED9")]
|
|
public Asn1OctetString EncryptedDigest
|
|
{
|
|
[Token(Token = "0x600C629")]
|
|
[Address(RVA = "0x3F63D0", Offset = "0x3F51D0", VA = "0x1803F63D0")]
|
|
get
|
|
{
|
|
return this.encryptedDigest;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001EDA RID: 7898
|
|
// (get) Token: 0x0600C62A RID: 50730 RVA: 0x002D445C File Offset: 0x002D265C
|
|
[Token(Token = "0x17001EDA")]
|
|
public AlgorithmIdentifier DigestEncryptionAlgorithm
|
|
{
|
|
[Token(Token = "0x600C62A")]
|
|
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
|
get
|
|
{
|
|
return this.digEncryptionAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001EDB RID: 7899
|
|
// (get) Token: 0x0600C62B RID: 50731 RVA: 0x002D4470 File Offset: 0x002D2670
|
|
[Token(Token = "0x17001EDB")]
|
|
public Asn1Set UnauthenticatedAttributes
|
|
{
|
|
[Token(Token = "0x600C62B")]
|
|
[Address(RVA = "0x408890", Offset = "0x407690", VA = "0x180408890")]
|
|
get
|
|
{
|
|
return this.unauthenticatedAttributes;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C62C RID: 50732 RVA: 0x002D4484 File Offset: 0x002D2684
|
|
[Token(Token = "0x600C62C")]
|
|
[Address(RVA = "0x2BD4500", Offset = "0x2BD3300", VA = "0x182BD4500", 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: 0x04007DD4 RID: 32212
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007DD4")]
|
|
private DerInteger version;
|
|
|
|
// Token: 0x04007DD5 RID: 32213
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007DD5")]
|
|
private IssuerAndSerialNumber issuerAndSerialNumber;
|
|
|
|
// Token: 0x04007DD6 RID: 32214
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007DD6")]
|
|
private AlgorithmIdentifier digAlgorithm;
|
|
|
|
// Token: 0x04007DD7 RID: 32215
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007DD7")]
|
|
private Asn1Set authenticatedAttributes;
|
|
|
|
// Token: 0x04007DD8 RID: 32216
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4007DD8")]
|
|
private AlgorithmIdentifier digEncryptionAlgorithm;
|
|
|
|
// Token: 0x04007DD9 RID: 32217
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4007DD9")]
|
|
private Asn1OctetString encryptedDigest;
|
|
|
|
// Token: 0x04007DDA RID: 32218
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4007DDA")]
|
|
private Asn1Set unauthenticatedAttributes;
|
|
}
|
|
}
|