CertificateQuery CertificateQuery CertificateQuery CertificateQuery Class

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

Syntax

Declaration

public sealed class CertificateQuerypublic sealed class CertificateQueryPublic NotInheritable Class CertificateQuerypublic sealed class CertificateQuery

Constructors summary

Creates a new instance of a certificate query.

Properties summary

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

Gets or sets the certificate friendly name to search for.

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

Gets or sets whether to include duplicates.

Gets or sets whether to include expired certificates.

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

Gets or sets the store name.

Gets or sets a certificate thumbprint to search for.

Constructors

  • CertificateQuery()
    CertificateQuery()
    CertificateQuery()
    CertificateQuery()

    Creates a new instance of a certificate query.

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

Properties

  • EnhancedKeyUsages
    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>public IVector<string> EnhancedKeyUsages { get; }

    Property Value

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

    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
    FriendlyName

    Gets or sets the certificate friendly name to search for.

    public string FriendlyName { get; set; }public string FriendlyName { get; set; }Public ReadWrite Property FriendlyName As stringpublic string FriendlyName { get; set; }

    Property Value

    • string
      string
      string
      string

      The certificate friendly name to search for.

  • HardwareOnly
    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 bool HardwareOnly { get; set; }public bool HardwareOnly { get; set; }Public ReadWrite Property HardwareOnly As boolpublic bool HardwareOnly { get; set; }

    Property Value

    • bool
      bool
      bool
      bool

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

  • IncludeDuplicates
    IncludeDuplicates
    IncludeDuplicates
    IncludeDuplicates

    Gets or sets whether to include duplicates.

    public bool IncludeDuplicates { get; set; }public bool IncludeDuplicates { get; set; }Public ReadWrite Property IncludeDuplicates As boolpublic bool IncludeDuplicates { get; set; }

    Property Value

    • bool
      bool
      bool
      bool

      True if duplicates are included; otherwise, false.

  • IncludeExpiredCertificates
    IncludeExpiredCertificates
    IncludeExpiredCertificates
    IncludeExpiredCertificates

    Gets or sets whether to include expired certificates.

    public bool IncludeExpiredCertificates { get; set; }public bool IncludeExpiredCertificates { get; set; }Public ReadWrite Property IncludeExpiredCertificates As boolpublic bool IncludeExpiredCertificates { get; set; }

    Property Value

    • bool
      bool
      bool
      bool

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

  • IssuerName
    IssuerName
    IssuerName
    IssuerName

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

    public string IssuerName { get; set; }public string IssuerName { get; set; }Public ReadWrite Property IssuerName As stringpublic string IssuerName { get; set; }

    Property Value

    • string
      string
      string
      string

      The name of the certificate issuer to search for.

  • StoreName
    StoreName
    StoreName
    StoreName

    Gets or sets the store name.

    public string StoreName { get; set; }public string StoreName { get; set; }Public ReadWrite Property StoreName As stringpublic string StoreName { get; set; }

    Property Value

    • string
      string
      string
      string

      The store name.

  • Thumbprint
    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[]public byte[] Thumbprint { get; set; }

    Property Value

    • byte[]
      byte[]
      byte[]
      byte[]

      A certificate thumbprint to search for.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Security.Cryptography.Certificates.dll