scripts
This commit is contained in:
+445
@@ -0,0 +1,445 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x020015AC RID: 5548
|
||||
[Token(Token = "0x20015AC")]
|
||||
[StructLayout(3)]
|
||||
public class TlsPskKeyExchange : AbstractTlsKeyExchange
|
||||
{
|
||||
// Token: 0x060093B8 RID: 37816 RVA: 0x0020B1E0 File Offset: 0x002093E0
|
||||
[Token(Token = "0x60093B8")]
|
||||
[Address(RVA = "0x1E03F50", Offset = "0x1E02950", VA = "0x181E03F50")]
|
||||
[Obsolete]
|
||||
public TlsPskKeyExchange(int keyExchange, IList supportedSignatureAlgorithms, TlsPskIdentity pskIdentity, TlsPskIdentityManager pskIdentityManager, DHParameters dhParameters, int[] namedCurves, byte[] clientECPointFormats, byte[] serverECPointFormats)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060093B8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPskKeyExchange::.ctor(System.Int32,System.Collections.IList,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPskIdentity,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPskIdentityManager,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DHParameters,System.Int32[],System.Byte[],System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_4B:
|
||||
stloc:InvalidOperationException(var_1_55, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("unsupported key exchange algorithm")))
|
||||
}
|
||||
|
||||
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: 0x060093B9 RID: 37817 RVA: 0x0020B244 File Offset: 0x00209444
|
||||
[Token(Token = "0x60093B9")]
|
||||
[Address(RVA = "0x1E04070", Offset = "0x1E02A70", VA = "0x181E04070")]
|
||||
public TlsPskKeyExchange(int keyExchange, IList supportedSignatureAlgorithms, TlsPskIdentity pskIdentity, TlsPskIdentityManager pskIdentityManager, TlsDHVerifier dhVerifier, DHParameters dhParameters, int[] namedCurves, byte[] clientECPointFormats, byte[] serverECPointFormats)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060093B9)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPskKeyExchange::.ctor(System.Int32,System.Collections.IList,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPskIdentity,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPskIdentityManager,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsDHVerifier,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DHParameters,System.Int32[],System.Byte[],System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3F:
|
||||
stloc:InvalidOperationException(var_0_49, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("unsupported key exchange algorithm")))
|
||||
}
|
||||
|
||||
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: 0x060093BA RID: 37818 RVA: 0x0020B29C File Offset: 0x0020949C
|
||||
[Token(Token = "0x60093BA")]
|
||||
[Address(RVA = "0x1E03E20", Offset = "0x1E02820", VA = "0x181E03E20", Slot = "21")]
|
||||
public override void SkipServerCredentials()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060093BB RID: 37819 RVA: 0x0020B2AC File Offset: 0x002094AC
|
||||
[Token(Token = "0x60093BB")]
|
||||
[Address(RVA = "0x1E03BB0", Offset = "0x1E025B0", VA = "0x181E03BB0", Slot = "23")]
|
||||
public override void ProcessServerCredentials(TlsCredentials serverCredentials)
|
||||
{
|
||||
this.SkipServerCredentials();
|
||||
}
|
||||
|
||||
// Token: 0x060093BC RID: 37820 RVA: 0x0020B2C0 File Offset: 0x002094C0
|
||||
[Token(Token = "0x60093BC")]
|
||||
[Address(RVA = "0x1E03480", Offset = "0x1E01E80", VA = "0x181E03480", Slot = "25")]
|
||||
public override byte[] GenerateServerKeyExchange()
|
||||
{
|
||||
do
|
||||
{
|
||||
TlsPskIdentityManager tlsPskIdentityManager = this.mPskIdentityManager;
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
if (this.mPskIdentityHint != 0)
|
||||
{
|
||||
}
|
||||
TlsUtilities.WriteOpaque16(TlsUtilities.EmptyBytes, memoryStream);
|
||||
int mKeyExchange = this.mKeyExchange;
|
||||
if (mKeyExchange != 14)
|
||||
{
|
||||
if (mKeyExchange != 24)
|
||||
{
|
||||
goto IL_5F;
|
||||
}
|
||||
TlsContext mContext = this.mContext;
|
||||
ECPrivateKeyParameters ecprivateKeyParameters;
|
||||
this.mECAgreePrivateKey = ecprivateKeyParameters;
|
||||
}
|
||||
}
|
||||
while (this.mDHParameters == (ulong)0L);
|
||||
TlsContext mContext2 = this.mContext;
|
||||
DHPrivateKeyParameters dhprivateKeyParameters;
|
||||
this.mDHAgreePrivateKey = dhprivateKeyParameters;
|
||||
IL_5F:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060093BD RID: 37821 RVA: 0x0020B334 File Offset: 0x00209534
|
||||
[Token(Token = "0x60093BD")]
|
||||
[Address(RVA = "0x1E039A0", Offset = "0x1E023A0", VA = "0x181E039A0", Slot = "22")]
|
||||
public override void ProcessServerCertificate(Certificate serverCertificate)
|
||||
{
|
||||
X509CertificateStructure[] certificateList;
|
||||
for (;;)
|
||||
{
|
||||
if (serverCertificate.Length == 0)
|
||||
{
|
||||
certificateList = serverCertificate.GetCertificateList();
|
||||
AsymmetricKeyParameter asymmetricKeyParameter = PublicKeyFactory.CreateKey(certificateList.SubjectPublicKeyInfo);
|
||||
this.mServerPublicKey = asymmetricKeyParameter;
|
||||
if (!asymmetricKeyParameter.privateKey)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] array;
|
||||
this.mRsaServerPublicKey = array;
|
||||
TlsUtilities.ValidateKeyUsage(certificateList, 32);
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x170017BD RID: 6077
|
||||
// (get) Token: 0x060093BE RID: 37822 RVA: 0x0020B384 File Offset: 0x00209584
|
||||
[Token(Token = "0x170017BD")]
|
||||
public override bool RequiresServerKeyExchange
|
||||
{
|
||||
[Token(Token = "0x60093BE")]
|
||||
[Address(RVA = "0x1E04150", Offset = "0x1E02B50", VA = "0x181E04150", Slot = "24")]
|
||||
get
|
||||
{
|
||||
int mKeyExchange = this.mKeyExchange;
|
||||
if (mKeyExchange == 14 || mKeyExchange != 24)
|
||||
{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060093BF RID: 37823 RVA: 0x0020B3A8 File Offset: 0x002095A8
|
||||
[Token(Token = "0x60093BF")]
|
||||
[Address(RVA = "0x1E03CA0", Offset = "0x1E026A0", VA = "0x181E03CA0", Slot = "27")]
|
||||
public override void ProcessServerKeyExchange(Stream input)
|
||||
{
|
||||
byte[] array = TlsUtilities.ReadOpaque16(input);
|
||||
this.mPskIdentityHint = array;
|
||||
int mKeyExchange = this.mKeyExchange;
|
||||
if (mKeyExchange != 14)
|
||||
{
|
||||
if (mKeyExchange != 24)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int[] array2 = this.mNamedCurves;
|
||||
byte[] array3 = this.mClientECPointFormats;
|
||||
ECDomainParameters ecdomainParameters = TlsEccUtilities.ReadECParameters(array2, array3, input);
|
||||
byte[] array4 = TlsUtilities.ReadOpaque8(input);
|
||||
ECPublicKeyParameters ecpublicKeyParameters = TlsEccUtilities.DeserializeECPublicKey(this.mClientECPointFormats, ecdomainParameters, array4);
|
||||
this.mECAgreePublicKey = ecpublicKeyParameters;
|
||||
}
|
||||
DHParameters dhparameters = TlsDHUtilities.ReceiveDHParameters(this.mDHVerifier, input);
|
||||
this.mDHParameters = dhparameters;
|
||||
BigInteger bigInteger = TlsDHUtilities.ReadDHParameter(input);
|
||||
DHParameters dhparameters2 = this.mDHParameters;
|
||||
DHPublicKeyParameters dhpublicKeyParameters = new DHPublicKeyParameters(bigInteger, dhparameters2);
|
||||
this.mDHAgreePublicKey = dhpublicKeyParameters;
|
||||
}
|
||||
|
||||
// Token: 0x060093C0 RID: 37824 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60093C0")]
|
||||
[Address(RVA = "0x1E03E80", Offset = "0x1E02880", VA = "0x181E03E80", Slot = "28")]
|
||||
public override void ValidateCertificateRequest(CertificateRequest certificateRequest)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060093C1 RID: 37825 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60093C1")]
|
||||
[Address(RVA = "0x1E036C0", Offset = "0x1E020C0", VA = "0x181E036C0", Slot = "30")]
|
||||
public override void ProcessClientCredentials(TlsCredentials clientCredentials)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060093C2 RID: 37826 RVA: 0x0020B448 File Offset: 0x00209648
|
||||
[Token(Token = "0x60093C2")]
|
||||
[Address(RVA = "0x1E02F30", Offset = "0x1E01930", VA = "0x181E02F30", Slot = "32")]
|
||||
public override void GenerateClientKeyExchange(Stream output)
|
||||
{
|
||||
byte[] array = this.mPskIdentityHint;
|
||||
TlsPskIdentity tlsPskIdentity = this.mPskIdentity;
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
TlsPskIdentity tlsPskIdentity2 = this.mPskIdentity;
|
||||
TlsPskIdentity tlsPskIdentity3 = this.mPskIdentity;
|
||||
TlsContext mContext = this.mContext;
|
||||
int mKeyExchange = this.mKeyExchange;
|
||||
if (mKeyExchange != 14 && mKeyExchange != 24)
|
||||
{
|
||||
if (mKeyExchange == 15)
|
||||
{
|
||||
RsaKeyParameters rsaKeyParameters = this.mRsaServerPublicKey;
|
||||
byte[] array2 = TlsRsaUtilities.GenerateEncryptedPreMasterSecret(this.mContext, rsaKeyParameters, output);
|
||||
this.mPremasterSecret = array2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060093C3 RID: 37827 RVA: 0x0020B4C0 File Offset: 0x002096C0
|
||||
[Token(Token = "0x60093C3")]
|
||||
[Address(RVA = "0x1E03710", Offset = "0x1E02110", VA = "0x181E03710", Slot = "33")]
|
||||
public override void ProcessClientKeyExchange(Stream input)
|
||||
{
|
||||
byte[] array;
|
||||
do
|
||||
{
|
||||
array = TlsUtilities.ReadOpaque16(input);
|
||||
TlsPskIdentityManager tlsPskIdentityManager = this.mPskIdentityManager;
|
||||
this.mPsk = array;
|
||||
}
|
||||
while (array == 0);
|
||||
TlsContext mContext = this.mContext;
|
||||
array[5] = array;
|
||||
int mKeyExchange = this.mKeyExchange;
|
||||
if (mKeyExchange != 14)
|
||||
{
|
||||
if (mKeyExchange != 24)
|
||||
{
|
||||
if (mKeyExchange == 15)
|
||||
{
|
||||
if (!TlsUtilities.IsSsl(this.mContext))
|
||||
{
|
||||
byte[] array2 = TlsUtilities.ReadOpaque16(input);
|
||||
}
|
||||
byte[] array3 = Streams.ReadAll(input);
|
||||
TlsEncryptionCredentials tlsEncryptionCredentials = this.mServerCredentials;
|
||||
this.mPremasterSecret = array3;
|
||||
}
|
||||
return;
|
||||
}
|
||||
byte[] array4 = TlsUtilities.ReadOpaque8(input);
|
||||
ECDomainParameters parameters = this.mECAgreePrivateKey.parameters;
|
||||
ECPublicKeyParameters ecpublicKeyParameters = TlsEccUtilities.DeserializeECPublicKey(this.mServerECPointFormats, parameters, array4);
|
||||
this.mECAgreePublicKey = ecpublicKeyParameters;
|
||||
}
|
||||
BigInteger bigInteger = TlsDHUtilities.ReadDHParameter(input);
|
||||
DHParameters dhparameters = this.mDHParameters;
|
||||
DHPublicKeyParameters dhpublicKeyParameters = new DHPublicKeyParameters(bigInteger, dhparameters);
|
||||
this.mDHAgreePublicKey = dhpublicKeyParameters;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060093C4 RID: 37828 RVA: 0x0020B590 File Offset: 0x00209790
|
||||
[Token(Token = "0x60093C4")]
|
||||
[Address(RVA = "0x1E03340", Offset = "0x1E01D40", VA = "0x181E03340", Slot = "34")]
|
||||
public override byte[] GeneratePremasterSecret()
|
||||
{
|
||||
byte[] array = this.mPsk;
|
||||
byte[] array2 = this.GeneratePremasterSecret();
|
||||
byte[] array3 = this.mPsk;
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(num);
|
||||
num = array3.Length;
|
||||
num += 4;
|
||||
TlsUtilities.WriteOpaque16(array2, memoryStream);
|
||||
TlsUtilities.WriteOpaque16(this.mPsk, memoryStream);
|
||||
byte[] array4 = this.mPsk;
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array4, (byte)num2);
|
||||
this.mPsk = (ulong)0L;
|
||||
((IDisposable)memoryStream).Dispose();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060093C5 RID: 37829 RVA: 0x0020B604 File Offset: 0x00209804
|
||||
[Token(Token = "0x60093C5")]
|
||||
[Address(RVA = "0x1E031E0", Offset = "0x1E01BE0", VA = "0x181E031E0", Slot = "35")]
|
||||
protected virtual byte[] GenerateOtherSecret(int pskLength)
|
||||
{
|
||||
int mKeyExchange;
|
||||
ECPrivateKeyParameters ecprivateKeyParameters;
|
||||
DHPrivateKeyParameters dhprivateKeyParameters;
|
||||
for (;;)
|
||||
{
|
||||
mKeyExchange = this.mKeyExchange;
|
||||
if (mKeyExchange != 14)
|
||||
{
|
||||
if (mKeyExchange != 24)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ecprivateKeyParameters = this.mECAgreePrivateKey;
|
||||
if (ecprivateKeyParameters != 0)
|
||||
{
|
||||
goto Block_2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dhprivateKeyParameters = this.mDHAgreePrivateKey;
|
||||
if (dhprivateKeyParameters != 0)
|
||||
{
|
||||
goto Block_3;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mKeyExchange != 15)
|
||||
{
|
||||
}
|
||||
return this.mPremasterSecret;
|
||||
Block_2:
|
||||
return TlsEccUtilities.CalculateECDHBasicAgreement(this.mECAgreePublicKey, ecprivateKeyParameters);
|
||||
Block_3:
|
||||
return TlsDHUtilities.CalculateDHBasicAgreement(this.mDHAgreePublicKey, dhprivateKeyParameters);
|
||||
}
|
||||
|
||||
// Token: 0x060093C6 RID: 37830 RVA: 0x0020B660 File Offset: 0x00209860
|
||||
[Token(Token = "0x60093C6")]
|
||||
[Address(RVA = "0x1E03ED0", Offset = "0x1E028D0", VA = "0x181E03ED0", Slot = "36")]
|
||||
protected virtual RsaKeyParameters ValidateRsaPublicKey(RsaKeyParameters key)
|
||||
{
|
||||
while (!key.exponent.IsProbablePrime(2))
|
||||
{
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
// Token: 0x04006214 RID: 25108
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006214")]
|
||||
protected TlsPskIdentity mPskIdentity;
|
||||
|
||||
// Token: 0x04006215 RID: 25109
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006215")]
|
||||
protected TlsPskIdentityManager mPskIdentityManager;
|
||||
|
||||
// Token: 0x04006216 RID: 25110
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006216")]
|
||||
protected TlsDHVerifier mDHVerifier;
|
||||
|
||||
// Token: 0x04006217 RID: 25111
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006217")]
|
||||
protected DHParameters mDHParameters;
|
||||
|
||||
// Token: 0x04006218 RID: 25112
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4006218")]
|
||||
protected int[] mNamedCurves;
|
||||
|
||||
// Token: 0x04006219 RID: 25113
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4006219")]
|
||||
protected byte[] mClientECPointFormats;
|
||||
|
||||
// Token: 0x0400621A RID: 25114
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400621A")]
|
||||
protected byte[] mServerECPointFormats;
|
||||
|
||||
// Token: 0x0400621B RID: 25115
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400621B")]
|
||||
protected byte[] mPskIdentityHint;
|
||||
|
||||
// Token: 0x0400621C RID: 25116
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x400621C")]
|
||||
protected byte[] mPsk;
|
||||
|
||||
// Token: 0x0400621D RID: 25117
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400621D")]
|
||||
protected DHPrivateKeyParameters mDHAgreePrivateKey;
|
||||
|
||||
// Token: 0x0400621E RID: 25118
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x400621E")]
|
||||
protected DHPublicKeyParameters mDHAgreePublicKey;
|
||||
|
||||
// Token: 0x0400621F RID: 25119
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400621F")]
|
||||
protected ECPrivateKeyParameters mECAgreePrivateKey;
|
||||
|
||||
// Token: 0x04006220 RID: 25120
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x4006220")]
|
||||
protected ECPublicKeyParameters mECAgreePublicKey;
|
||||
|
||||
// Token: 0x04006221 RID: 25121
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x4006221")]
|
||||
protected AsymmetricKeyParameter mServerPublicKey;
|
||||
|
||||
// Token: 0x04006222 RID: 25122
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x4006222")]
|
||||
protected RsaKeyParameters mRsaServerPublicKey;
|
||||
|
||||
// Token: 0x04006223 RID: 25123
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x4006223")]
|
||||
protected TlsEncryptionCredentials mServerCredentials;
|
||||
|
||||
// Token: 0x04006224 RID: 25124
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x4006224")]
|
||||
protected byte[] mPremasterSecret;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user