#include <unifiedcertstore.h>
class CUnifiedCertStore : public CActive |
Inherited Attributes | |
---|---|
CActive::iStatus |
Inherited Enumerations | |
---|---|
CActive:TPriority |
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.
IMPORT_C | ~CUnifiedCertStore | ( | ) |
The destructor destroys all the resources owned by this object.
void | Applications | ( | const CCTCertInfo & | aCertInfo, |
RArray< TUid > & | aApplications, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Gets the list of applications . Applications are represented by UIDs .
Parameter | Description |
---|---|
aApplications | An array that the returned application UIDs are added to. |
aStatus | The request status object. |
IMPORT_C void | CancelInitialize | ( | ) |
Cancels an ongoing Initialize() operation.
The operation completes with KErrCancel.
IMPORT_C void | CancelRemove | ( | ) |
Cancels an ongoing Remove() operation.
The operation completes with KErrCancel.
IMPORT_C void | CancelSetApplicability | ( | ) |
Cancels an ongoing SetApplicability() operation.
The operation completes with KErrCancel.
IMPORT_C void | CancelSetTrust | ( | ) |
Cancels an ongoing SetTrust() operation.
The operation completes with KErrCancel.
IMPORT_C MCTCertStore & | CertStore | ( | TInt | aIndex | ) |
Gets a particular certificate store.
Parameter | Description |
---|---|
aIndex | The index of the required certificate store. A number between 0 and CertStoreCount() - 1. |
Returns: The certificate store.
IMPORT_C TInt | CertStoreCount | ( | ) | const |
Gets the number of certificate stores.
Returns: The total number of certificate stores.
void | GetCert | ( | CCTCertInfo *& | aCertInfo, |
const TCTTokenObjectHandle & | aHandle, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
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.
Parameter | Description |
---|---|
aStatus | The request status object; contains the result of the Initialize() request when complete. Set to KErrCancel if any outstanding request is cancelled. |
void | IsApplicable | ( | const CCTCertInfo & | aCertInfo, |
TUid | aApplication, | |||
TBool & | aIsApplicable, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
void | List | ( | RMPointerArray< CCTCertInfo > & | aCertInfos, |
const CCertAttributeFilter & | aFilter, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Lists all certificates that satisfy the supplied filter.
Parameter | Description |
---|---|
aCertInfos | An array that the returned certificates are added to . |
aFilter | A filter to restrict which certificates are returned. |
aStatus | The request status object. |
IMPORT_C void | List | ( | RMPointerArray< CCTCertInfo > & | aCertInfos, |
const CCertAttributeFilter & | aFilter, | |||
const TDesC8 & | aIssuer, | |||
TRequestStatus & | aStatus | |||
) |
Lists all certificates that have a particular subject DN.
Parameter | Description |
---|---|
aCertInfos | An array that the returned certificates are added to |
aFilter | A filter to restrict which certificates are returned. |
aIssuer | Only certificates with this issuer DN will be returned |
aStatus | Asynchronous request status. |
IMPORT_C void | List | ( | RMPointerArray< CCTCertInfo > & | aCertInfos, |
const CCertAttributeFilter & | aFilter, | |||
RPointerArray< const TDesC8 > | aIssuers, | |||
TRequestStatus & | aStatus | |||
) |
Lists all certificates that have a particular issuer.
Parameter | Description |
---|---|
aCertInfos | An array that the returned certificates are added to |
aFilter | A filter to restrict which certificates are returned. |
aIssuers | Only certificates with this issuer will be returned |
aStatus | Asynchronous request status. |
IMPORT_C CUnifiedCertStore * | NewL | ( | RFs & | aFs, |
TBool | aOpenForWrite | |||
) | [static] |
Creates a new CUnifiedCertStore
Parameter | Description |
---|---|
aFs | A file server session. It must already be open. |
aOpenForWrite | ETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access. |
Returns: A pointer to an instance of the CUnifiedCertStore class.
IMPORT_C CUnifiedCertStore * | NewL | ( | RFs & | aFs, |
TBool | aOpenForWrite, | |||
RArray< TInt > & | aOrderFilter | |||
) | [static] |
Creates a new CUnifiedCertStore with the sequence filter, so that multiple certstores that are managed by it will be filtered and ordered.
Parameter | Description |
---|---|
aFs | A file server session. It must already be open. |
aOpenForWrite | ETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access. Ownership is taken. |
aOrderFilter | An array of the unique sequence IDs specifying CertStore ordering. |
Returns: A pointer to an instance of the CUnifiedCertStore class.
IMPORT_C CUnifiedCertStore * | NewLC | ( | RFs & | aFs, |
TBool | aOpenForWrite | |||
) | [static] |
Creates a new CUnifiedCertStore and pushes it on the cleanup stack.
Parameter | Description |
---|---|
aFs | A file server session. It must already be open. |
aOpenForWrite | ETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access. |
Returns: A pointer to an instance of the CUnifiedCertStore class.
IMPORT_C CUnifiedCertStore * | NewLC | ( | RFs & | aFs, |
TBool | aOpenForWrite, | |||
RArray< TInt > & | aOrderFilter | |||
) | [static] |
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.
Parameter | Description |
---|---|
aFs | A file server session. It must already be open. |
aOpenForWrite | ETrue if the stores must be opened with write access (e.g. for adding certificates) and EFalse if the user only needs read-only access. Ownership is taken. |
aOrderFilter | An array of the unique sequence IDs specifying CertStore ordering. |
Returns: A pointer to an instance of the CUnifiedCertStore class.
IMPORT_C MCTCertStore & | ReadOnlyCertStore | ( | TInt | aIndex | ) |
Gets a particular read-only certificate store.
Parameter | Description |
---|---|
aIndex | The index of the required certificate store. A number between 0 and ReadOnlyCertStoreCount() - 1. |
Returns: The read-only certificate store.
IMPORT_C TInt | ReadOnlyCertStoreCount | ( | ) | const |
Gets the number of read-only certificate stores.
Returns: The number of read-only certificate stores.
IMPORT_C void | Remove | ( | const CCTCertInfo & | aCertInfo, |
TRequestStatus & | aStatus | |||
) |
Removes a certificate.
Parameter | Description |
---|---|
aCertInfo | The certificate to be removed. |
aStatus | The request status object; contains the result of the Remove() request when complete. Set to KErrCancel if an outstanding request is cancelled. |
void | Retrieve | ( | const CCTCertInfo & | aCertInfo, |
TDes8 & | aEncodedCert, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
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.
Parameter | Description |
---|---|
aCertInfo | The certificate to retrieve |
aCert | The returned certificate. This object can safely be up-cast to a CX509Certificate or CWTLSCertificate if it's known that that is the certificate format. |
aStatus | Asynchronous request status. |
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.
Parameter | Description |
---|---|
aCertInfo | The certificate whose applicability should be updated. |
aApplications | The new applicability settings. Ownership of this remains with the caller, and it must remain valid for the lifetime of the call. |
aStatus | The request status object; contains the result of the SetApplicability() request when complete. Set to KErrCancel, if an outstanding request is cancelled. |
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.
Parameter | Description |
---|---|
aCertInfo | The certificate to be updated. |
aTrusted | ETrue, if trusted; EFalse, otherwise. |
aStatus | The request status object; contains the result of the SetTrust() request when complete. Set to KErrCancel, if an outstanding request is cancelled. |
void | Trusted | ( | const CCTCertInfo & | aCertInfo, |
TBool & | aTrusted, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
IMPORT_C MCTWritableCertStore & | WritableCertStore | ( | TInt | aIndex | ) |
Gets a particular writeable certificate store.
Parameter | Description |
---|---|
aIndex | The index of the required certificate store. A number between 0 and WriteableCertStoreCount() - 1. |
Returns: The writeable certificate store.
IMPORT_C TInt | WritableCertStoreCount | ( | ) | const |
Gets the number of writeable certificate stores.
Returns: The number of writeable certificate stores.