MCertStore Class Reference

#include <mcertstore.h>

class MCertStore
Public Member Functions
pure virtual voidApplications(const CCTCertInfo &, RArray< TUid > &, TRequestStatus &)
pure virtual voidCancelApplications()
pure virtual voidCancelGetCert()
pure virtual voidCancelIsApplicable()
pure virtual voidCancelList()
pure virtual voidCancelRetrieve()
pure virtual voidCancelTrusted()
pure virtual voidGetCert(CCTCertInfo *&, const TCTTokenObjectHandle &, TRequestStatus &)
pure virtual voidIsApplicable(const CCTCertInfo &, TUid, TBool &, TRequestStatus &)
pure virtual voidList(RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, TRequestStatus &)
pure virtual voidRetrieve(const CCTCertInfo &, TDes8 &, TRequestStatus &)
pure virtual voidTrusted(const CCTCertInfo &, TBool &, TRequestStatus &)

Detailed Description

Defines the interface for a read-only certificate store.

This documentation describes the security policy that must be enforced by implementations of the interface.

Member Function Documentation

Applications ( const CCTCertInfo &, RArray< TUid > &, TRequestStatus & )

voidApplications(const CCTCertInfo &aCertInfo,
RArray< TUid > &aAplications,
TRequestStatus &aStatus
)[pure virtual]

Querying the applications of a certificate. Get the list of the applications associcated with certificate.

Applications are represented by UIDs. Examples would be Software Install, TLS, WTLS, WMLScript, SignText, etc..

Parameters
aCertInfoThe certificate to return applications for.
aAplicationsAn array to save the applications in.
aStatusThe request status object; contains the result of the Applications() request when complete. Set to KErrCancel if any outstanding request is cancelled.

CancelApplications ( )

voidCancelApplications()[pure virtual]

Cancels an ongoing Applications() operation.

CancelGetCert ( )

voidCancelGetCert()[pure virtual]

Cancel an ongoing GetCert() operation.

CancelIsApplicable ( )

voidCancelIsApplicable()[pure virtual]

Cancels an ongoing IsApplicable() operation.

CancelList ( )

voidCancelList()[pure virtual]

Cancels an ongoing List() operation.

CancelRetrieve ( )

voidCancelRetrieve()[pure virtual]

Cancels an ongoing Retrieve() operation.

CancelTrusted ( )

voidCancelTrusted()[pure virtual]

Cancels an ongoing Trusted() operation.

GetCert ( CCTCertInfo *&, const TCTTokenObjectHandle &, TRequestStatus & )

voidGetCert(CCTCertInfo *&aCertInfo,
const TCTTokenObjectHandle &aHandle,
TRequestStatus &aStatus
)[pure virtual]

Getting a certificate given a handle. Get a certificate given its handle.

Parameters
aCertInfoThe returned certificate.
aHandleThe handle of the certificate to return.
aStatusThe request status object; contains the result of the GetCert() request when complete. Set to KErrCancel if any outstanding request is cancelled.

IsApplicable ( const CCTCertInfo &, TUid, TBool &, TRequestStatus & )

voidIsApplicable(const CCTCertInfo &aCertInfo,
TUidaApplication,
TBool &aIsApplicable,
TRequestStatus &aStatus
)[pure virtual]

Tests if a certificate is applicable to a particular application.

Parameters
aCertInfoThe certificate in question.
aApplicationThe application.
aIsApplicableSet to ETrue or EFalse by the function to return the result.
aStatusThe request status object; contains the result of the IsApplicable() request when complete. Set to KErrCancel if any outstanding request is cancelled.

List ( RMPointerArray< CCTCertInfo > &, const CCertAttributeFilter &, TRequestStatus & )

voidList(RMPointerArray< CCTCertInfo > &aCerts,
const CCertAttributeFilter &aFilter,
TRequestStatus &aStatus
)[pure virtual]

Listing Certificates Get a list of all certificates that satisfy the supplied filter.

This is an async function; all errors are reported by completing aStatus with the error value, and it can be cancelled with CancelList().

Parameters
aCertsAn array into which the returned certificates are placed.
aFilterA filter to select which certificates should be included.
aStatusA request status that will be completed when the operation completes.

Retrieve ( const CCTCertInfo &, TDes8 &, TRequestStatus & )

voidRetrieve(const CCTCertInfo &aCertInfo,
TDes8 &aEncodedCert,
TRequestStatus &aStatus
)[pure virtual]

Retrieving the actual certificate Retrieves the actual data of the certificate.

Parameters
aCertInfoThe certificate to retrieve.
aEncodedCertA buffer to put the certificate in. It must be big enough; the size is stored in aCertInfo.
aStatusThe request status object; contains the result of the Retrieve()request when complete. Set to KErrCancel if any outstanding request is cancelled.
Leave Codes
KErrPermissionDeniedIf called for a user certificate when the caller doesn't have the ReadUserData capability.
Capability
ReadUserDataThis requires the ReadUserData capability when applied to user certificates, as these may contain sensitive user data.

Trusted ( const CCTCertInfo &, TBool &, TRequestStatus & )

voidTrusted(const CCTCertInfo &aCertInfo,
TBool &aTrusted,
TRequestStatus &aStatus
)[pure virtual]

Trust querying Tests whether a certificate is trusted.

Trust is only meaningful for CA certificates where it means that the certificate can be used as a trust root for the purposes of certificate validation.

Parameters
aCertInfoThe certificate we are interested in.
aTrustedUsed to return the trust status.
aStatusThe request status object; contains the result of the Trusted() request when complete. Set to KErrCancel if any outstanding request is cancelled.