CCTKeyInfo Class Reference

class CCTKeyInfo : public CKeyInfoBase

Information about a key, as returned by MCTKeyStore::List.

Inherits from

Public Member Functions
TCTTokenObjectHandle Handle()
const TDesC &Label()
IMPORT_C CCTKeyInfo *NewL(TKeyIdentifier, TKeyUsagePKCS15, TUint, MCTAuthenticationObject *, HBufC *, MCTToken &, TInt, const TSecurityPolicy &, const TSecurityPolicy &, EKeyAlgorithm, TInt, TBool, TTime, TTime, HBufC8 *)
IMPORT_C CCTKeyInfo *NewL(RReadStream &, MCTToken &)
MCTAuthenticationObject *Protector()
voidSetProtector(MCTAuthenticationObject &)
MCTToken &Token()
TUid Type()
operator TCTTokenObjectHandle()
Private Member Functions
CCTKeyInfo(TKeyIdentifier, TKeyUsagePKCS15, TUint, MCTAuthenticationObject *, HBufC *, MCTToken &, TInt, const TSecurityPolicy &, const TSecurityPolicy &, EKeyAlgorithm, TInt, TBool, TTime, TTime, HBufC8 *)
CCTKeyInfo(MCTToken &)
~CCTKeyInfo()
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()
CKeyInfoBase::AccessType()const
CKeyInfoBase::Algorithm()const
CKeyInfoBase::CKeyInfoBase()
CKeyInfoBase::CKeyInfoBase(TKeyIdentifier,TKeyUsagePKCS15,TUint,HBufC *,TInt,const TSecurityPolicy &,const TSecurityPolicy &,EKeyAlgorithm,TInt,TBool,TTime,TTime,HBufC8 *)
CKeyInfoBase::ConstructL()
CKeyInfoBase::ConstructL(RReadStream &)
CKeyInfoBase::EndDate()const
CKeyInfoBase::ExternalizeL(RWriteStream &)const
CKeyInfoBase::HandleID()const
CKeyInfoBase::ID()const
CKeyInfoBase::ManagementPolicy()const
CKeyInfoBase::Native()const
CKeyInfoBase::PKCS8AttributeSet()const
CKeyInfoBase::SetAlgorithm(EKeyAlgorithm)
CKeyInfoBase::SetHandle(TInt)
CKeyInfoBase::SetIdentifier(TKeyIdentifier)
CKeyInfoBase::SetSize(TUint)
CKeyInfoBase::Size()const
CKeyInfoBase::StartDate()const
CKeyInfoBase::Usage()const
CKeyInfoBase::UsePolicy()const
CKeyInfoBase::~CKeyInfoBase()
Inherited Enumerations
CKeyInfoBase:EKeyAccess
CKeyInfoBase:EKeyAlgorithm
Private Attributes
MCTAuthenticationObject *iProtector
MCTToken &iToken
Inherited Attributes
CKeyInfoBase::iAccessType
CKeyInfoBase::iAlgorithm
CKeyInfoBase::iEndDate
CKeyInfoBase::iHandle
CKeyInfoBase::iID
CKeyInfoBase::iLabel
CKeyInfoBase::iManagementPolicy
CKeyInfoBase::iNative
CKeyInfoBase::iPKCS8AttributeSet
CKeyInfoBase::iSize
CKeyInfoBase::iStartDate
CKeyInfoBase::iUsage
CKeyInfoBase::iUsePolicy

Constructor & Destructor Documentation

CCTKeyInfo(TKeyIdentifier, TKeyUsagePKCS15, TUint, MCTAuthenticationObject *, HBufC *, MCTToken &, TInt, const TSecurityPolicy &, const TSecurityPolicy &, EKeyAlgorithm, TInt, TBool, TTime, TTime, HBufC8 *)

CCTKeyInfo(TKeyIdentifieraID,
TKeyUsagePKCS15aUsage,
TUintaSize,
MCTAuthenticationObject *aProtector,
HBufC *aLabel,
MCTToken &aToken,
TIntaHandle,
const TSecurityPolicy &aUsePolicy,
const TSecurityPolicy &aManagementPolicy,
EKeyAlgorithmaAlgorithm,
TIntaAccessType,
TBoolaNative,
TTimeaStartDate,
TTimeaEndDate,
HBufC8 *aPKCS8AttributeSet
)[private]

Parameters

