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
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.