CertificateQuery
CertificateQuery
CertificateQuery
CertificateQuery
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// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
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 IList<string> EnhancedKeyUsages { get; }Public ReadOnly Property EnhancedKeyUsages As IList<string>// You can use this property in JavaScript.
- Value
- IVector<PlatForm::String> IList<string> IList<string> IList<string>
A collection of object identifiers (OIDs) for the enhanced key usage extension to search for.
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 : PlatForm::String FriendlyName { get; set; }public string FriendlyName { get; set; }Public ReadWrite Property FriendlyName As string// You can use this property in JavaScript.
- Value
- PlatForm::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 : PlatForm::Boolean HardwareOnly { get; set; }public bool HardwareOnly { get; set; }Public ReadWrite Property HardwareOnly As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean 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 : PlatForm::Boolean IncludeDuplicates { get; set; }public bool IncludeDuplicates { get; set; }Public ReadWrite Property IncludeDuplicates As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if duplicates are included; otherwise, false.
IncludeExpiredCertificates 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// You can use this property in JavaScript.
- Value
- PlatForm::Boolean 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 : PlatForm::String IssuerName { get; set; }public string IssuerName { get; set; }Public ReadWrite Property IssuerName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The name of the certificate issuer to search for.
StoreName 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// You can use this property in JavaScript.
- Value
- PlatForm::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[]// You can use this property in JavaScript.
- Value
- byte[] byte[] byte[] byte[]
A certificate thumbprint to search for.