Location:
unifiedcertstore.h
Link against: certstore.lib
class CUnifiedCertStore : public CActive, public MCertStore;
The unified certificate store.
This class provides a certificate store whose contents are the sum of the contents of all certificate store implementations on the device. It is intended as the single point of access for clients wishing to use certificate stores.
Since this class is intended for widespread use, capability checks relating to certificate access are documented here even though the checks are actually made in the individual cert store implementations.
MCertStore
- No description.
CBase
- Base class for all classes to be instantiated on the heap
CActive
- The core class of the active object abstraction
CUnifiedCertStore
- The unified certificate store
Defined in CUnifiedCertStore
:
Applications()
, CancelApplications()
, CancelGetCert()
, CancelInitialize()
, CancelIsApplicable()
, CancelList()
, CancelRemove()
, CancelRetrieve()
, CancelSetApplicability()
, CancelSetTrust()
, CancelTrusted()
, CertStore()
, CertStoreCount()
, DoCancel()
, GetCert()
, Initialize()
, IsApplicable()
, List()
, List()
, List()
, NewL()
, NewL()
, NewLC()
, NewLC()
, ReadOnlyCertStore()
, ReadOnlyCertStoreCount()
, Remove()
, Retrieve()
, Retrieve()
, RunError()
, RunL()
, SetApplicability()
, SetTrust()
, Trusted()
, WritableCertStore()
, WritableCertStoreCount()
, ~CUnifiedCertStore()
Inherited from CActive
:
Cancel()
,
Deque()
,
EPriorityHigh
,
EPriorityIdle
,
EPriorityLow
,
EPriorityStandard
,
EPriorityUserInput
,
Extension_()
,
IsActive()
,
IsAdded()
,
Priority()
,
SetActive()
,
SetPriority()
,
TPriority
,
iStatus
Inherited from CBase
:
Delete()
,
operator new()
static IMPORT_C CUnifiedCertStore *NewL(RFs &aFs, TBool aOpenForWrite);
Creates a new CUnifiedCertStore
|
|
static IMPORT_C CUnifiedCertStore *NewLC(RFs &aFs, TBool aOpenForWrite);
Creates a new CUnifiedCertStore and pushes it on the cleanup stack.
|
|
static IMPORT_C CUnifiedCertStore *NewL(RFs &aFs, TBool aOpenForWrite, RArray< TInt > &aOrderFilter);
Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed by it will be filtered and ordered.
|
|
static IMPORT_C CUnifiedCertStore *NewLC(RFs &aFs, TBool aOpenForWrite, RArray< TInt > &aOrderFilter);
Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed by it will be filtered and ordered, and it is pushed on the cleanup stack.
|
|
IMPORT_C ~CUnifiedCertStore();
The destructor destroys all the resources owned by this object.
IMPORT_C void Initialize(TRequestStatus &aStatus);
Initializes the manager.
It must be called after the manager has been constructed and before any call to the manager functions.
This is an asynchronous request.
|
IMPORT_C void CancelInitialize();
Cancels an ongoing Initialize()
operation.
The operation completes with KErrCancel.
virtual void List(RMPointerArray< CCTCertInfo > &aCertInfos, const CCertAttributeFilter &aFilter, TRequestStatus &aStatus);
Lists all certificates that satisfy the supplied filter.
|
virtual void GetCert(CCTCertInfo *&aCertInfo, const TCTTokenObjectHandle &aHandle, TRequestStatus &aStatus);
|
virtual void Applications(const CCTCertInfo &aCertInfo, RArray< TUid > &aApplications, TRequestStatus &aStatus);
Gets the list of applications . Applications are represented by UIDs .
|
virtual void IsApplicable(const CCTCertInfo &aCertInfo, TUid aApplication, TBool &aIsApplicable, TRequestStatus &aStatus);
|
virtual void Trusted(const CCTCertInfo &aCertInfo, TBool &aTrusted, TRequestStatus &aStatus);
|
virtual void Retrieve(const CCTCertInfo &aCertInfo, TDes8 &aEncodedCert, TRequestStatus &aStatus);
|
Capability: | WriteDeviceData | This requires the WriteDeviceData capability when applied to CA certificates. |
Capability: | WriteUserData | This requires the WriteUserData capability when applied to user certificates. |
IMPORT_C void Remove(const CCTCertInfo &aCertInfo, TRequestStatus &aStatus);
Removes a certificate.
|
|
IMPORT_C void CancelRemove();
Cancels an ongoing Remove()
operation.
The operation completes with KErrCancel.
Capability: | WriteDeviceData | This requires the WriteDeviceData capability. |
IMPORT_C void SetApplicability(const CCTCertInfo &aCertInfo, const RArray< TUid > &aApplications, TRequestStatus &aStatus);
Replaces the current applicability settings with the settings in the supplied array.
This should only be called for CA certificates - it has no meaning for user certificates.
|
|
IMPORT_C void CancelSetApplicability();
Cancels an ongoing SetApplicability()
operation.
The operation completes with KErrCancel.
Capability: | WriteDeviceData | This requires the WriteDeviceData capability. |
IMPORT_C void SetTrust(const CCTCertInfo &aCertInfo, TBool aTrusted, TRequestStatus &aStatus);
Changes the trust settings.
A CA certificate is trusted if the user is willing to use it for authenticating servers. It has no meaning with other types of certificates.
|
|
IMPORT_C void CancelSetTrust();
Cancels an ongoing SetTrust()
operation.
The operation completes with KErrCancel.
IMPORT_C void List(RMPointerArray< CCTCertInfo > &aCertInfos, const CCertAttributeFilter &aFilter, const TDesC8 &aIssuer,
TRequestStatus &aStatus);
Lists all certificates that have a particular subject DN.
|
IMPORT_C void List(RMPointerArray< CCTCertInfo > &aCertInfos, const CCertAttributeFilter &aFilter, RPointerArray< const TDesC8
> aIssuers, TRequestStatus &aStatus);
Lists all certificates that have a particular issuer.
|
Capability: | ReadUserData | This requires the ReadUserData capability when applied to user certificates, as these may contain sensitive user data. |
IMPORT_C void Retrieve(const CCTCertInfo &aCertInfo, CCertificate *&aCert, TRequestStatus &aStatus);
Retrieves a certificate as a parsed object.
This will only work for certificates that have a CCertificate-derived representation, in other words X509 and WTLS certificates. If called for a URL certificate, KErrNotSupported is returned.
|
|
IMPORT_C TInt CertStoreCount() const;
Gets the number of certificate stores.
|
IMPORT_C MCTCertStore &CertStore(TInt aIndex);
Gets a particular certificate store.
|
|
IMPORT_C TInt WritableCertStoreCount() const;
Gets the number of writeable certificate stores.
|
IMPORT_C MCTWritableCertStore &WritableCertStore(TInt aIndex);
Gets a particular writeable certificate store.
|
|
IMPORT_C TInt ReadOnlyCertStoreCount() const;
Gets the number of read-only certificate stores.
|
IMPORT_C MCTCertStore &ReadOnlyCertStore(TInt aIndex);
Gets a particular read-only certificate store.
|
|
private: virtual void DoCancel();
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel()
.
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel()
must not wait for event completion; this is handled by Cancel()
.
private: virtual void RunL();
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL()
function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL()
runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError()
to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active
object's RunL()
or RunError()
functions.