CCTCertInfo Class Reference

class CCTCertInfo : protected CBase

Encapsulates information about a stored certificate.

Objects of this type are usually returned by a certificate store, to allow a client to query the contents of the store.

Note that these objects are normally constructed by certificate stores, not by clients.

Inherits from

Public Member Functions
IMPORT_C TCertificateFormatCertificateFormat()
IMPORT_C TCertificateOwnerTypeCertificateOwnerType()
IMPORT_C TCTTokenObjectHandleHandle()
IMPORT_C TBoolIsDeletable()
IMPORT_C const TDesC8 *IssuerHash()
IMPORT_C const TKeyIdentifier &IssuerKeyId()
const TDesC &Label()
IMPORT_C CCTCertInfo *NewL(const CCTCertInfo &)
IMPORT_C CCTCertInfo *NewL(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt, TBool, const TDesC8 *)
IMPORT_C CCTCertInfo *NewL(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt)
IMPORT_C CCTCertInfo *NewL(RReadStream &, MCTToken &)
IMPORT_C CCTCertInfo *NewLC(const CCTCertInfo &)
IMPORT_C CCTCertInfo *NewLC(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt, TBool, const TDesC8 *)
IMPORT_C CCTCertInfo *NewLC(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt)
IMPORT_C CCTCertInfo *NewLC(RReadStream &, MCTToken &)
IMPORT_C voidSetCertificateId(TInt)
IMPORT_C TIntSize()
IMPORT_C const TKeyIdentifier &SubjectKeyId()
MCTToken &Token()
TUid Type()
IMPORT_C TBooloperator==(const CCTCertInfo &)
Protected Member Functions
~CCTCertInfo()
Private Member Functions
CCTCertInfo(MCTToken &)
CCTCertInfo(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt, TBool)
CCTCertInfo(const CCTCertInfo &)
voidConstructL(RReadStream &)
voidConstructL(const TDesC8 *)
const CCTCertInfo &operator=(const CCTCertInfo &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
MCTToken &iToken

Constructor & Destructor Documentation

CCTCertInfo(MCTToken &)

CCTCertInfo(MCTToken &aToken)[private]

Parameters

MCTToken & aToken

CCTCertInfo(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt, TBool)

CCTCertInfo(const TDesC &aLabel,
TCertificateFormataFormat,
TCertificateOwnerTypeaCertificateOwnerType,
TIntaSize,
const TKeyIdentifier *aSubjectKeyId,
const TKeyIdentifier *aIssuerKeyId,
MCTToken &aToken,
TIntaCertificateId,
TBoolaDeletable
)[private]

Parameters

const TDesC & aLabel
TCertificateFormat aFormat
TCertificateOwnerType aCertificateOwnerType
TInt aSize
const TKeyIdentifier * aSubjectKeyId
const TKeyIdentifier * aIssuerKeyId
MCTToken & aToken
TInt aCertificateId
TBool aDeletable

CCTCertInfo(const CCTCertInfo &)

CCTCertInfo(const CCTCertInfo &aCertInfo)[private]

Parameters

const CCTCertInfo & aCertInfo

~CCTCertInfo()

IMPORT_C~CCTCertInfo()[protected, virtual]

Member Functions Documentation

CertificateFormat()

IMPORT_C TCertificateFormatCertificateFormat()const

Gets the certificate format.

The certificate format.

CertificateOwnerType()

IMPORT_C TCertificateOwnerTypeCertificateOwnerType()const

Gets the owner type.

The owner type.

ConstructL(RReadStream &)

voidConstructL(RReadStream &aStream)[private]

Parameters

RReadStream & aStream

ConstructL(const TDesC8 *)

voidConstructL(const TDesC8 *aIssuerHash)[private]

Parameters

const TDesC8 * aIssuerHash

Handle()

IMPORT_C TCTTokenObjectHandleHandle()const

Gets a handle for the object.

The primary purpose of the handle is to allow token objects to be 'passed' between processes.

A handle for the object.

TCTTokenObjectHandle

IsDeletable()

IMPORT_C TBoolIsDeletable()const

Whether the certificate is deletable.

ETrue if it is possible to delete the certificate; EFalse, otherwise.

IssuerHash()

IMPORT_C const TDesC8 *IssuerHash()const

Gets the hash of the issuer's DN.

The hash of the issuer's DN, or NULL if not known.

IssuerKeyId()

IMPORT_C const TKeyIdentifier &IssuerKeyId()const

Gets the issuer key ID.

A reference to a key identifier object.

Label()

const TDesC &Label()const [virtual]

Gets the object's human-readable label.

The object's human-readable label.

MCTTokenObject::Label()

NewL(const CCTCertInfo &)

IMPORT_C CCTCertInfo *NewL(const CCTCertInfo &aCertInfo)[static]

Construction -- Note that these objects are normally constructed by certificate stores, not by clients.

Creates the certificate information object by copying from an existing object.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

Parameters

const CCTCertInfo & aCertInfoThe source certificate information.

NewL(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt, TBool, const TDesC8 *)

IMPORT_C CCTCertInfo *NewL(const TDesC &aLabel,
TCertificateFormataFormat,
TCertificateOwnerTypeaCertificateOwnerType,
TIntaSize,
const TKeyIdentifier *aSubjectKeyId,
const TKeyIdentifier *aIssuerKeyId,
MCTToken &aToken,
TIntaCertificateId,
TBoolaDeletable,
const TDesC8 *aIssuerHash = NULL
)[static]

Creates the certificate information object from its constituent parts.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

Parameters

const TDesC & aLabelThe certificate's label.
TCertificateFormat aFormatThe certificate's format.
TCertificateOwnerType aCertificateOwnerTypeThe owner type.
TInt aSizeThe size of the certificate.
const TKeyIdentifier * aSubjectKeyIdThe subject key ID.
const TKeyIdentifier * aIssuerKeyIdThe issuer key ID.
MCTToken & aTokenThe token that the certificate is within.
TInt aCertificateIdThe ID within the object handle.
TBool aDeletableThe certificate is deletable.
const TDesC8 * aIssuerHash = NULLThe hash of the DN of the issuer.

NewL(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt)

IMPORT_C CCTCertInfo *NewL(const TDesC &aLabel,
TCertificateFormataFormat,
TCertificateOwnerTypeaCertificateOwnerType,
TIntaSize,
const TKeyIdentifier *aSubjectKeyId,
const TKeyIdentifier *aIssuerKeyId,
MCTToken &aToken,
TIntaCertificateId
)[static]

Creates the certificate information object from its constituent parts.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

Parameters

const TDesC & aLabelThe certificate's label.
TCertificateFormat aFormatThe certificate's format.
TCertificateOwnerType aCertificateOwnerTypeThe owner type.
TInt aSizeThe size of the certificate.
const TKeyIdentifier * aSubjectKeyIdThe subject key ID.
const TKeyIdentifier * aIssuerKeyIdThe issuer key ID.
MCTToken & aTokenThe token that the certificate is within.
TInt aCertificateIdThe ID within the object handle.

NewL(RReadStream &, MCTToken &)

IMPORT_C CCTCertInfo *NewL(RReadStream &aStream,
MCTToken &aToken
)[static]

Creates the certificate information object by internalising a previously externalised one.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

ExternalizeL

InternalizeL

Parameters

RReadStream & aStreamThe stream from which the object is to be internalised.
MCTToken & aTokenThe token that it is within.

NewLC(const CCTCertInfo &)

IMPORT_C CCTCertInfo *NewLC(const CCTCertInfo &aCertInfo)[static]

Creates the certificate information object by copying from an existing object, and puts a pointer to the new object onto the cleanup stack.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

Parameters

const CCTCertInfo & aCertInfoThe source certificate information.

NewLC(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt, TBool, const TDesC8 *)

IMPORT_C CCTCertInfo *NewLC(const TDesC &aLabel,
TCertificateFormataFormat,
TCertificateOwnerTypeaCertificateOwnerType,
TIntaSize,
const TKeyIdentifier *aSubjectKeyId,
const TKeyIdentifier *aIssuerKeyId,
MCTToken &aToken,
TIntaCertificateId,
TBoolaDeletable,
const TDesC8 *aIssuerHash = NULL
)[static]

Creates the certificate information object from its constituent parts, and puts a pointer to the new object onto the cleanup stack.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

Parameters

const TDesC & aLabelThe certificate's label.
TCertificateFormat aFormatThe certificate's format.
TCertificateOwnerType aCertificateOwnerTypeThe owner type.
TInt aSizeThe size of the certificate.
const TKeyIdentifier * aSubjectKeyIdThe subject key ID.
const TKeyIdentifier * aIssuerKeyIdThe issuer key ID.
MCTToken & aTokenThe token that the certificate is within.
TInt aCertificateIdThe ID within the object handle.
TBool aDeletableThe certificate is deletable.
const TDesC8 * aIssuerHash = NULLThe hash of the issuer's DN.

NewLC(const TDesC &, TCertificateFormat, TCertificateOwnerType, TInt, const TKeyIdentifier *, const TKeyIdentifier *, MCTToken &, TInt)

IMPORT_C CCTCertInfo *NewLC(const TDesC &aLabel,
TCertificateFormataFormat,
TCertificateOwnerTypeaCertificateOwnerType,
TIntaSize,
const TKeyIdentifier *aSubjectKeyId,
const TKeyIdentifier *aIssuerKeyId,
MCTToken &aToken,
TIntaCertificateId
)[static]

Creates the certificate information object from its constituent parts, and puts a pointer to the new object onto the cleanup stack.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

Parameters

const TDesC & aLabelThe certificate's label.
TCertificateFormat aFormatThe certificate's format.
TCertificateOwnerType aCertificateOwnerTypeThe owner type.
TInt aSizeThe size of the certificate.
const TKeyIdentifier * aSubjectKeyIdThe subject key ID.
const TKeyIdentifier * aIssuerKeyIdThe issuer key ID.
MCTToken & aTokenThe token that the certificate is within.
TInt aCertificateIdThe ID within the object handle.

NewLC(RReadStream &, MCTToken &)

IMPORT_C CCTCertInfo *NewLC(RReadStream &aStream,
MCTToken &aToken
)[static]

Creates the certificate information object, by internalising a previously externalised one, and puts a pointer to the new object onto the cleanup stack.

A pointer to the new certificate information object.

leave

KErrNoMemory There is no memory to construct it.

ExternalizeL

InternalizeL

Parameters

RReadStream & aStreamThe stream from which the object is to be internalised.
MCTToken & aTokenThe token that it is within.

SetCertificateId(TInt)

IMPORT_C voidSetCertificateId(TIntaCertId)

Sets the certificate Id.

Parameters

TInt aCertIdThe certificate Id.

Size()

IMPORT_C TIntSize()const

Gets the size of the certificate.

Note that this function must be called so that the correct size of descriptor can be allocated when retrieving the certificate (with MCertStore::Retrieve()).

The size of the certificate.

SubjectKeyId()

IMPORT_C const TKeyIdentifier &SubjectKeyId()const

Gets the subject key ID.

A reference to a key identifier object.

Token()

MCTToken &Token()const [virtual]

Gets a reference to the associated token.

A reference to the associated token.

MCTTokenObject::Token()

Type()

TUid Type()const [virtual]

Gets a UID representing the type of the token object.

The function overrides MCTTokenObject::Type().

The meanings of possible UIDs should be documented in the documentation for the interface that returns them.

A UID representing the type of the token object; this implementation returns KCTObjectCertInfo.

MCTTokenObject::Type()

operator=(const CCTCertInfo &)

const CCTCertInfo &operator=(const CCTCertInfo &aOther)[private]

Parameters

const CCTCertInfo & aOther

operator==(const CCTCertInfo &)

IMPORT_C TBooloperator==(const CCTCertInfo &aCertInfo)const

Compares this certificate information object with a specified Certificate Information object for equality.

ETrue, if they are the same; EFalse, otherwise.

Parameters

const CCTCertInfo & aCertInfoThe certificate information object to be compared.

Member Data Documentation

MCTToken & iToken

MCTToken &iToken[private]