Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CertificateStores.FindAllAsync Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
FindAllAsync()

Get all certificates from the certificate stores.

FindAllAsync(CertificateQuery)

Get all certificates from the certificate stores that match the specified query parameters.

FindAllAsync()

Get all certificates from the certificate stores.

public:
 static IAsyncOperation<IVectorView<Certificate ^> ^> ^ FindAllAsync();
/// [Windows.Foundation.Metadata.Overload("FindAllAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IVectorView<Certificate>> FindAllAsync();
[Windows.Foundation.Metadata.Overload("FindAllAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyList<Certificate>> FindAllAsync();
function findAllAsync()
Public Shared Function FindAllAsync () As IAsyncOperation(Of IReadOnlyList(Of Certificate))

Returns

An asynchronous operation to retrieve the list of certificates.

Attributes

Examples

The follow example enumerates certificates in an App store and adds them to the User store.

public static void AddAppSmartCardCertIntoUserStore()
{
 // Retrieve certificates in App store.
 var certs = await CertificateStores.FindAllAsync();
 // open user Personal store
 UserCertificateStore store = CertificateStores.GetUserStoreByName(StandardCertificateStoreNames.Personal);
 foreach (Certificate cert in certs)
 {
 if (cert.KeyStoreageProviderName == KeyStorageProviderNames.SmartcardKeyStorageProvider &&
 !cert.IsPerUser)
 {
 var added = await store.RequestAddAsync(cert);
 if (!added) break;
 }
 }
}

Remarks

The FindAllAsync method filters the resulting list of certificates and removes duplicates, showing only the most recent certificate when duplicates are found. This only occurs if the app is running in an app container. Duplicate certificates are certificates that have the same subject and issuer.

Expired certificates are not returned in the list of certificates.

See also

Applies to

FindAllAsync(CertificateQuery)

Get all certificates from the certificate stores that match the specified query parameters.

public:
 static IAsyncOperation<IVectorView<Certificate ^> ^> ^ FindAllAsync(CertificateQuery ^ query);
/// [Windows.Foundation.Metadata.Overload("FindAllWithQueryAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IVectorView<Certificate>> FindAllAsync(CertificateQuery const& query);
[Windows.Foundation.Metadata.Overload("FindAllWithQueryAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyList<Certificate>> FindAllAsync(CertificateQuery query);
function findAllAsync(query)
Public Shared Function FindAllAsync (query As CertificateQuery) As IAsyncOperation(Of IReadOnlyList(Of Certificate))

Parameters

query
CertificateQuery

The certificate values to search for.

Returns

An asynchronous operation to retrieve the list of certificates.

Attributes

Remarks

The FindAllAsync method filters the resulting list of certificates and removes duplicates, showing only the most recent certificate when duplicates are found. This only occurs if the app is running in an app container. Duplicate certificates are certificates that have the same subject and issuer.

Expired certificates are not returned in the list of certificates.

See also

Applies to


Feedback

Was this page helpful?