Skip to main content
Certificate class

Represents a cryptography certificate.

Syntax


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

public sealed class Certificate

Public NotInheritable Class Certificate

public ref class Certificate sealed 

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-only

Gets a collection of object identifiers (OIDs) for the enhanced key usage extension.

FriendlyName

Read/write

Gets or sets the friendly name for the certificate.

HasPrivateKey

Read-only

Gets a value indicating whether the certificate has a private key.

IsPerUser

Read-only

Gets whether the certificate is per-user.

IsSecurityDeviceBound

Read-only

Gets whether the security device is bound.

IsStronglyProtected

Read-only

Gets a value that indicates whether the private key associated with the certificate is strongly protected.

Issuer

Read-only

Gets the name of the certificate issuer.

KeyAlgorithmName

Read-only

Gets the name of the cryptographic algorithm used to create the key.

KeyStorageProviderName

Read-only

Gets the certificate's key storage provider name.

KeyUsages

Read-only

Gets the key uses for the certificate.

SerialNumber

Read-only

Gets the serial number of the certificate.

SignatureAlgorithmName

Read-only

Gets the signature algorithm name.

SignatureHashAlgorithmName

Read-only

Gets the signature hash algorithm name.

StoreName

Read-only

Gets the certificate's store name.

Subject

Read-only

Gets the subject name of the certificate.

SubjectAlternativeName

Read-only

Gets info on the subject alternative name.

ValidFrom

Read-only

Gets the date and time after which the certificate is valid.

ValidTo

Read-only

Gets the date and time after which the certificate is no longer valid.

 

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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

Attributes

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

See also

Object