Certificate​Query Certificate​Query Certificate​Query Class

Definition

Represents parameters for a query for certificates from the certificate store for an app.

public sealed class CertificateQuery : ICertificateQuery, ICertificateQuery2public sealed class CertificateQuery : ICertificateQuery, ICertificateQuery2Public NotInheritable Class CertificateQuery Implements ICertificateQuery, ICertificateQuery2
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

CertificateQuery() CertificateQuery() CertificateQuery()

Creates a new instance of a certificate query.

public CertificateQuery()public CertificateQuery()Public Sub New()
Attributes

Properties

EnhancedKeyUsages EnhancedKeyUsages EnhancedKeyUsages

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

public IVector<string> EnhancedKeyUsages { get; }public IVector<string> EnhancedKeyUsages { get; }Public ReadOnly Property EnhancedKeyUsages As IVector<string>
Value

A collection of object identifiers (OIDs) for the enhanced key usage extension to search for.

Attributes

Remarks

Examples

var query = new Windows.Security.Cryptography.Certificates.CertificateQuery();
query.issuerName = "Consoto Bank Issuing CA";
var enhancedKeyUsages = query.enhancedKeyUsages;
enhancedKeyUsage[0] = "1.3.6.1.5.5.7.3.2"; // client auth
var certificates;
Windows.Security.Cryptography.Certificates.
    CertificateStores.findAllAsync(query).done(function(queriedCertificates)
{
    certificates = queriedCertificates;
}, 
function(e) 
{
    WinJS.log("FindAllAsync failed, error:" + e.number + e.message);
});

FriendlyName FriendlyName FriendlyName

Gets or sets the certificate friendly name to search for.

public PlatForm::String FriendlyName { get; set; }public string FriendlyName { get; set; }Public ReadWrite Property FriendlyName As string
Value
string string string

The certificate friendly name to search for.

Attributes

HardwareOnly HardwareOnly HardwareOnly

Gets or sets a value that indicates whether only hardware certificates (SC or TPM) are to be returned from the query.

public PlatForm::Boolean HardwareOnly { get; set; }public bool HardwareOnly { get; set; }Public ReadWrite Property HardwareOnly As bool
Value
bool bool bool

True if only hardware certificates (SC or TPM) are to be returned from the query; otherwise false.

Attributes

IncludeDuplicates IncludeDuplicates IncludeDuplicates

Gets or sets whether to include duplicates.

public PlatForm::Boolean IncludeDuplicates { get; set; }public bool IncludeDuplicates { get; set; }Public ReadWrite Property IncludeDuplicates As bool
Value
bool bool bool

True if duplicates are included; otherwise, false.

Attributes

IncludeExpiredCertificates IncludeExpiredCertificates IncludeExpiredCertificates

Gets or sets whether to include expired certificates.

public PlatForm::Boolean IncludeExpiredCertificates { get; set; }public bool IncludeExpiredCertificates { get; set; }Public ReadWrite Property IncludeExpiredCertificates As bool
Value
bool bool bool

True if expired certificates should be included; otherwise, false.

Attributes

IssuerName IssuerName IssuerName

Gets or sets the name of the certificate issuer to search for.

public PlatForm::String IssuerName { get; set; }public string IssuerName { get; set; }Public ReadWrite Property IssuerName As string
Value
string string string

The name of the certificate issuer to search for.

Attributes

StoreName StoreName StoreName

Gets or sets the store name.

public PlatForm::String StoreName { get; set; }public string StoreName { get; set; }Public ReadWrite Property StoreName As string
Value
string string string

The store name.

Attributes

Thumbprint Thumbprint Thumbprint

Gets or sets a certificate thumbprint to search for.

public byte[] Thumbprint { get; set; }public byte[] Thumbprint { get; set; }Public ReadWrite Property Thumbprint As byte[]
Value
byte[] byte[] byte[]

A certificate thumbprint to search for.

Attributes