This section explains how to list keys in all the keystores.
Use the CUnifiedKeyStore::List() function to list the keys in all of the keystores.
The following steps explain the process of listing keys:
The List() function returns all the keys from all the keystores.
The following code snippet shows how to set a file system session object, initialise keystore and member functions, and list keys.
//Create a file system session object RFs iFs; CleanupClosePushL(&iFs); //Initialise the keystore and member functions CUnifiedKeyStore* keyStore = CUnifiedKeyStore::NewL(fs); keyStore->Initialize(iStatus); //iStatus is a TRequestStatus object ... //List the keys in the keystores RPointerArray<CCTKeyInfo> iKeys; // This variable will contain the result after the completion of the list operation TCTKeyAttributeFilter filter.iUsage = EPKCS15UsageAll; keyStore->List(iKeys, filter, iStatus); //Clean up CleanupStack::PopAndDestroy(); // iFs