360 lines
17 KiB
C#
360 lines
17 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.Serialization;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Security.Cryptography.X509Certificates
|
|
{
|
|
/// <summary>Provides methods that help you use X.509 v.3 certificates.</summary>
|
|
// Token: 0x02000431 RID: 1073
|
|
[Token(Token = "0x2000431")]
|
|
[MonoTODO]
|
|
[ComVisible(true)]
|
|
[MonoTODO("X509ContentType.SerializedCert isn't supported (anywhere in the class)")]
|
|
[Serializable]
|
|
public class X509Certificate : IDeserializationCallback, ISerializable, IDisposable
|
|
{
|
|
// Token: 0x06002411 RID: 9233 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002411")]
|
|
[Address(RVA = "0x2E07030", Offset = "0x2E05E30", VA = "0x182E07030")]
|
|
internal X509Certificate(byte[] data, bool dates)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> class defined from a sequence of bytes representing an X.509v3 certificate.</summary>
|
|
/// <param name="data">A byte array containing data from an X.509 certificate.</param>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">An error with the certificate occurs. For example:
|
|
///
|
|
/// The certificate file does not exist.
|
|
///
|
|
/// The certificate is invalid.
|
|
///
|
|
/// The certificate's password is incorrect.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="rawData" /> parameter is <see langword="null" />.
|
|
/// -or-
|
|
/// The length of the <paramref name="rawData" /> parameter is 0.</exception>
|
|
// Token: 0x06002412 RID: 9234 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002412")]
|
|
[Address(RVA = "0x2E06CC0", Offset = "0x2E05AC0", VA = "0x182E06CC0")]
|
|
public X509Certificate(byte[] data)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002413 RID: 9235 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002413")]
|
|
[Address(RVA = "0x2E06EB0", Offset = "0x2E05CB0", VA = "0x182E06EB0")]
|
|
internal X509Certificate(X509CertificateImpl impl)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> class using another <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> class.</summary>
|
|
/// <param name="cert">A <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> class from which to initialize this class.</param>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">An error with the certificate occurs. For example:
|
|
///
|
|
/// The certificate file does not exist.
|
|
///
|
|
/// The certificate is invalid.
|
|
///
|
|
/// The certificate's password is incorrect.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The value of the <paramref name="cert" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002414 RID: 9236 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002414")]
|
|
[Address(RVA = "0x2E06D10", Offset = "0x2E05B10", VA = "0x182E06D10")]
|
|
public X509Certificate(X509Certificate cert)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002415 RID: 9237 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002415")]
|
|
[Address(RVA = "0x2E06A60", Offset = "0x2E05860", VA = "0x182E06A60")]
|
|
internal void ImportHandle(X509CertificateImpl impl)
|
|
{
|
|
}
|
|
|
|
// Token: 0x170004FE RID: 1278
|
|
// (get) Token: 0x06002416 RID: 9238 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x170004FE")]
|
|
internal X509CertificateImpl Impl
|
|
{
|
|
[Token(Token = "0x6002416")]
|
|
[Address(RVA = "0x2E07090", Offset = "0x2E05E90", VA = "0x182E07090")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170004FF RID: 1279
|
|
// (get) Token: 0x06002417 RID: 9239 RVA: 0x00015588 File Offset: 0x00013788
|
|
[Token(Token = "0x170004FF")]
|
|
internal bool IsValid
|
|
{
|
|
[Token(Token = "0x6002417")]
|
|
[Address(RVA = "0x2E07100", Offset = "0x2E05F00", VA = "0x182E07100")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Compares two <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> objects for equality.</summary>
|
|
/// <param name="other">An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object to compare to the current object.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object is equal to the object specified by the <paramref name="other" /> parameter; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06002418 RID: 9240 RVA: 0x000155A0 File Offset: 0x000137A0
|
|
[Token(Token = "0x6002418")]
|
|
[Address(RVA = "0x2E06660", Offset = "0x2E05460", VA = "0x182E06660", Slot = "7")]
|
|
public virtual bool Equals(X509Certificate other)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Returns the hash value for the X.509v3 certificate as an array of bytes.</summary>
|
|
/// <returns>The hash value for the X.509 certificate.</returns>
|
|
// Token: 0x06002419 RID: 9241 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002419")]
|
|
[Address(RVA = "0x2E06770", Offset = "0x2E05570", VA = "0x182E06770", Slot = "8")]
|
|
public virtual byte[] GetCertHash()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns the SHA1 hash value for the X.509v3 certificate as a hexadecimal string.</summary>
|
|
/// <returns>The hexadecimal string representation of the X.509 certificate hash value.</returns>
|
|
// Token: 0x0600241A RID: 9242 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600241A")]
|
|
[Address(RVA = "0x2E06740", Offset = "0x2E05540", VA = "0x182E06740", Slot = "9")]
|
|
public virtual string GetCertHashString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns the hash code for the X.509v3 certificate as an integer.</summary>
|
|
/// <returns>The hash code for the X.509 certificate as an integer.</returns>
|
|
// Token: 0x0600241B RID: 9243 RVA: 0x000155B8 File Offset: 0x000137B8
|
|
[Token(Token = "0x600241B")]
|
|
[Address(RVA = "0x2E067F0", Offset = "0x2E055F0", VA = "0x182E067F0", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns the public key for the X.509v3 certificate as an array of bytes.</summary>
|
|
/// <returns>The public key for the X.509 certificate as an array of bytes.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The certificate context is invalid.</exception>
|
|
// Token: 0x0600241C RID: 9244 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600241C")]
|
|
[Address(RVA = "0x2E06850", Offset = "0x2E05650", VA = "0x182E06850", Slot = "10")]
|
|
public virtual byte[] GetPublicKey()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns the raw data for the entire X.509v3 certificate as an array of bytes.</summary>
|
|
/// <returns>A byte array containing the X.509 certificate data.</returns>
|
|
// Token: 0x0600241D RID: 9245 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600241D")]
|
|
[Address(RVA = "0x2E068E0", Offset = "0x2E056E0", VA = "0x182E068E0", Slot = "11")]
|
|
public virtual byte[] GetRawCertData()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns the serial number of the X.509v3 certificate as an array of bytes in little-endian order.</summary>
|
|
/// <returns>The serial number of the X.509 certificate as an array of bytes in little-endian order.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The certificate context is invalid.</exception>
|
|
// Token: 0x0600241E RID: 9246 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600241E")]
|
|
[Address(RVA = "0x2E069D0", Offset = "0x2E057D0", VA = "0x182E069D0", Slot = "12")]
|
|
public virtual byte[] GetSerialNumber()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns the serial number of the X.509v3 certificate as a little-endian hexadecimal string .</summary>
|
|
/// <returns>The serial number of the X.509 certificate as a little-endian hexadecimal string.</returns>
|
|
// Token: 0x0600241F RID: 9247 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600241F")]
|
|
[Address(RVA = "0x2E06970", Offset = "0x2E05770", VA = "0x182E06970", Slot = "13")]
|
|
public virtual string GetSerialNumberString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns a string representation of the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object.</summary>
|
|
/// <returns>A string representation of the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object.</returns>
|
|
// Token: 0x06002420 RID: 9248 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002420")]
|
|
[Address(RVA = "0x2E06C50", Offset = "0x2E05A50", VA = "0x182E06C50", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns a string representation of the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object, with extra information, if specified.</summary>
|
|
/// <param name="fVerbose">
|
|
/// <see langword="true" /> to produce the verbose form of the string representation; otherwise, <see langword="false" />.</param>
|
|
/// <returns>A string representation of the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object.</returns>
|
|
// Token: 0x06002421 RID: 9249 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002421")]
|
|
[Address(RVA = "0x2E06C60", Offset = "0x2E05A60", VA = "0x182E06C60", Slot = "14")]
|
|
public virtual string ToString(bool fVerbose)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> class.</summary>
|
|
// Token: 0x06002422 RID: 9250 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002422")]
|
|
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
|
public X509Certificate()
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> class using a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object and a <see cref="T:System.Runtime.Serialization.StreamingContext" /> structure.</summary>
|
|
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that describes serialization information.</param>
|
|
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> structure that describes how serialization should be performed.</param>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">An error with the certificate occurs. For example:
|
|
///
|
|
/// The certificate file does not exist.
|
|
///
|
|
/// The certificate is invalid.
|
|
///
|
|
/// The certificate's password is incorrect.</exception>
|
|
// Token: 0x06002423 RID: 9251 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002423")]
|
|
[Address(RVA = "0x2E06F40", Offset = "0x2E05D40", VA = "0x182E06F40")]
|
|
public X509Certificate(SerializationInfo info, StreamingContext context)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets the name of the certificate authority that issued the X.509v3 certificate.</summary>
|
|
/// <returns>The name of the certificate authority that issued the X.509v3 certificate.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The certificate handle is invalid.</exception>
|
|
// Token: 0x17000500 RID: 1280
|
|
// (get) Token: 0x06002424 RID: 9252 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000500")]
|
|
public string Issuer
|
|
{
|
|
[Token(Token = "0x6002424")]
|
|
[Address(RVA = "0x2E07120", Offset = "0x2E05F20", VA = "0x182E07120")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the subject distinguished name from the certificate.</summary>
|
|
/// <returns>The subject distinguished name from the certificate.</returns>
|
|
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The certificate handle is invalid.</exception>
|
|
// Token: 0x17000501 RID: 1281
|
|
// (get) Token: 0x06002425 RID: 9253 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000501")]
|
|
public string Subject
|
|
{
|
|
[Token(Token = "0x6002425")]
|
|
[Address(RVA = "0x2E071C0", Offset = "0x2E05FC0", VA = "0x182E071C0")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Compares two <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> objects for equality.</summary>
|
|
/// <param name="obj">An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object to compare to the current object.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object is equal to the object specified by the <paramref name="other" /> parameter; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06002426 RID: 9254 RVA: 0x000155D0 File Offset: 0x000137D0
|
|
[Token(Token = "0x6002426")]
|
|
[Address(RVA = "0x2E065C0", Offset = "0x2E053C0", VA = "0x182E065C0", Slot = "0")]
|
|
[ComVisible(false)]
|
|
public override bool Equals(object obj)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Populates the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object using data from a byte array, a password, and flags for determining how the private key is imported.</summary>
|
|
/// <param name="rawData">A byte array containing data from an X.509 certificate.</param>
|
|
/// <param name="password">The password required to access the X.509 certificate data.</param>
|
|
/// <param name="keyStorageFlags">A bitwise combination of the enumeration values that control where and how to import the certificate.</param>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="rawData" /> parameter is <see langword="null" />.
|
|
/// -or-
|
|
/// The length of the <paramref name="rawData" /> parameter is 0.</exception>
|
|
// Token: 0x06002427 RID: 9255 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002427")]
|
|
[Address(RVA = "0x2E06A90", Offset = "0x2E05890", VA = "0x182E06A90", Slot = "15")]
|
|
[MonoTODO]
|
|
[MonoTODO("missing KeyStorageFlags support")]
|
|
[ComVisible(false)]
|
|
public virtual void Import(byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
|
|
{
|
|
}
|
|
|
|
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.</summary>
|
|
/// <param name="sender">The source of the deserialization event.</param>
|
|
// Token: 0x06002428 RID: 9256 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002428")]
|
|
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080", Slot = "4")]
|
|
void IDeserializationCallback.OnDeserialization(object sender)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets serialization information with all the data needed to recreate an instance of the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object.</summary>
|
|
/// <param name="info">The object to populate with serialization information.</param>
|
|
/// <param name="context">The destination context of the serialization.</param>
|
|
// Token: 0x06002429 RID: 9257 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002429")]
|
|
[Address(RVA = "0x2E06B90", Offset = "0x2E05990", VA = "0x182E06B90", Slot = "5")]
|
|
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
|
|
{
|
|
}
|
|
|
|
/// <summary>Releases all resources used by the current <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> object.</summary>
|
|
// Token: 0x0600242A RID: 9258 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600242A")]
|
|
[Address(RVA = "0x2572990", Offset = "0x2571790", VA = "0x182572990", Slot = "6")]
|
|
public void Dispose()
|
|
{
|
|
}
|
|
|
|
/// <summary>Releases all of the unmanaged resources used by this <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> and optionally releases the managed resources.</summary>
|
|
/// <param name="disposing">
|
|
/// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
|
|
// Token: 0x0600242B RID: 9259 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600242B")]
|
|
[Address(RVA = "0x2E065A0", Offset = "0x2E053A0", VA = "0x182E065A0", Slot = "16")]
|
|
protected virtual void Dispose(bool disposing)
|
|
{
|
|
}
|
|
|
|
/// <summary>Resets the state of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> object.</summary>
|
|
// Token: 0x0600242C RID: 9260 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600242C")]
|
|
[Address(RVA = "0x2E06AF0", Offset = "0x2E058F0", VA = "0x182E06AF0", Slot = "17")]
|
|
[ComVisible(false)]
|
|
public virtual void Reset()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001483 RID: 5251
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4001483")]
|
|
private X509CertificateImpl impl;
|
|
|
|
// Token: 0x04001484 RID: 5252
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4001484")]
|
|
private bool hideDates;
|
|
|
|
// Token: 0x04001485 RID: 5253
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4001485")]
|
|
private string issuer_name;
|
|
|
|
// Token: 0x04001486 RID: 5254
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4001486")]
|
|
private string subject_name;
|
|
}
|
|
}
|