CCertAttributeFilter Class Reference

#include <ccertattributefilter.h>

Link against: ctframework.lib

class CCertAttributeFilter : public CBase

Inherits from

  • CCertAttributeFilter

Detailed Description

A filter for specifying which certificates are required.

On construction it will accept everything. The Set... functions can then be used to restrict it.

Member Attribute Documentation

iFormat

The format of certificates that should be included.

iFormatIsSet

TBool iFormatIsSet

Indicates that iFormat should be used.

iIssuerKeyId

TKeyIdentifier iIssuerKeyId

The issuer key that returned certs should have.

iIssuerKeyIdIsSet

TBool iIssuerKeyIdIsSet

Indicates that iIssuerKeyId should be used.

iKeyUsage

TKeyUsageX509 iKeyUsage

The usage of keys that should be returned.

iLabel

TCertLabel iLabel

The filter data. Each data item is accompanied by a '..IsSet' boolean which indicates if the item should be used. Unset values (whose ..IsSet variable is EFalse) should be ignored. The label that returned certificates must have.

iLabelIsSet

TBool iLabelIsSet

Indicates that iLabel should be used.

iOwnerType

The owner type of returned certificates.

iOwnerTypeIsSet

TBool iOwnerTypeIsSet

Indicates that iOwnerType should be used.

iSubjectKeyId

TKeyIdentifier iSubjectKeyId

The subject key that returned certs should have.

iSubjectKeyIdIsSet

TBool iSubjectKeyIdIsSet

Indicates that iSubjectKeyId should be used.

iUid

TUid iUid

The application UID that all returned certificates must have.

iUidIsSet

TBool iUidIsSet

Indicates that iUid should be used.

Member Function Documentation

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Write a certificate attribute filter to a stream.

Externalisation - only output the fields that are set, using the TCertAttribute enum to identify them. Mark the end of the list with ECertAttributeNull.

NewL ( )

IMPORT_C CCertAttributeFilter *NewL()[static]

Returns a default filter. This filter accepts any certificate. Call the Set... functions to restrict what it accepts.

Return Value
A pointer to a new CCertAttributeFilter object.

NewL ( RReadStream & )

IMPORT_C CCertAttributeFilter *NewL(RReadStream &aStream)[static]

Read a certificate attribute filter from a stream.

NewLC ( )

IMPORT_C CCertAttributeFilter *NewLC()[static]

Returns a default filter. This filter accepts any certificate. It leaves the filter on the cleanup stack.

Return Value
A pointer to a new CCertAttributeFilter object.

SetFormat ( TCertificateFormat )

IMPORT_C voidSetFormat(TCertificateFormataFormat)

Sets the format of the returned certificates

Parameters
aFormatThe required format

SetIssuerKeyId ( const TKeyIdentifier & )

IMPORT_C voidSetIssuerKeyId(const TKeyIdentifier &aIssuerKeyId)

Sets the issuer key ID that returned certificates must have.

Parameters
aIssuerKeyIdThe issuer key ID

SetKeyUsage ( TKeyUsageX509 )

IMPORT_C voidSetKeyUsage(TKeyUsageX509aKeyUsage)

Sets the usage that returned certs must be used for.

Note that the usage is supplied using X509 scheme - keystore interfaces use the PKCS#15 scheme!

Parameters
aKeyUsageThe key usage

SetLabel ( const TCertLabel & )

IMPORT_C voidSetLabel(const TCertLabel &aLabel)

Sets the label of the cert that the filter will accept.

Parameters
aLabelThe new label

SetOwnerType ( TCertificateOwnerType )

IMPORT_C voidSetOwnerType(TCertificateOwnerTypeaOwnerType)

Sets the owner type of the returned certificates

Parameters
aOwnerTypeThe owner type.

SetSubjectKeyId ( const TKeyIdentifier & )

IMPORT_C voidSetSubjectKeyId(const TKeyIdentifier &aSubjectKeyId)

Sets the subject key ID that returned certificates must have.

Parameters
aSubjectKeyIdThe subject key ID

SetUid ( TUid )

IMPORT_C voidSetUid(TUidaUid)

Sets the UID of an application which the certificate must support

Parameters
aUidThe new UID