scripts
This commit is contained in:
+137
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001568 RID: 5480
|
||||
[Token(Token = "0x2001568")]
|
||||
[StructLayout(3)]
|
||||
public class OcspStatusRequest
|
||||
{
|
||||
// Token: 0x0600918C RID: 37260 RVA: 0x0020496C File Offset: 0x00202B6C
|
||||
[Token(Token = "0x600918C")]
|
||||
[Address(RVA = "0x3C39C0", Offset = "0x3C23C0", VA = "0x1803C39C0")]
|
||||
public OcspStatusRequest(IList responderIDList, X509Extensions requestExtensions)
|
||||
{
|
||||
this.mResponderIDList = responderIDList;
|
||||
this.mRequestExtensions = requestExtensions;
|
||||
}
|
||||
|
||||
// Token: 0x17001770 RID: 6000
|
||||
// (get) Token: 0x0600918D RID: 37261 RVA: 0x00204990 File Offset: 0x00202B90
|
||||
[Token(Token = "0x17001770")]
|
||||
public virtual IList ResponderIDList
|
||||
{
|
||||
[Token(Token = "0x600918D")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
return this.mResponderIDList;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001771 RID: 6001
|
||||
// (get) Token: 0x0600918E RID: 37262 RVA: 0x002049A4 File Offset: 0x00202BA4
|
||||
[Token(Token = "0x17001771")]
|
||||
public virtual X509Extensions RequestExtensions
|
||||
{
|
||||
[Token(Token = "0x600918E")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return this.mRequestExtensions;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600918F RID: 37263 RVA: 0x002049B8 File Offset: 0x00202BB8
|
||||
[Token(Token = "0x600918F")]
|
||||
[Address(RVA = "0x1E888E0", Offset = "0x1E872E0", VA = "0x181E888E0", Slot = "6")]
|
||||
public virtual void Encode(Stream output)
|
||||
{
|
||||
if (this.mResponderIDList != 0)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
IList list = this.mResponderIDList;
|
||||
int num = 0;
|
||||
if (num < memoryStream)
|
||||
{
|
||||
IList list2 = this.mResponderIDList;
|
||||
if (num < list)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
byte[] array;
|
||||
TlsUtilities.WriteOpaque16(array, memoryStream);
|
||||
IList list3 = this.mResponderIDList;
|
||||
num++;
|
||||
memoryStream += memoryStream;
|
||||
}
|
||||
TlsUtilities.CheckUint16(memoryStream.CanWrite ? 1L : 0L);
|
||||
TlsUtilities.WriteUint16(memoryStream.CanWrite ? 1 : 0, output);
|
||||
Streams.WriteBufTo(memoryStream, output);
|
||||
}
|
||||
TlsUtilities.WriteUint16(0, output);
|
||||
X509Extensions x509Extensions = this.mRequestExtensions;
|
||||
if (x509Extensions != 0)
|
||||
{
|
||||
byte[] encoded = x509Extensions.GetEncoded("DER");
|
||||
TlsUtilities.CheckUint16(encoded.Length);
|
||||
TlsUtilities.WriteUint16(encoded.Length, output);
|
||||
int num2 = output.ReadByte();
|
||||
}
|
||||
TlsUtilities.WriteUint16(0, output);
|
||||
}
|
||||
|
||||
// Token: 0x06009190 RID: 37264 RVA: 0x00204A7C File Offset: 0x00202C7C
|
||||
[Token(Token = "0x6009190")]
|
||||
[Address(RVA = "0x1E88C00", Offset = "0x1E87600", VA = "0x181E88C00")]
|
||||
public static OcspStatusRequest Parse(Stream input)
|
||||
{
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num = TlsUtilities.ReadUint16(input);
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
int num3;
|
||||
MemoryStream memoryStream = new MemoryStream(TlsUtilities.ReadFully(num, input), num3 != 0);
|
||||
num3 = 0;
|
||||
ResponderID instance = ResponderID.GetInstance(TlsUtilities.ReadDerObject(TlsUtilities.ReadOpaque16(memoryStream)));
|
||||
if (num2 < num3)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
long length = memoryStream.Length;
|
||||
}
|
||||
int num4 = TlsUtilities.ReadUint16(input);
|
||||
num = num4;
|
||||
X509Extensions instance2;
|
||||
if (num4 > 0)
|
||||
{
|
||||
instance2 = X509Extensions.GetInstance(TlsUtilities.ReadDerObject(TlsUtilities.ReadFully(num, input)));
|
||||
}
|
||||
OcspStatusRequest ocspStatusRequest;
|
||||
ocspStatusRequest.mResponderIDList = list;
|
||||
ocspStatusRequest.mRequestExtensions = instance2;
|
||||
return ocspStatusRequest;
|
||||
}
|
||||
|
||||
// Token: 0x04006127 RID: 24871
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006127")]
|
||||
protected readonly IList mResponderIDList;
|
||||
|
||||
// Token: 0x04006128 RID: 24872
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006128")]
|
||||
protected readonly X509Extensions mRequestExtensions;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user