Class X509Certificate
Provides methods that help you use X.509 v.3 certificates.
Inherited Members
Namespace: System.Security.Cryptography.X509Certificates
Assembly: System.Net.dll
Syntax
public class X509Certificate
Remarks
Supported formats: DER and PEM.
Constructors
| Improve this Doc View SourceX509Certificate()
Initializes a new instance of the X509Certificate class.
Declaration
public X509Certificate()
X509Certificate(Byte[])
Initializes a new instance of the X509Certificate class defined from a sequence of bytes representing an X.509v3 certificate.
Declaration
public X509Certificate(byte[] certificate)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | certificate | 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.
Declaration
public X509Certificate(string certificate)
Parameters
Type | Name | Description |
---|---|---|
String | certificate | 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
| Improve this Doc View Source_effectiveDate
Contains the effective date of the certificate.
Declaration
protected DateTime _effectiveDate
Field Value
Type | Description |
---|---|
DateTime |
_expirationDate
Contains the expiration date of the certificate.
Declaration
protected DateTime _expirationDate
Field Value
Type | Description |
---|---|
DateTime |
_handle
Contains the handle.
Declaration
protected byte[] _handle
Field Value
Type | Description |
---|---|
Byte[] |
_issuer
Contains the certificate issuer.
Declaration
protected string _issuer
Field Value
Type | Description |
---|---|
String |
_sessionHandle
Contains the session handle.
Declaration
protected byte[] _sessionHandle
Field Value
Type | Description |
---|---|
Byte[] |
_subject
Contains the subject.
Declaration
protected string _subject
Field Value
Type | Description |
---|---|
String |
Properties
| Improve this Doc View SourceIssuer
Gets the name of the certificate authority that issued the X.509v3 certificate.
Declaration
public virtual string Issuer { get; }
Property Value
Type | Description |
---|---|
String | The name of the certificate authority that issued the X.509v3 certificate. |
Subject
Gets the subject distinguished name from the certificate.
Declaration
public virtual string Subject { get; }
Property Value
Type | Description |
---|---|
String | The subject distinguished name from the certificate. |
Methods
| Improve this Doc View SourceGetEffectiveDate()
Returns the effective date of this X.509v3 certificate.
Declaration
public virtual DateTime GetEffectiveDate()
Returns
Type | Description |
---|---|
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.
Declaration
public virtual DateTime GetExpirationDate()
Returns
Type | Description |
---|---|
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.
Declaration
public virtual byte[] GetRawCertData()
Returns
Type | Description |
---|---|
Byte[] | A byte array containing the X.509 certificate data. |