X509Certificate2 Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents an X.509 certificate.

Inheritance Hierarchy

System. . :: . .Object
  System.Security.Cryptography.X509Certificates. . :: . .X509Certificate
    System.Security.Cryptography.X509Certificates..::..X509Certificate2

Namespace:  System.Security.Cryptography.X509Certificates
Assembly:  System.Security (in System.Security.dll)

Syntax

'Declaration
Public Class X509Certificate2 _
    Inherits X509Certificate
public class X509Certificate2 : X509Certificate
public ref class X509Certificate2 : public X509Certificate
type X509Certificate2 =  
    class
        inherit X509Certificate
    end
public class X509Certificate2 extends X509Certificate

The X509Certificate2 type exposes the following members.

Constructors

  Name Description
Public method X509Certificate2(Session, array<CryptokiAttribute> [] () [] []) Initializes a new instance of the X509Certificate2 class with the specified session and template.
Public method X509Certificate2(Session, array<Byte> [] () [] [], String) Initializes a new instance of the X509Certificate2 class with specified session, data and password.

Top

Properties

  Name Description
Public property HasPrivateKey Gets a value that indicates whether an X509Certificate2 object contains a private key.
Public property Issuer Gets the name of the certificate authority that issued the X.509v3 certificate. (Overrides X509Certificate. . :: . .Issuer.)
Public property KeyType Gets the KeyType (RSA, DSA, etc.) associated with a certificate.
Public property NotAfter Gets the date in local time after which a certificate is no longer valid.
Public property NotBefore Gets the date in local time on which a certificate becomes valid.
Public property PrivateKey Gets or sets the AsymmetricAlgorithm object that represents the private key associated with a certificate.
Public property PublicKey Gets a PublicKey object associated with a certificate.
Public property RawData Gets the raw data of a certificate.
Public property SerialNumber Gets the serial number of a certificate.
Public property SignatureAlgorithm Gets the algorithm used to create the signature of a certificate.
Public property Subject Gets the subject distinguished name from the certificate. (Overrides X509Certificate. . :: . .Subject.)
Public property Thumbprint Gets the thumbprint of a certificate.

Top

Methods

  Name Description
Protected method CreateHexString Creates a hexamdecimal string.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method Equals(X509Certificate2) Compares two X509Certificate2 objects for equality.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetCertHash Returns the hash value for the X.509v3 certificate as an array of bytes.
Public method GetCertHashString Returns the SHA1 hash value for the X.509v3 certificate as a hexadecimal string.
Public method GetEffectiveDate Retrieves the effective date of the certificate. (Inherited from X509Certificate.)
Public method GetEffectiveDateString Returns the effective date of this X.509v3 certificate.
Public method GetExpirationDate Retrieves the expiration date of the certificate. (Inherited from X509Certificate.)
Public method GetExpirationDateString Returns the expiration date of this X.509v3 certificate.
Public method GetHashCode Returns the hash code for the X.509v3 certificate as an integer. (Overrides Object. . :: . .GetHashCode() () () ().)
Public method GetRawCertData Returns the raw data for the entire X.509v3 certificate. (Overrides X509Certificate. . :: . .GetRawCertData() () () ().)
Public method GetSerialNumber Returns the serial number of the X.509v3 certificate.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString() () () () Displays an X.509 certificate in text format. (Overrides Object. . :: . .ToString() () () ().)
Public method ToString(Boolean) Displays an X.509 certificate in text format.
Public method Verify Performs a X.509 chain validation using basic validation policy.

Top

Fields

  Name Description
Protected field m_effectiveDate Contains the effective date of the certificate. (Inherited from X509Certificate.)
Protected field m_expirationDate Contains the expiration date of the certificate. (Inherited from X509Certificate.)
Protected field m_handle Contains the handle. (Inherited from X509Certificate.)
Protected field m_issuer Contains the certificate issuer. (Inherited from X509Certificate.)
Protected field m_sessionHandle Contains the session handle. (Inherited from X509Certificate.)
Protected field m_subject Contains the subject. (Inherited from X509Certificate.)

Top

Remarks

The X.509 structure originated in the International Organization for Standardization (ISO) working groups. This structure can be used to represent various types of information including identity, entitlement, and holder attributes (permissions, age, sex, location, affiliation, and so forth). Although the ISO specifications are most informative on the structure itself, the X509Certificate2 class is designed to model the usage scenarios defined in specifications issued by the Internet Engineering Task Force (IETF) Public Key Infrastructure, X.509 (PKIX) working group. The most informative of these specifications is RFC 3280, "Certificate and Certificate Revocation List (CRL) Profile."

Topic Location
How to: Encrypt XML Elements with X.509 Certificates .NET Framework: Security
How to: Decrypt XML Elements with X.509 Certificates .NET Framework: Security
How to: Encrypt XML Elements with X.509 Certificates .NET Framework: Security
How to: Decrypt XML Elements with X.509 Certificates .NET Framework: Security
How to: Encrypt XML Elements with X.509 Certificates .NET Framework: Security
How to: Decrypt XML Elements with X.509 Certificates .NET Framework: Security

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Security.Cryptography.X509Certificates Namespace