Table of Contents

Class X509Certificate

Namespace
System.Security.Cryptography.X509Certificates
Assembly
System.Net.dll

Provides methods that help you use X.509 v.3 certificates.

public class X509Certificate
Inheritance
X509Certificate
Derived
Inherited Members
Extension Methods

Remarks

Supported formats: DER and PEM.

Constructors

X509Certificate()

Initializes a new instance of the X509Certificate class.

public X509Certificate()

X509Certificate(byte[])

Initializes a new instance of the X509Certificate class defined from a sequence of bytes representing an X.509v3 certificate.

public X509Certificate(byte[] certificate)

Parameters

certificate byte[]

A byte array containing data from an X.509 certificate.

Remarks

DER and PEM encoding are the supported formats.

X509Certificate(string)

Initializes a new instance of the X509Certificate class defined from a string with the content of an X.509v3 certificate.

public X509Certificate(string certificate)

Parameters

certificate string

A string containing a X.509 certificate.

Remarks

Supported formats: DER and PEM. This methods is exclusive of .NET nanoFramework. The equivalent .NET constructor accepts a file name as the parameter.

Fields

_effectiveDate

Contains the effective date of the certificate.

protected DateTime _effectiveDate

Field Value

DateTime

_expirationDate

Contains the expiration date of the certificate.

protected DateTime _expirationDate

Field Value

DateTime

_handle

Contains the handle.

protected byte[] _handle

Field Value

byte[]

_issuer

Contains the certificate issuer.

protected string _issuer

Field Value

string

_sessionHandle

Contains the session handle.

protected byte[] _sessionHandle

Field Value

byte[]

_subject

Contains the subject.

protected string _subject

Field Value

string

Properties

Issuer

Gets the name of the certificate authority that issued the X.509v3 certificate.

public virtual string Issuer { get; }

Property Value

string

The name of the certificate authority that issued the X.509v3 certificate.

Subject

Gets the subject distinguished name from the certificate.

public virtual string Subject { get; }

Property Value

string

The subject distinguished name from the certificate.

Methods

GetEffectiveDate()

Returns the effective date of this X.509v3 certificate.

public virtual DateTime GetEffectiveDate()

Returns

DateTime

The effective date for this X.509 certificate.

Remarks

This methods is exclusive of nanoFramework. The equivalent .NET method is GetEffectiveDateString().

GetExpirationDate()

Returns the expiration date of this X.509v3 certificate.

public virtual DateTime GetExpirationDate()

Returns

DateTime

The expiration date for this X.509 certificate.

Remarks

This methods is exclusive of nanoFramework. The equivalent .NET method is GetExpirationDateString().

GetRawCertData()

Returns the raw data for the entire X.509v3 certificate as an array of bytes.

public virtual byte[] GetRawCertData()

Returns

byte[]

A byte array containing the X.509 certificate data.