Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <x509cert.h>
Link against: x509.lib

Class CX509CertExtension

class CX509CertExtension : public CBase;

Description

A generic X.509 certificate extension.

The creation of a generic extension is the first step in the creation of a specific extension. Client code gets the decoded Object Identifier (OID) encapsulated by an instance of this class and uses it to create the specific extension.

Consists of an any-defined-by structure along with a boolean flag saying whether the extension is critical or not.

Derivation

Members

Defined in CX509CertExtension:

Inherited from CBase:


Construction and destruction


NewL(const CX509CertExtension &)

IMPORT_C static CX509CertExtension* NewL(const CX509CertExtension &aExtension);

Description

Creates a new generic X.509 certificate extension object from an existing object.

This is equivalent to a copy constructor.

Parameters

const CX509CertExtension &aExtension

The generic certificate extension to be copied.

Return value

CX509CertExtension *

The new generic certificate extension object.


NewLC(const CX509CertExtension &)

IMPORT_C static CX509CertExtension* NewLC(const CX509CertExtension &aExtension);

Description

Creates a new generic X.509 certificate extension object from an existing object, and puts a pointer to it onto the cleanup stack.

This is equivalent to a copy constructor.

Parameters

const CX509CertExtension &aExtension

The generic certificate extension to be copied.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


NewL(const TDesC8 &)

IMPORT_C static CX509CertExtension* NewL(const TDesC8 &aBinaryData);

Description

Creates a new generic X.509 certificate extension object from the specified buffer containing the binary coded representation.

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


NewLC(const TDesC8 &)

IMPORT_C static CX509CertExtension* NewLC(const TDesC8 &aBinaryData);

Description

Creates a new generic X.509 certificate extension object from the specified buffer containing the binary coded representation, and puts a pointer to it onto the cleanup stack .

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


NewL(const TDesC8 &,TInt &)

IMPORT_C static CX509CertExtension* NewL(const TDesC8 &aBinaryData, TInt &aPos);

Description

Creates a new generic X.509 certificate extension object from the specified buffer containing the binary coded representation, starting at the specified offset.

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

TInt &aPos

The offset position from which to start decoding.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


NewLC(const TDesC8 &,TInt &)

IMPORT_C static CX509CertExtension* NewLC(const TDesC8 &aBinaryData, TInt &aPos);

Description

Creates a new generic X.509 certificate extension object from the specified buffer containing the binary coded representation, starting at the specified offset, and puts a pointer to it onto the cleanup stack.

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

TInt &aPos

The offset position from which to start decoding.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


NewL(const TDesC &,const TBool,const TDesC8 &)

IMPORT_C static CX509CertExtension* NewL(const TDesC &aCertExtOID, const TBool aCritical, const TDesC8 &aCertExtValue);

Description

Creates a new generic X.509 certificate extension object from the specified extension object id, the critcal flag and the extension data.

Parameters

const TDesC16 &aCertExtOID

The OID of the certficate extension.

const TBool aCritical

Flag to convey criticality of the extension.

const TDesC8 &aCertExtValue

The data of the specific extension.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


NewLC(const TDesC &,const TBool,const TDesC8 &)

IMPORT_C static CX509CertExtension* NewLC(const TDesC &aCertExtOID, const TBool aCritical, const TDesC8 &aCertExtValue);

Description

Creates a new generic X.509 certificate extension object from the specified extension object id, the critcal flag and the extension data, and puts a pointer to it onto the cleanup stack.

Parameters

const TDesC16 &aCertExtOID

The OID of the certficate extension.

const TBool aCritical

Flag to convey criticality of the extension.

const TDesC8 &aCertExtValue

The data of the specific extension.

Return value

CX509CertExtension *

The new generic X.509 certificate extension object.


~CX509CertExtension()

IMPORT_C ~CX509CertExtension();

Description

Destructor.

Frees all resources owned by the object, prior to its destruction.

[Top]


Member functions


Critical()const

IMPORT_C TBool Critical() const;

Description

Tests whether certificate processing code must process this extension for certificate validation to succeed.

Return value

TBool

ETrue, if this extension must be processed for validation to succeed; EFalse, otherwise.


Id()const

IMPORT_C TPtrC Id() const;

Description

Gets the Object Identifier (OID) of the certficate extension.

Return value

TPtrC16

The OID of the certficate extension.


Data()const

IMPORT_C TPtrC8 Data() const;

Description

Gets the encoded binary representation of the specific extension.

Return value

TPtrC8

A pointer descriptor representing the specific extension.


EncodeASN1DERLC()const

IMPORT_C CASN1EncSequence* EncodeASN1DERLC() const;

Description

Creates and returns a DER encoded X.509 certificate extension object in the form of a ASN.1 Sequence and puts it onto the cleanup stack. This method can be called repeatedly to get copies of the sequence.

Return value

CASN1EncSequence *

A pointer to a DER encoded ASN.1 sequence