TKeyIdentifier aID
TKeyUsagePKCS15 aUsage
TUint aSize
MCTAuthenticationObject * aProtector
HBufC * aLabel
MCTToken & aToken
TInt aHandle
const TSecurityPolicy & aUsePolicy
const TSecurityPolicy & aManagementPolicy
EKeyAlgorithm aAlgorithm
TInt aAccessType
TBool aNative
TTime aStartDate
TTime aEndDate
HBufC8 * aPKCS8AttributeSet

CCTKeyInfo(MCTToken &)

CCTKeyInfo(MCTToken &aToken)[private]

Parameters

MCTToken & aToken

~CCTKeyInfo()

~CCTKeyInfo()[private]

Member Functions Documentation

Handle()

TCTTokenObjectHandle Handle()const [virtual]

A handle for the key. This can be used to identify a key to another process.

Label()

const TDesC &Label()const [virtual]

The label of the key

NewL(TKeyIdentifier, TKeyUsagePKCS15, TUint, MCTAuthenticationObject *, HBufC *, MCTToken &, TInt, const TSecurityPolicy &, const TSecurityPolicy &, EKeyAlgorithm, TInt, TBool, TTime, TTime, HBufC8 *)

IMPORT_C CCTKeyInfo *NewL(TKeyIdentifieraID,
TKeyUsagePKCS15aUsage,
TUintaSize,
MCTAuthenticationObject *aProtector,
HBufC *aLabel,
MCTToken &aToken,
TIntaHandle,
const TSecurityPolicy &aUsePolicy,
const TSecurityPolicy &aManagementPolicy,
EKeyAlgorithmaAlgorithm,
TIntaAccessType,
TBoolaNative,
TTimeaStartDate,
TTimeaEndDate,
HBufC8 *aPKCS8AttributeSet = NULL
)[static]

Creates a CCTKeyInfo from constituents. This is called by the unified key store, and should not be called directly.

leave

KErrKeyUsage If the key usage flags are not valid or not consistent with the key algorithm.

leave

KErrKeyValidity If the validity start and end dates are specified but do not form a valid time period.

Parameters

TKeyIdentifier aIDThe SHA1 hash of the key
TKeyUsagePKCS15 aUsageThe usage of the key
TUint aSizeThe size of the key in bytes
MCTAuthenticationObject * aProtectorA protector object if the key is protected by a PIN. This may be NULL if the protector is not known.
HBufC * aLabelThe label of the key (takes ownership).
MCTToken & aTokenThe token the key is in
TInt aHandleThe object ID part of the object handle; an integer that is unique amongst keys in this token.
const TSecurityPolicy & aUsePolicyThe security policy for key use
const TSecurityPolicy & aManagementPolicyThe security policy for key management
EKeyAlgorithm aAlgorithmThe key algorithm (RSA, DSA or Diffie-Hellman)
TInt aAccessTypeThe access type of the key
TBool aNativeDefines whether the key is native
TTime aStartDateThe key validity start date
TTime aEndDateThe key validity end date
HBufC8 * aPKCS8AttributeSet = NULL(optional) The DER encoded PKCS8 attribute set (takes ownership).

NewL(RReadStream &, MCTToken &)

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

Creates a new KeyInfo from a stream.

leave

KErrKeyUsage If the key usage flags are not valid or not consistent with the key algorithm.

leave

KErrKeyValidity If the validity start and end dates are specified but do not form a valid time period.

Parameters

RReadStream & aStreamThe stream to read the key data from
MCTToken & aTokenThe token that the key is in

Protector()

MCTAuthenticationObject *Protector()const [inline]

The PIN (or other authentication object) that protects the key, or NULL if not set. This object is owned by key store.

SetProtector(MCTAuthenticationObject &)

voidSetProtector(MCTAuthenticationObject &aProtector)[inline]

Sets the authentication object for this key. The object's Release method will be called by the destructor, allowing for refence counting of auth objects to be implemented if desired.

Parameters

MCTAuthenticationObject & aProtector

Token()

MCTToken &Token()const [virtual]

The token the key is in

Type()

TUid Type()const [virtual]

Returns KKeyInfoUID to indicate this is a key info object

operator TCTTokenObjectHandle()

operator TCTTokenObjectHandle()const [inline]

The CT handle to this object.

Member Data Documentation

MCTAuthenticationObject * iProtector

MCTAuthenticationObject *iProtector[private]

The protector object of the key. This pointer is not owned by the class

MCTToken & iToken

MCTToken &iToken[private]

The token the key is in