diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-6A770434-EF8A-5ECC-BB74-2E7FC4A9E360.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-6A770434-EF8A-5ECC-BB74-2E7FC4A9E360.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,56 @@ + + + + + + Listing +KeysThis 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:

+ + +Create a file system session using an RFs object. + + +Create an object of type CUnifiedKeyStore using CUnifiedKeyStore::NewL() or CUnifiedKeyStore::NewLC(). + + +Initialise the member functions and keystore using the asynchronous +function CUnifiedKeyStore::Initialize(). + + +Use the CUnifiedKeyStore::List() function to list +the keys in the keystores. + + +

The List() function returns all the keys from +all the keystores.

+Example

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
+
\ No newline at end of file