scripts
This commit is contained in:
+365
@@ -0,0 +1,365 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001333 RID: 4915
|
||||
[Token(Token = "0x2001333")]
|
||||
[StructLayout(3)]
|
||||
public class X509V3CertificateGenerator
|
||||
{
|
||||
// Token: 0x06007B94 RID: 31636 RVA: 0x0019BAE0 File Offset: 0x00199CE0
|
||||
[Token(Token = "0x6007B94")]
|
||||
[Address(RVA = "0x53E480", Offset = "0x53CE80", VA = "0x18053E480")]
|
||||
public X509V3CertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06007B95 RID: 31637 RVA: 0x0019BB10 File Offset: 0x00199D10
|
||||
[Token(Token = "0x6007B95")]
|
||||
[Address(RVA = "0x53E080", Offset = "0x53CA80", VA = "0x18053E080")]
|
||||
public void Reset()
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06007B96 RID: 31638 RVA: 0x0019BB40 File Offset: 0x00199D40
|
||||
[Token(Token = "0x6007B96")]
|
||||
[Address(RVA = "0x53E250", Offset = "0x53CC50", VA = "0x18053E250")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B96)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V3CertificateGenerator::SetSerialNumber(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:ArgumentException(var_2_34, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("serial number must be a positive integer"), ldstr:string("serialNumber")))
|
||||
}
|
||||
|
||||
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: 0x06007B97 RID: 31639 RVA: 0x0019BB84 File Offset: 0x00199D84
|
||||
[Token(Token = "0x6007B97")]
|
||||
[Address(RVA = "0x53E0F0", Offset = "0x53CAF0", VA = "0x18053E0F0")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007B98 RID: 31640 RVA: 0x0019BBA4 File Offset: 0x00199DA4
|
||||
[Token(Token = "0x6007B98")]
|
||||
[Address(RVA = "0x53E1B0", Offset = "0x53CBB0", VA = "0x18053E1B0")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B99 RID: 31641 RVA: 0x0019BBCC File Offset: 0x00199DCC
|
||||
[Token(Token = "0x6007B99")]
|
||||
[Address(RVA = "0x53E140", Offset = "0x53CB40", VA = "0x18053E140")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9A RID: 31642 RVA: 0x0019BBF4 File Offset: 0x00199DF4
|
||||
[Token(Token = "0x6007B9A")]
|
||||
[Address(RVA = "0x53E430", Offset = "0x53CE30", VA = "0x18053E430")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9B RID: 31643 RVA: 0x0019BC14 File Offset: 0x00199E14
|
||||
[Token(Token = "0x6007B9B")]
|
||||
[Address(RVA = "0x53E220", Offset = "0x53CC20", VA = "0x18053E220")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v3TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9C RID: 31644 RVA: 0x0019BC3C File Offset: 0x00199E3C
|
||||
[Token(Token = "0x6007B9C")]
|
||||
[Address(RVA = "0x53E310", Offset = "0x53CD10", VA = "0x18053E310")]
|
||||
[Obsolete]
|
||||
public void SetSignatureAlgorithm(string signatureAlgorithm)
|
||||
{
|
||||
this.signatureAlgorithm = signatureAlgorithm;
|
||||
DerObjectIdentifier algorithmOid = X509Utilities.GetAlgorithmOid(signatureAlgorithm);
|
||||
this.sigOid = algorithmOid;
|
||||
AlgorithmIdentifier sigAlgID = X509Utilities.GetSigAlgID(algorithmOid, signatureAlgorithm);
|
||||
this.sigAlgId = sigAlgID;
|
||||
this.tbsGen.signature = sigAlgID;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9D RID: 31645 RVA: 0x0019BC8C File Offset: 0x00199E8C
|
||||
[Token(Token = "0x6007B9D")]
|
||||
[Address(RVA = "0x53E450", Offset = "0x53CE50", VA = "0x18053E450")]
|
||||
public void SetSubjectUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.subjectUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9E RID: 31646 RVA: 0x0019BCB8 File Offset: 0x00199EB8
|
||||
[Token(Token = "0x6007B9E")]
|
||||
[Address(RVA = "0x53E110", Offset = "0x53CB10", VA = "0x18053E110")]
|
||||
public void SetIssuerUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.issuerUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9F RID: 31647 RVA: 0x0019BCE4 File Offset: 0x00199EE4
|
||||
[Token(Token = "0x6007B9F")]
|
||||
[Address(RVA = "0x53E500", Offset = "0x53CF00", VA = "0x18053E500")]
|
||||
private DerBitString booleanToBitString(bool[] id)
|
||||
{
|
||||
int num = id.Length;
|
||||
num += 7;
|
||||
byte[] array = new byte[id];
|
||||
int num2 = 0;
|
||||
int num3 = id.Length;
|
||||
if (num2 != num3)
|
||||
{
|
||||
num2 += id;
|
||||
num2 -= id;
|
||||
uint num4;
|
||||
num4 -= (uint)num2;
|
||||
num2++;
|
||||
}
|
||||
if (num2 < array.Length)
|
||||
{
|
||||
num3++;
|
||||
}
|
||||
uint num5;
|
||||
DerBitString derBitString = new DerBitString(array, (int)num5);
|
||||
if (num3 != 0)
|
||||
{
|
||||
num5 -= (uint)num3;
|
||||
return derBitString;
|
||||
}
|
||||
return derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06007BA0 RID: 31648 RVA: 0x0019BD50 File Offset: 0x00199F50
|
||||
[Token(Token = "0x6007BA0")]
|
||||
[Address(RVA = "0x53D870", Offset = "0x53C270", VA = "0x18053D870")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA1 RID: 31649 RVA: 0x0019BD7C File Offset: 0x00199F7C
|
||||
[Token(Token = "0x6007BA1")]
|
||||
[Address(RVA = "0x53CB30", Offset = "0x53B530", VA = "0x18053CB30")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA2 RID: 31650 RVA: 0x0019BDA0 File Offset: 0x00199FA0
|
||||
[Token(Token = "0x6007BA2")]
|
||||
[Address(RVA = "0x53D700", Offset = "0x53C100", VA = "0x18053D700")]
|
||||
public void AddExtension(string oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA3 RID: 31651 RVA: 0x0019BDD4 File Offset: 0x00199FD4
|
||||
[Token(Token = "0x6007BA3")]
|
||||
[Address(RVA = "0x53D7C0", Offset = "0x53C1C0", VA = "0x18053D7C0")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA4 RID: 31652 RVA: 0x0019BE00 File Offset: 0x0019A000
|
||||
[Token(Token = "0x6007BA4")]
|
||||
[Address(RVA = "0x53DA90", Offset = "0x53C490", VA = "0x18053DA90")]
|
||||
public void CopyAndAddExtension(string oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
this.CopyAndAddExtension(derObjectIdentifier, critical, cert);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA5 RID: 31653 RVA: 0x0019BE20 File Offset: 0x0019A020
|
||||
[Token(Token = "0x6007BA5")]
|
||||
[Address(RVA = "0x53D920", Offset = "0x53C320", VA = "0x18053D920")]
|
||||
public void CopyAndAddExtension(DerObjectIdentifier oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BA5)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V3CertificateGenerator::CopyAndAddExtension(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier,System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_24:
|
||||
stloc:CertificateParsingException(var_3_39, newobj:CertificateParsingException(CertificateParsingException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("extension "), ldloc:DerObjectIdentifier[exp:object](oid), ldstr:string[exp:object](" not present"))))
|
||||
}
|
||||
|
||||
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: 0x06007BA6 RID: 31654 RVA: 0x0019BE68 File Offset: 0x0019A068
|
||||
[Token(Token = "0x6007BA6")]
|
||||
[Address(RVA = "0x53DFF0", Offset = "0x53C9F0", VA = "0x18053DFF0")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA7 RID: 31655 RVA: 0x0019BE8C File Offset: 0x0019A08C
|
||||
[Token(Token = "0x6007BA7")]
|
||||
[Address(RVA = "0x53DBF0", Offset = "0x53C5F0", VA = "0x18053DBF0")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA8 RID: 31656 RVA: 0x0019BEB0 File Offset: 0x0019A0B0
|
||||
[Token(Token = "0x6007BA8")]
|
||||
[Address(RVA = "0x53DC90", Offset = "0x53C690", VA = "0x18053DC90")]
|
||||
public X509Certificate Generate(ISignatureFactory signatureCalculatorFactory)
|
||||
{
|
||||
byte[] derEncoded;
|
||||
for (;;)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
if (signatureCalculatorFactory != 0)
|
||||
{
|
||||
if (!this.extGenerator.IsEmpty)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator2 = this.tbsGen;
|
||||
X509Extensions x509Extensions = x509ExtensionsGenerator.Generate();
|
||||
v3TbsCertificateGenerator2.SetExtensions(x509Extensions);
|
||||
}
|
||||
derEncoded = this.tbsGen.GenerateTbsCertificate().GetDerEncoded();
|
||||
if (derEncoded != 0 && derEncoded != 0)
|
||||
{
|
||||
if (derEncoded == 0)
|
||||
{
|
||||
}
|
||||
if (derEncoded != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DerBitString derBitString = new DerBitString(derEncoded);
|
||||
X509CertificateStructure x509CertificateStructure;
|
||||
return new X509Certificate(x509CertificateStructure);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA9 RID: 31657 RVA: 0x0019BF40 File Offset: 0x0019A140
|
||||
[Token(Token = "0x6007BA9")]
|
||||
[Address(RVA = "0x53DB30", Offset = "0x53C530", VA = "0x18053DB30")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x17001423 RID: 5155
|
||||
// (get) Token: 0x06007BAA RID: 31658 RVA: 0x0019BF64 File Offset: 0x0019A164
|
||||
[Token(Token = "0x17001423")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6007BAA")]
|
||||
[Address(RVA = "0x53E650", Offset = "0x53D050", VA = "0x18053E650")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005876 RID: 22646
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005876")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x04005877 RID: 22647
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005877")]
|
||||
private V3TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x04005878 RID: 22648
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005878")]
|
||||
private DerObjectIdentifier sigOid;
|
||||
|
||||
// Token: 0x04005879 RID: 22649
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005879")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x0400587A RID: 22650
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400587A")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user