scripts
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
|
||||
namespace Mono.Security.X509.Extensions
|
||||
{
|
||||
// Token: 0x02000069 RID: 105
|
||||
public class CertificatePoliciesExtension : X509Extension
|
||||
{
|
||||
// Token: 0x060003DE RID: 990 RVA: 0x00019320 File Offset: 0x00017520
|
||||
public CertificatePoliciesExtension()
|
||||
{
|
||||
this.extnOid = "2.5.29.32";
|
||||
this.policies = new Hashtable();
|
||||
}
|
||||
|
||||
// Token: 0x060003DF RID: 991 RVA: 0x00019340 File Offset: 0x00017540
|
||||
public CertificatePoliciesExtension(ASN1 asn1)
|
||||
: base(asn1)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060003E0 RID: 992 RVA: 0x0001934C File Offset: 0x0001754C
|
||||
public CertificatePoliciesExtension(X509Extension extension)
|
||||
: base(extension)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060003E1 RID: 993 RVA: 0x00019358 File Offset: 0x00017558
|
||||
protected override void Decode()
|
||||
{
|
||||
this.policies = new Hashtable();
|
||||
ASN1 asn = new ASN1(this.extnValue.Value);
|
||||
if (asn.Tag != 48)
|
||||
{
|
||||
throw new ArgumentException("Invalid CertificatePolicies extension");
|
||||
}
|
||||
for (int i = 0; i < asn.Count; i++)
|
||||
{
|
||||
this.policies.Add(ASN1Convert.ToOid(asn[i][0]), null);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000DD RID: 221
|
||||
// (get) Token: 0x060003E2 RID: 994 RVA: 0x000193D0 File Offset: 0x000175D0
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Certificate Policies";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060003E3 RID: 995 RVA: 0x000193D8 File Offset: 0x000175D8
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
int num = 1;
|
||||
foreach (object obj in this.policies)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
stringBuilder.Append("[");
|
||||
stringBuilder.Append(num++);
|
||||
stringBuilder.Append("]Certificate Policy:");
|
||||
stringBuilder.Append(Environment.NewLine);
|
||||
stringBuilder.Append("\tPolicyIdentifier=");
|
||||
stringBuilder.Append((string)dictionaryEntry.Key);
|
||||
stringBuilder.Append(Environment.NewLine);
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x040001CB RID: 459
|
||||
private Hashtable policies;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user