CCTCertInfo Class Reference

#include <cctcertinfo.h>

Link against: ctframework.lib

class CCTCertInfo : protected CBase, public MCTTokenObject, public MCertInfo

Inherits from

Public Member Functions
IMPORT_C TCertificateFormatCertificateFormat()
IMPORT_C TCertificateOwnerTypeCertificateOwnerType()
virtual IMPORT_C TCTTokenObjectHandleHandle()
IMPORT_C TBoolIsDeletable()
IMPORT_C const TDesC8 *IssuerHash()
IMPORT_C const TKeyIdentifier &IssuerKeyId()
virtual 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()
virtual MCTToken &Token()
virtual TUid Type()
IMPORT_C TBooloperator==(const CCTCertInfo &)
Protected Member Functions
virtual ~CCTCertInfo()
Inherited Attributes
MCertInfo::iCertificateId
MCertInfo::iCertificateOwnerType
MCertInfo::iDeletable
MCertInfo::iFormat
MCertInfo::iIssuerKeyId
MCertInfo::iLabel
MCertInfo::iSize
MCertInfo::iSubjectKeyId
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()
MCTTokenObject::AddTokenRef()
MCTTokenObject::DoRelease()
MCTTokenObject::MCTTokenObject(MCTToken &)
MCTTokenObject::Release()
MCTTokenObject::~MCTTokenObject()
MCertInfo::ExternalizeL(RWriteStream &)const
MCertInfo::InternalizeL(RReadStream &)
MCertInfo::MCertInfo()
MCertInfo::MCertInfo(const MCertInfo &)
MCertInfo::MCertInfo(const TDesC &,TCertificateFormat,TCertificateOwnerType,TInt,const TKeyIdentifier *,const TKeyIdentifier *,TInt,TBool)
MCertInfo::~MCertInfo()

Detailed Description

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.

Constructor & Destructor Documentation

~CCTCertInfo ( )

IMPORT_C~CCTCertInfo()[protected, virtual]

Member Function Documentation

CertificateFormat ( )

IMPORT_C TCertificateFormatCertificateFormat()const

Gets the certificate format.

Return Value
The certificate format.

CertificateOwnerType ( )

IMPORT_C TCertificateOwnerTypeCertificateOwnerType()const

Gets the owner type.

Return Value
The owner type.

Handle ( )

IMPORT_C TCTTokenObjectHandleHandle()const [virtual]

Gets a handle for the object.

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

See also: TCTTokenObjectHandle

Return Value
A handle for the object.

IsDeletable ( )

IMPORT_C TBoolIsDeletable()const

Whether the certificate is deletable.

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

IssuerHash ( )

IMPORT_C const TDesC8 *IssuerHash()const

Reimplemented from MCertInfo::IssuerHash()const

Gets the hash of the issuer's DN.

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

IssuerKeyId ( )

IMPORT_C const TKeyIdentifier &IssuerKeyId()const

Gets the issuer key ID.

Return Value
A reference to a key identifier object.

Label ( )

const TDesC &Label()const [virtual]

Reimplemented from MCTTokenObject::Label()const

Gets the object's human-readable label.

See also: MCTTokenObject::Label()

Return Value
The object's human-readable 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.

Parameters
aCertInfoThe source certificate information.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

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.

Parameters
aLabelThe certificate's label.
aFormatThe certificate's format.
aCertificateOwnerTypeThe owner type.
aSizeThe size of the certificate.
aSubjectKeyIdThe subject key ID.
aIssuerKeyIdThe issuer key ID.
aTokenThe token that the certificate is within.
aCertificateIdThe ID within the object handle.
aDeletableThe certificate is deletable.
aIssuerHashThe hash of the DN of the issuer.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

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.

Parameters
aLabelThe certificate's label.
aFormatThe certificate's format.
aCertificateOwnerTypeThe owner type.
aSizeThe size of the certificate.
aSubjectKeyIdThe subject key ID.
aIssuerKeyIdThe issuer key ID.
aTokenThe token that the certificate is within.
aCertificateIdThe ID within the object handle.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

NewL ( RReadStream &, MCTToken & )

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

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

See also: ExternalizeL InternalizeL

Parameters
aStreamThe stream from which the object is to be internalised.
aTokenThe token that it is within.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

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.

Parameters
aCertInfoThe source certificate information.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

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.

Parameters
aLabelThe certificate's label.
aFormatThe certificate's format.
aCertificateOwnerTypeThe owner type.
aSizeThe size of the certificate.
aSubjectKeyIdThe subject key ID.
aIssuerKeyIdThe issuer key ID.
aTokenThe token that the certificate is within.
aCertificateIdThe ID within the object handle.
aDeletableThe certificate is deletable.
aIssuerHashThe hash of the issuer's DN.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

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.

Parameters
aLabelThe certificate's label.
aFormatThe certificate's format.
aCertificateOwnerTypeThe owner type.
aSizeThe size of the certificate.
aSubjectKeyIdThe subject key ID.
aIssuerKeyIdThe issuer key ID.
aTokenThe token that the certificate is within.
aCertificateIdThe ID within the object handle.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

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.

See also: ExternalizeL InternalizeL

Parameters
aStreamThe stream from which the object is to be internalised.
aTokenThe token that it is within.
Return Value
A pointer to the new certificate information object.
Leave Codes
KErrNoMemoryThere is no memory to construct it.

SetCertificateId ( TInt )

IMPORT_C voidSetCertificateId(TIntaCertId)

Sets the certificate Id.

Parameters
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()).

Return Value
The size of the certificate.

SubjectKeyId ( )

IMPORT_C const TKeyIdentifier &SubjectKeyId()const

Gets the subject key ID.

Return Value
A reference to a key identifier object.

Token ( )

MCTToken &Token()const [virtual]

Reimplemented from MCTTokenObject::Token()const

Gets a reference to the associated token.

See also: MCTTokenObject::Token()

Return Value
A reference to the associated token.

Type ( )

TUid Type()const [virtual]

Reimplemented from MCTTokenObject::Type()const

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.

See also: MCTTokenObject::Type()

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

operator== ( const CCTCertInfo & )

IMPORT_C TBooloperator==(const CCTCertInfo &aCertInfo)const

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

Parameters
aCertInfoThe certificate information object to be compared.
Return Value
ETrue, if they are the same; EFalse, otherwise.