Certificate Class

Definition

Represents a cryptography certificate.

public ref class Certificate sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Security.Cryptography.Certificates.ICertificateFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class Certificate final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Security.Cryptography.Certificates.ICertificateFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class Certificate final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Security.Cryptography.Certificates.ICertificateFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class Certificate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Security.Cryptography.Certificates.ICertificateFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class Certificate
function Certificate(certBlob)
Public NotInheritable Class Certificate
Inheritance
Object Platform::Object IInspectable Certificate
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Version history

Windows version SDK version Value added
1607 14393 IsPerUser
1607 14393 KeyStorageProviderName
1607 14393 StoreName

Constructors

Certificate(IBuffer)

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

Properties

EnhancedKeyUsages

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

FriendlyName

Gets or sets the friendly name for the certificate.

HasPrivateKey

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

IsPerUser

Gets whether the certificate is per-user.

IsSecurityDeviceBound

Gets whether the security device is bound.

IsStronglyProtected

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

Issuer

Gets the Common Name (CN) of the certificate issuer.

KeyAlgorithmName

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

KeyStorageProviderName

Gets the certificate's key storage provider name.

KeyUsages

Gets the key uses for the certificate.

SerialNumber

Gets the serial number of the certificate.

SignatureAlgorithmName

Gets the signature algorithm name.

SignatureHashAlgorithmName

Gets the signature hash algorithm name.

StoreName

Gets the certificate's store name.

Subject

Gets the subject name of the certificate.

SubjectAlternativeName

Gets info on the subject alternative name.

ValidFrom

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

ValidTo

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

Methods

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.

BuildChainAsync(IIterable<Certificate>)

Build a certificate chain for the specified certificates starting from the end entity certificate to the root.

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.

Applies to