CCmsCertificateChoice Class Reference

class CCmsCertificateChoice : public CBase

An instance of a member of the RFC2630 CertificateChoices. At present, only X509 certificates and attribute certificate are supported. (not PKCS#6 extended certificates).

Inherits from

Constructor & Destructor Documentation

CCmsCertificateChoice()

CCmsCertificateChoice ( ) [private]

Default Constructor

~CCmsCertificateChoice()

~CCmsCertificateChoice ( ) [virtual]

Destructor

Member Functions Documentation

AttributeCertificate()

IMPORT_C const HBufC8 * AttributeCertificate ( ) const

Returns the encoded certificate's buffer. If the certificate is not an attribute certificate, NULL is returned. Callers can also check whether the certificate's type is X509 beforehand.

Certificate(void)

IMPORT_C const CX509Certificate & Certificate ( void ) const

Returns the x509 certificate reference if the certificate is a X509 certificate. Callers need to check whether the certificate's type is X509 beforehand.

Parameters

void

CertificateType()

IMPORT_C TCertificateType CertificateType ( )

Returns the type of the CertificateChoices object

ConstructL(const TDesC8 &)

void ConstructL ( const TDesC8 & aRawData ) [private]

Second phase constructor for decoding.

Parameters

const TDesC8 & aRawData the raw data to be decoded.

ConstructL(const CX509Certificate &)

void ConstructL ( const CX509Certificate & aCertificate ) [private]

Second phase constructor for encoding.

Parameters

const CX509Certificate & aCertificate the X509 certificate used to create the object

ConstructL(TCertificateType, const TDesC8 &)

void ConstructL ( TCertificateType aCertType,
const TDesC8 & aEncodedCertificate
) [private]

Second phase constructor for encoding.

Parameters

TCertificateType aCertType The encoded certificate type. ECertificateExtendedCerificate is not supported
const TDesC8 & aEncodedCertificate the encoded certificate used to create the object

EncodeASN1DERLC()

CASN1EncEncoding * EncodeASN1DERLC ( ) const

Creates the ASN1 DER sequence of the CertificateChoices object and leaves it on the cleanup stack.

NewL(const CX509Certificate &)

CCmsCertificateChoice * NewL ( const CX509Certificate & aCertificate ) [static]

Creates a CertificateChoices as defined in RFC2630.

Parameters

const CX509Certificate & aCertificate The X509 certificate used to build the CertificateChoices object. The newly created object will create a copy of aCertificate.

NewL(TCertificateType, const TDesC8 &)

CCmsCertificateChoice * NewL ( TCertificateType aCertType,
const TDesC8 & aEncodedCertificate
) [static]

Creates a CertificateChoices object as defined in RFC2630.

Parameters

TCertificateType aCertType The encoded certificate type. ECertificateExtendedCerificate is not supported.
const TDesC8 & aEncodedCertificate The encoded certificate used to build the CertificateChoices object. The newly created object will create a copy of aEncodedCertificate.

NewL(const TDesC8 &)

CCmsCertificateChoice * NewL ( const TDesC8 & aRawData ) [static]

Creates a CertificateChoices object as defined in RFC2630.

Parameters

const TDesC8 & aRawData The encoded CertificateChoices object to be decoded.

NewLC(const CX509Certificate &)

CCmsCertificateChoice * NewLC ( const CX509Certificate & aCertificate ) [static]

Creates a CertificateChoices object as defined in RFC2630 and leaves the object on the cleanup stack.

Parameters

const CX509Certificate & aCertificate The X509 certificate used to build the CertificateChoices object. The newly created object will create a copy of aCertificate.

NewLC(TCertificateType, const TDesC8 &)

CCmsCertificateChoice * NewLC ( TCertificateType aCertType,
const TDesC8 & aEncodedCertificate
) [static]

Creates a CertificateChoices object as defined in RFC2630 and leaves the object on the cleanup stack.

Parameters

TCertificateType aCertType The encoded certificate type. ECertificateExtendedCerificate is not supported.
const TDesC8 & aEncodedCertificate The encoded certificate used to build the CertificateChoices object. The newly created object will create a copy of aEncodedCertificate.

Member Enumerations Documentation

Enum TCertificateType

Certificate Types

Enumerators

ECertificateX509

X.509 Certificate.

ECertificateExtendedCerificate

Extended Certificate.

ECertificateAttribute

Attribute Certificate.

Member Data Documentation

CX509Certificate * iCertificate

CX509Certificate * iCertificate [private]

The X509 certificate pointer

TCertificateType iCertificateType

TCertificateType iCertificateType [private]

The type the embedded certificate type

HBufC8 * iEncodedAttributeCertificate

HBufC8 * iEncodedAttributeCertificate [private]

The attribute certificate buffer