Certificate class

Applies to Windows and Windows Phone

Represents a cryptography certificate.

Syntax


var certificate = new Windows.Security.Cryptography.Certificates.Certificate();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The Certificate class has these types of members:

Constructors

The Certificate class has these constructors.

ConstructorDescription
Certificate Create a new instance of the Certificate class using the specified certificate data.

 

Methods

The Certificate class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
BuildChainAsync(IIterable(Certificate)) Build a certificate chain for the specified certificates starting from the end entity certificate to the root .
BuildChainAsync(IIterable(Certificate), ChainBuildingParameters) Build a certificate chain for the specified certificates starting from the end entity certificate to the root using the specified chain building parameters.
GetCertificateBlob Gets the ASN.1 DER encoded certificate blob.
GetHashValue() Gets the SHA1 hash value for the certificate.
GetHashValue(String) Gets the hash value for the certificate for a specified algorithm.

 

Properties

The Certificate class has these properties.

PropertyAccess typeDescription

EnhancedKeyUsages

Read-onlyGets a collection of object identifiers (OIDs) for the enhanced key usage extension.

FriendlyName

Read/writeGets or sets the friendly name for the certificate.

HasPrivateKey

Read-onlyGets a value indicating whether the certificate has a private key.

IsStronglyProtected

Read-onlyGets a value that indicates whether the private key associated with the certificate is strongly protected.

Issuer

Read-onlyGets the name of the certificate issuer.

SerialNumber

Read-onlyGets the serial number of the certificate.

Subject

Read-onlyGets the subject name of the certificate.

ValidFrom

Read-onlyGets the date and time after which the certificate is valid.

ValidTo

Read-onlyGets the date and time after which the certificate is no longer valid.

 

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.winmd

See also

Object

 

 

Show:
© 2014 Microsoft