»
Developer Library »
API Reference »
C++ API reference »
Certificate Manager »
CCertStore
Location:
certstore.h
Link against: certstore.lib
CCertStore
Support
Supported from 6.0
Description
Interface to locally stored certificates.
It enables client code to add and remove certificates, load
certificates and edit their trust settings.
Derivation
CBase | Base class for all classes to be instantiated on the heap |
CCertStore | Interface to locally stored certificates |
|
Defined in CCertStore:
AddClientL(), AddL(), ClientAlreadyPresentL(), ClientsL(), EntriesL(), EntriesL(), LoadL(), RemoveClientL(), RemoveL(), StoreCount(), StoreInfo(), UpdateL()
Inherited from CBase:
operator new()
Member functions
virtual void AddClientL(const TCertManClientInfo& aClient) = 0;
Description
Registers a new client with the certificate store.
Parameters
virtual void RemoveClientL(const TUid& aUid) = 0;
Description
Removes an existing client from the cerificate store.
Parameters
const
TUid& aUid |
The invalid Uid. |
|
Leave codes
KErrNotFound |
If the client doesn't exist. |
|
virtual CArrayFixFlat<TCertManClientInfo>* ClientsL() const = 0;
Description
Gets a list of registered clients.
Return value
Notes:
- The caller of this function becomes the owner of
the array, and is responsible for its destruction.
virtual TInt StoreCount() const = 0;
Description
Gets the number of certificate stores.
Return value
TInt |
The number of certificate stores. |
|
virtual TCertStoreInfo StoreInfo(TInt aIndex) const = 0;
Description
Gets information about the specified certificate store.
Parameters
TInt aIndex |
An ordinal number that identifies the certificate store. |
|
Return value
virtual void AddL(const CCertificate& aCert, const CArrayFix<TUid>& aTrusters, TCertType aType, TInt aStore) = 0;
Description
Adds a new certificate and a list of applications which trust
it.
Parameters
const
CCertificate& aCert |
The certificate. |
const
CArrayFix<TUid>& aTrusters |
The Uids of the applications that trust the specified
certificate. |
const
TCertType aType |
The certificate type. |
const
TInt aStore |
The ordinal number that identifies the cerificate store. |
|
virtual void RemoveL(const CCertStoreEntry& aEntry) = 0;
Description
Deletes the specified certificate store entry.
Parameters
virtual void UpdateL(const CCertStoreEntry& aEntry) = 0;
Description
Updates the specified certificate store entry.
The function allows clients to edit an entry and replace
it.
Parameters
virtual void LoadL(CCertificate& aCert, const CCertStoreEntry& aEntry) const = 0;
Description
Loads the certificate store entry.
Parameters
virtual CArrayPtrFlat<CCertStoreEntry>* EntriesL(TCertType aType, TCertStoreCapabilities aPrefs) const = 0;
Description
Gets a list of all certificate store entries selected according
to the specified certificate store type and the specified minimum store
protection.
Parameters
TCertType aType |
The type of certificate store. |
TCertStoreCapabilities aPrefs |
Specifies the minimum store protection required by the client.
Only stores meeting these criteria will be searched. |
|
Return value
CArrayPtrFlat<CCertStoreEntry>* |
A pointer to an array of certificate store entries. The caller
has ownership of this array object. |
|
virtual CArrayPtrFlat<CCertStoreEntry>* EntriesL(const CArrayFix<TUid>& aTrusters, TCertType aType, TCertStoreCapabilities aPrefs) const = 0;
Description
Gets a list of all certificate store entries selected according
to the specified certificate store type, the specified minimum store
protection, and which are trusted by the applications with the specified
Uids.
Parameters
constCArrayFix<TUid>&
aTrusters |
The Uids of applications. |
TCertType aType |
The type of certificate store. |
TCertStoreCapabilities aPrefs |
Specifies the minimum store protection required by the client:
only stores meeting these criteria will be searched. |
|
Return value
CArrayPtrFlat<CCertStoreEntry>* |
Certificate entries whose certificates are trusted by one or
more of the trusters specified in the aTrusters parameter. |
|
virtual TBool ClientAlreadyPresentL(const TUid& aTruster) const = 0;
Description
Tests whether the specified client is already registered with
the certificate store.
Parameters
const
TUid& aTruster |
The UID identifying the client. |
|
Return value
TBool |
True, if the client is already registered; false,
otherwise. |
|