Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: certstore.h
Link against: certstore.lib

Class CCertStore

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

CBaseBase class for all classes to be instantiated on the heap
CCertStoreInterface 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


AddClientL()

virtual void AddClientL(const TCertManClientInfo& aClient) = 0;

Description

Registers a new client with the certificate store.

Parameters

const TCertManClientInfo& aClient

The new client.


RemoveClientL()

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.


ClientsL()

virtual CArrayFixFlat<TCertManClientInfo>* ClientsL() const = 0;

Description

Gets a list of registered clients.

Return value

CArrayFixFlat<TCertManClientInfo>*

The client.

Notes:


StoreCount()

virtual TInt StoreCount() const = 0;

Description

Gets the number of certificate stores.

Return value

TInt

The number of certificate stores.


StoreInfo()

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

TCertStoreInfo

Information about the specified certificate store.


AddL()

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.


RemoveL()

virtual void RemoveL(const CCertStoreEntry& aEntry) = 0;

Description

Deletes the specified certificate store entry.

Parameters

const CCertStoreEntry& aEntry

The certificate store entry.


UpdateL()

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

const CCertStoreEntry& aEntry

The certificate store entry to be replaced.


LoadL()

virtual void LoadL(CCertificate& aCert, const CCertStoreEntry& aEntry) const = 0;

Description

Loads the certificate store entry.

Parameters

CCertificate& aCert

The certificate store.

const CCertStoreEntry& aEntry

The certificate store entry.


EntriesL()

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.


EntriesL()

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.


ClientAlreadyPresentL()

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.