m
This commit is contained in:
+460
@@ -0,0 +1,460 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
||||
{
|
||||
// Token: 0x02001FFD RID: 8189
|
||||
[Token(Token = "0x2001FFD")]
|
||||
public class AuthenticatedData : Asn1Encodable
|
||||
{
|
||||
// Token: 0x0600CD1C RID: 52508 RVA: 0x002EA3A8 File Offset: 0x002E85A8
|
||||
[Token(Token = "0x600CD1C")]
|
||||
[Address(RVA = "0x2FDE310", Offset = "0x2FDD310", VA = "0x182FDE310")]
|
||||
public AuthenticatedData(OriginatorInfo originatorInfo, Asn1Set recipientInfos, AlgorithmIdentifier macAlgorithm, AlgorithmIdentifier digestAlgorithm, ContentInfo encapsulatedContent, Asn1Set authAttrs, Asn1OctetString mac, Asn1Set unauthAttrs)
|
||||
{
|
||||
DerInteger derInteger = new DerInteger(AuthenticatedData.CalculateVersion(originatorInfo));
|
||||
this.encapsulatedContentInfo = 0;
|
||||
this.mac = 0;
|
||||
this.version = derInteger;
|
||||
this.authAttrs = 0;
|
||||
this.unauthAttrs = 0;
|
||||
this.originatorInfo = originatorInfo;
|
||||
this.macAlgorithm = macAlgorithm;
|
||||
this.digestAlgorithm = 0;
|
||||
this.recipientInfos = recipientInfos;
|
||||
}
|
||||
|
||||
// Token: 0x0600CD1D RID: 52509 RVA: 0x002EA414 File Offset: 0x002E8614
|
||||
[Token(Token = "0x600CD1D")]
|
||||
[Address(RVA = "0x2FDDED0", Offset = "0x2FDCED0", VA = "0x182FDDED0")]
|
||||
private AuthenticatedData(Asn1Sequence seq)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
base..ctor();
|
||||
Asn1SequenceParser parser = seq.Parser;
|
||||
if (parser == 0)
|
||||
{
|
||||
}
|
||||
if (parser != 0)
|
||||
{
|
||||
this.version = parser;
|
||||
Asn1SequenceParser parser2 = seq.Parser;
|
||||
if (parser2 != 0 && parser2 != 0)
|
||||
{
|
||||
if (parser2 == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Asn1Sequence asn1Sequence;
|
||||
OriginatorInfo instance = OriginatorInfo.GetInstance(asn1Sequence);
|
||||
this.originatorInfo = instance;
|
||||
Asn1SequenceParser parser3 = seq.Parser;
|
||||
}
|
||||
Asn1Set asn1Set;
|
||||
this.recipientInfos = asn1Set;
|
||||
Asn1SequenceParser parser4 = seq.Parser;
|
||||
AlgorithmIdentifier algorithmIdentifier;
|
||||
this.macAlgorithm = algorithmIdentifier;
|
||||
Asn1SequenceParser parser5 = seq.Parser;
|
||||
if (parser5 != 0 && parser5 != 0)
|
||||
{
|
||||
if (parser5 == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
AlgorithmIdentifier algorithmIdentifier2;
|
||||
this.digestAlgorithm = algorithmIdentifier2;
|
||||
Asn1SequenceParser parser6 = seq.Parser;
|
||||
}
|
||||
ContentInfo contentInfo;
|
||||
this.encapsulatedContentInfo = contentInfo;
|
||||
Asn1SequenceParser parser7 = seq.Parser;
|
||||
if (parser7 != 0 && parser7 != 0)
|
||||
{
|
||||
if (parser7 == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Asn1Set asn1Set2;
|
||||
this.authAttrs = asn1Set2;
|
||||
Asn1SequenceParser parser8 = seq.Parser;
|
||||
}
|
||||
Asn1OctetString asn1OctetString;
|
||||
this.mac = asn1OctetString;
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (asn1Encodable <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Asn1SequenceParser parser9 = seq.Parser;
|
||||
if (parser9 == 0 || parser9 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Asn1Set asn1Set3;
|
||||
this.unauthAttrs = asn1Set3;
|
||||
}
|
||||
|
||||
// Token: 0x0600CD1E RID: 52510 RVA: 0x002EA524 File Offset: 0x002E8724
|
||||
[Token(Token = "0x600CD1E")]
|
||||
[Address(RVA = "0x2FDD950", Offset = "0x2FDC950", VA = "0x182FDD950")]
|
||||
public static AuthenticatedData GetInstance(Asn1TaggedObject obj, bool isExplicit)
|
||||
{
|
||||
return AuthenticatedData.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
|
||||
}
|
||||
|
||||
// Token: 0x0600CD1F RID: 52511 RVA: 0x002EA540 File Offset: 0x002E8740
|
||||
[Token(Token = "0x600CD1F")]
|
||||
[Address(RVA = "0x2FDD760", Offset = "0x2FDC760", VA = "0x182FDD760")]
|
||||
public static AuthenticatedData GetInstance(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600CD1F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AuthenticatedData BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AuthenticatedData::GetInstance(System.Object)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_26:
|
||||
stloc:string(var_6_2C, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
||||
stloc:ArgumentException(var_7_3F, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid AuthenticatedData: "), ldloc:string(var_6_2C))))
|
||||
}
|
||||
|
||||
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: 0x17002040 RID: 8256
|
||||
// (get) Token: 0x0600CD20 RID: 52512 RVA: 0x002EA590 File Offset: 0x002E8790
|
||||
[Token(Token = "0x17002040")]
|
||||
public DerInteger Version
|
||||
{
|
||||
[Token(Token = "0x600CD20")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
get
|
||||
{
|
||||
return this.version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002041 RID: 8257
|
||||
// (get) Token: 0x0600CD21 RID: 52513 RVA: 0x002EA5A4 File Offset: 0x002E87A4
|
||||
[Token(Token = "0x17002041")]
|
||||
public OriginatorInfo OriginatorInfo
|
||||
{
|
||||
[Token(Token = "0x600CD21")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.originatorInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002042 RID: 8258
|
||||
// (get) Token: 0x0600CD22 RID: 52514 RVA: 0x002EA5B8 File Offset: 0x002E87B8
|
||||
[Token(Token = "0x17002042")]
|
||||
public Asn1Set RecipientInfos
|
||||
{
|
||||
[Token(Token = "0x600CD22")]
|
||||
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
||||
get
|
||||
{
|
||||
return this.recipientInfos;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002043 RID: 8259
|
||||
// (get) Token: 0x0600CD23 RID: 52515 RVA: 0x002EA5CC File Offset: 0x002E87CC
|
||||
[Token(Token = "0x17002043")]
|
||||
public AlgorithmIdentifier MacAlgorithm
|
||||
{
|
||||
[Token(Token = "0x600CD23")]
|
||||
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
||||
get
|
||||
{
|
||||
return this.macAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002044 RID: 8260
|
||||
// (get) Token: 0x0600CD24 RID: 52516 RVA: 0x002EA5E0 File Offset: 0x002E87E0
|
||||
[Token(Token = "0x17002044")]
|
||||
public AlgorithmIdentifier DigestAlgorithm
|
||||
{
|
||||
[Token(Token = "0x600CD24")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
get
|
||||
{
|
||||
return this.digestAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002045 RID: 8261
|
||||
// (get) Token: 0x0600CD25 RID: 52517 RVA: 0x002EA5F4 File Offset: 0x002E87F4
|
||||
[Token(Token = "0x17002045")]
|
||||
public ContentInfo EncapsulatedContentInfo
|
||||
{
|
||||
[Token(Token = "0x600CD25")]
|
||||
[Address(RVA = "0x41CEF0", Offset = "0x41BEF0", VA = "0x18041CEF0")]
|
||||
get
|
||||
{
|
||||
return this.encapsulatedContentInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002046 RID: 8262
|
||||
// (get) Token: 0x0600CD26 RID: 52518 RVA: 0x002EA608 File Offset: 0x002E8808
|
||||
[Token(Token = "0x17002046")]
|
||||
public Asn1Set AuthAttrs
|
||||
{
|
||||
[Token(Token = "0x600CD26")]
|
||||
[Address(RVA = "0x417680", Offset = "0x416680", VA = "0x180417680")]
|
||||
get
|
||||
{
|
||||
return this.authAttrs;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002047 RID: 8263
|
||||
// (get) Token: 0x0600CD27 RID: 52519 RVA: 0x002EA61C File Offset: 0x002E881C
|
||||
[Token(Token = "0x17002047")]
|
||||
public Asn1OctetString Mac
|
||||
{
|
||||
[Token(Token = "0x600CD27")]
|
||||
[Address(RVA = "0x4975A0", Offset = "0x4965A0", VA = "0x1804975A0")]
|
||||
get
|
||||
{
|
||||
return this.mac;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17002048 RID: 8264
|
||||
// (get) Token: 0x0600CD28 RID: 52520 RVA: 0x002EA630 File Offset: 0x002E8830
|
||||
[Token(Token = "0x17002048")]
|
||||
public Asn1Set UnauthAttrs
|
||||
{
|
||||
[Token(Token = "0x600CD28")]
|
||||
[Address(RVA = "0x4936E0", Offset = "0x4926E0", VA = "0x1804936E0")]
|
||||
get
|
||||
{
|
||||
return this.unauthAttrs;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600CD29 RID: 52521 RVA: 0x002EA644 File Offset: 0x002E8844
|
||||
[Token(Token = "0x600CD29")]
|
||||
[Address(RVA = "0x2FDD970", Offset = "0x2FDC970", VA = "0x182FDD970", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
Asn1Encodable[] array = new Asn1Encodable[1];
|
||||
DerInteger derInteger = this.version;
|
||||
if (derInteger != 0)
|
||||
{
|
||||
}
|
||||
array[0] = derInteger;
|
||||
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
|
||||
int num = 0;
|
||||
if (this.originatorInfo != num)
|
||||
{
|
||||
Asn1Encodable[] array2 = new Asn1Encodable[0];
|
||||
OriginatorInfo originatorInfo = this.originatorInfo;
|
||||
int num2;
|
||||
int num3;
|
||||
DerTaggedObject derTaggedObject = new DerTaggedObject(num2 != 0, num3, originatorInfo);
|
||||
num3 = 0;
|
||||
num2 = 0;
|
||||
if (derTaggedObject != 0)
|
||||
{
|
||||
}
|
||||
array2[0] = derTaggedObject;
|
||||
asn1EncodableVector.Add(array2);
|
||||
}
|
||||
Asn1Encodable[] array3 = new Asn1Encodable[2];
|
||||
Asn1Set asn1Set = this.recipientInfos;
|
||||
if (asn1Set != 0)
|
||||
{
|
||||
}
|
||||
array3[0] = asn1Set;
|
||||
AlgorithmIdentifier algorithmIdentifier = this.macAlgorithm;
|
||||
if (algorithmIdentifier != 0)
|
||||
{
|
||||
}
|
||||
array3[1] = algorithmIdentifier;
|
||||
asn1EncodableVector.Add(array3);
|
||||
if (this.digestAlgorithm != num)
|
||||
{
|
||||
Asn1Encodable[] array4 = new Asn1Encodable[1];
|
||||
AlgorithmIdentifier algorithmIdentifier2 = this.digestAlgorithm;
|
||||
int num4;
|
||||
DerTaggedObject derTaggedObject2 = new DerTaggedObject(num4 != 0, 1, algorithmIdentifier2);
|
||||
num4 = 0;
|
||||
if (derTaggedObject2 != 0)
|
||||
{
|
||||
}
|
||||
array4[0] = derTaggedObject2;
|
||||
asn1EncodableVector.Add(array4);
|
||||
}
|
||||
Asn1Encodable[] array5 = new Asn1Encodable[1];
|
||||
ContentInfo contentInfo = this.encapsulatedContentInfo;
|
||||
if (contentInfo != 0)
|
||||
{
|
||||
}
|
||||
array5[0] = contentInfo;
|
||||
asn1EncodableVector.Add(array5);
|
||||
if (this.authAttrs != num)
|
||||
{
|
||||
Asn1Encodable[] array6 = new Asn1Encodable[1];
|
||||
Asn1Set asn1Set2 = this.authAttrs;
|
||||
int num5;
|
||||
DerTaggedObject derTaggedObject3 = new DerTaggedObject(num5 != 0, 2, asn1Set2);
|
||||
num5 = 0;
|
||||
if (derTaggedObject3 != 0)
|
||||
{
|
||||
}
|
||||
array6[0] = derTaggedObject3;
|
||||
asn1EncodableVector.Add(array6);
|
||||
}
|
||||
Asn1Encodable[] array7 = new Asn1Encodable[1];
|
||||
Asn1OctetString asn1OctetString = this.mac;
|
||||
if (asn1OctetString != 0)
|
||||
{
|
||||
}
|
||||
array7[0] = asn1OctetString;
|
||||
asn1EncodableVector.Add(array7);
|
||||
if (this.unauthAttrs != num)
|
||||
{
|
||||
Asn1Encodable[] array8 = new Asn1Encodable[1];
|
||||
Asn1Set asn1Set3 = this.unauthAttrs;
|
||||
int num6;
|
||||
DerTaggedObject derTaggedObject4 = new DerTaggedObject(num6 != 0, 3, asn1Set3);
|
||||
num6 = 0;
|
||||
if (derTaggedObject4 != 0)
|
||||
{
|
||||
}
|
||||
array8[0] = derTaggedObject4;
|
||||
asn1EncodableVector.Add(array8);
|
||||
}
|
||||
BerSequence berSequence = new BerSequence(asn1EncodableVector);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600CD2A RID: 52522 RVA: 0x002EA810 File Offset: 0x002E8A10
|
||||
[Token(Token = "0x600CD2A")]
|
||||
[Address(RVA = "0x2FDD400", Offset = "0x2FDC400", VA = "0x182FDD400")]
|
||||
public static int CalculateVersion(OriginatorInfo origInfo)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (origInfo == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
IEnumerator enumerator = origInfo.certs.GetEnumerator();
|
||||
if (enumerator != 0)
|
||||
{
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
int num2 = 0;
|
||||
if (enumerator == 0)
|
||||
{
|
||||
goto IL_5D;
|
||||
}
|
||||
if (num2 != 2)
|
||||
{
|
||||
while (num2 != 3)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
if (enumerator != 0)
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_63;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
IEnumerator enumerator2 = origInfo.crls.GetEnumerator();
|
||||
if (enumerator2 != 0)
|
||||
{
|
||||
while (enumerator2 == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return num;
|
||||
IL_5D:
|
||||
throw new NullReferenceException();
|
||||
IL_63:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04008216 RID: 33302
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4008216")]
|
||||
private DerInteger version;
|
||||
|
||||
// Token: 0x04008217 RID: 33303
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4008217")]
|
||||
private OriginatorInfo originatorInfo;
|
||||
|
||||
// Token: 0x04008218 RID: 33304
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4008218")]
|
||||
private Asn1Set recipientInfos;
|
||||
|
||||
// Token: 0x04008219 RID: 33305
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4008219")]
|
||||
private AlgorithmIdentifier macAlgorithm;
|
||||
|
||||
// Token: 0x0400821A RID: 33306
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400821A")]
|
||||
private AlgorithmIdentifier digestAlgorithm;
|
||||
|
||||
// Token: 0x0400821B RID: 33307
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400821B")]
|
||||
private ContentInfo encapsulatedContentInfo;
|
||||
|
||||
// Token: 0x0400821C RID: 33308
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400821C")]
|
||||
private Asn1Set authAttrs;
|
||||
|
||||
// Token: 0x0400821D RID: 33309
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400821D")]
|
||||
private Asn1OctetString mac;
|
||||
|
||||
// Token: 0x0400821E RID: 33310
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400821E")]
|
||||
private Asn1Set unauthAttrs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user