Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/Security/Cryptography/X509Certificates/X509Certificate.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

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: 0x0200044D RID: 1101
[Token(Token = "0x200044D")]
[MonoTODO]
[MonoTODO("X509ContentType.SerializedCert isn't supported (anywhere in the class)")]
[ComVisible(true)]
[Serializable]
public class X509Certificate : IDeserializationCallback, ISerializable, IDisposable
{
// Token: 0x0600261D RID: 9757 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600261D")]
[Address(RVA = "0xD1EB90", Offset = "0xD1DB90", VA = "0x180D1EB90")]
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: 0x0600261E RID: 9758 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600261E")]
[Address(RVA = "0xD1E820", Offset = "0xD1D820", VA = "0x180D1E820")]
public X509Certificate(byte[] data)
{
}
// Token: 0x0600261F RID: 9759 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600261F")]
[Address(RVA = "0xD1EA10", Offset = "0xD1DA10", VA = "0x180D1EA10")]
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: 0x06002620 RID: 9760 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002620")]
[Address(RVA = "0xD1E870", Offset = "0xD1D870", VA = "0x180D1E870")]
public X509Certificate(X509Certificate cert)
{
}
// Token: 0x06002621 RID: 9761 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002621")]
[Address(RVA = "0xD1E5C0", Offset = "0xD1D5C0", VA = "0x180D1E5C0")]
internal void ImportHandle(X509CertificateImpl impl)
{
}
// Token: 0x17000575 RID: 1397
// (get) Token: 0x06002622 RID: 9762 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x17000575")]
internal X509CertificateImpl Impl
{
[Token(Token = "0x6002622")]
[Address(RVA = "0xD1EBF0", Offset = "0xD1DBF0", VA = "0x180D1EBF0")]
get
{
return null;
}
}
// Token: 0x17000576 RID: 1398
// (get) Token: 0x06002623 RID: 9763 RVA: 0x00017958 File Offset: 0x00015B58
[Token(Token = "0x17000576")]
internal bool IsValid
{
[Token(Token = "0x6002623")]
[Address(RVA = "0xD1EC60", Offset = "0xD1DC60", VA = "0x180D1EC60")]
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: 0x06002624 RID: 9764 RVA: 0x00017970 File Offset: 0x00015B70
[Token(Token = "0x6002624")]
[Address(RVA = "0xD1E1C0", Offset = "0xD1D1C0", VA = "0x180D1E1C0", 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: 0x06002625 RID: 9765 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002625")]
[Address(RVA = "0xD1E2D0", Offset = "0xD1D2D0", VA = "0x180D1E2D0", 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: 0x06002626 RID: 9766 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002626")]
[Address(RVA = "0xD1E2A0", Offset = "0xD1D2A0", VA = "0x180D1E2A0", 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: 0x06002627 RID: 9767 RVA: 0x00017988 File Offset: 0x00015B88
[Token(Token = "0x6002627")]
[Address(RVA = "0xD1E350", Offset = "0xD1D350", VA = "0x180D1E350", 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: 0x06002628 RID: 9768 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002628")]
[Address(RVA = "0xD1E3B0", Offset = "0xD1D3B0", VA = "0x180D1E3B0", 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: 0x06002629 RID: 9769 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6002629")]
[Address(RVA = "0xD1E440", Offset = "0xD1D440", VA = "0x180D1E440", 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: 0x0600262A RID: 9770 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600262A")]
[Address(RVA = "0xD1E530", Offset = "0xD1D530", VA = "0x180D1E530", 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: 0x0600262B RID: 9771 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600262B")]
[Address(RVA = "0xD1E4D0", Offset = "0xD1D4D0", VA = "0x180D1E4D0", 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: 0x0600262C RID: 9772 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600262C")]
[Address(RVA = "0xD1E7B0", Offset = "0xD1D7B0", VA = "0x180D1E7B0", 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: 0x0600262D RID: 9773 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600262D")]
[Address(RVA = "0xD1E7C0", Offset = "0xD1D7C0", VA = "0x180D1E7C0", 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: 0x0600262E RID: 9774 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600262E")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
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: 0x0600262F RID: 9775 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600262F")]
[Address(RVA = "0xD1EAA0", Offset = "0xD1DAA0", VA = "0x180D1EAA0")]
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: 0x17000577 RID: 1399
// (get) Token: 0x06002630 RID: 9776 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x17000577")]
public string Issuer
{
[Token(Token = "0x6002630")]
[Address(RVA = "0xD1EC80", Offset = "0xD1DC80", VA = "0x180D1EC80")]
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: 0x17000578 RID: 1400
// (get) Token: 0x06002631 RID: 9777 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x17000578")]
public string Subject
{
[Token(Token = "0x6002631")]
[Address(RVA = "0xD1ED20", Offset = "0xD1DD20", VA = "0x180D1ED20")]
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: 0x06002632 RID: 9778 RVA: 0x000179A0 File Offset: 0x00015BA0
[Token(Token = "0x6002632")]
[Address(RVA = "0xD1E120", Offset = "0xD1D120", VA = "0x180D1E120", 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: 0x06002633 RID: 9779 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002633")]
[Address(RVA = "0xD1E5F0", Offset = "0xD1D5F0", VA = "0x180D1E5F0", 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: 0x06002634 RID: 9780 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002634")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", 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: 0x06002635 RID: 9781 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002635")]
[Address(RVA = "0xD1E6F0", Offset = "0xD1D6F0", VA = "0x180D1E6F0", 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: 0x06002636 RID: 9782 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002636")]
[Address(RVA = "0xB2C230", Offset = "0xB2B230", VA = "0x180B2C230", 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: 0x06002637 RID: 9783 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002637")]
[Address(RVA = "0xD1E100", Offset = "0xD1D100", VA = "0x180D1E100", 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: 0x06002638 RID: 9784 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002638")]
[Address(RVA = "0xD1E650", Offset = "0xD1D650", VA = "0x180D1E650", Slot = "17")]
[ComVisible(false)]
public virtual void Reset()
{
}
// Token: 0x04001546 RID: 5446
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4001546")]
private X509CertificateImpl impl;
// Token: 0x04001547 RID: 5447
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4001547")]
private bool hideDates;
// Token: 0x04001548 RID: 5448
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4001548")]
private string issuer_name;
// Token: 0x04001549 RID: 5449
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4001549")]
private string subject_name;
}
}