Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: x509cert.h
Link against: x509.lib

Class CX509Certificate

class CX509Certificate : public CCertificate;

Description

An X.509 certificate.

Derivation

Members

Defined in CX509Certificate:
DataElementEncoding(), EAlgorithmId, EExtensionList, EIssuerName, EIssuerUID, ESerialNumber, ESubjectName, ESubjectPublicKeyInfo, ESubjectUID, EValidityPeriod, EVersionNumber, Extension(), Extensions(), InternalizeL(), IsEqualL(), IsSelfSignedL(), IssuerL(), IssuerName(), KeyIdentifierL(), NewL(), NewL(), NewL(), NewL(), NewLC(), NewLC(), NewLC(), NewLC(), SignedDataL(), SubjectL(), SubjectName(), Version(), anonymous, ~CX509Certificate()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CCertificate:
PublicKey(), SerialNumber(), ValidityPeriod(), iSerialNumber, iSubjectPublicKeyInfo, iValidityPeriod

Inherited from CSignedObject:
Encoding(), ExternalizeL(), Fingerprint(), SetParametersL(), Signature(), SigningAlgorithm(), VerifySignatureL(), iEncoding, iFingerprint, iKeyFactory, iParameters, iSignature, iSigningAlgorithm


Construction and destruction


NewL()

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

Description

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

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

Return value

CX509Certificate *

The new X.509 certificate object.


NewLC()

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

Description

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

Initialises the object from its encoded binary form into an internal representation.

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

Return value

CX509Certificate *

The new X.509 certificate object.


NewL()

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

Description

Creates a new X.509 certificate 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

CX509Certificate *

The new X.509 certificate object.


NewLC()

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

Description

Creates a new X.509 certificate 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

CX509Certificate *

The new X.509 certificate object.


NewL()

static IMPORT_C CX509Certificate *NewL(RReadStream &aStream);

Description

Creates a new X.509 certificate object from the specified read stream.

Parameters

RReadStream &aStream

Stream from which the contents should be internalised.

Return value

CX509Certificate *

The new X.509 certificate object.


NewLC()

static IMPORT_C CX509Certificate *NewLC(RReadStream &aStream);

Description

Creates a new X.509 certificate object from the specified read stream, and puts a pointer to it onto the cleanup stack.

Construction is from the stream.

Parameters

RReadStream &aStream

Stream from which the contents should be internalised.

Return value

CX509Certificate *

The new X.509 certificate object.


NewL()

static IMPORT_C CX509Certificate *NewL(const CX509Certificate &aCert);

Description

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

This is equivalent to a copy constructor.

Parameters

const CX509Certificate &aCert

The X.509 certificate to be copied.

Return value

CX509Certificate *

The new X.509 certificate object.


NewLC()

static IMPORT_C CX509Certificate *NewLC(const CX509Certificate &aCert);

Description

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

This is equivalent to a copy constructor.

Parameters

const CX509Certificate &aCert

The X.509 certificate to be copied.

Return value

CX509Certificate *

The new X.509 certificate object.


~CX509Certificate()

IMPORT_C ~CX509Certificate();

Description

Destructor.

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

[Top]


Member functions


IsEqualL()

IMPORT_C TBool IsEqualL(const CX509Certificate &aCert) const;

Description

Tests whether the specified X.509 certificate is equal to this X.509 certificate.

X.509 certificates are equal if both the serial number and the issuer name are the same.

Parameters

const CX509Certificate &aCert

The X.509 certificate to be compared.

Return value

TBool

ETrue, if the certificates are equal;EFalse, otherwise.


SignedDataL()

virtual IMPORT_C const TPtrC8 SignedDataL() const;

Description

Gets the certificate's signed data.

Return value

const TPtrC8

A non-modifiable pointer descriptor representing the certificate's signed data.


Version()

IMPORT_C TInt Version() const;

Description

Gets the version number of the certificate.

Return value

TInt

The version number of the certificate.


IssuerName()

IMPORT_C const CX500DistinguishedName &IssuerName() const;

Description

Gets the X.500 Distinguished Name that identifies the issuer.

Return value

const CX500DistinguishedName &

The X.500 Distinguished Name that identifies the issuer.


SubjectName()

IMPORT_C const CX500DistinguishedName &SubjectName() const;

Description

Gets the X.500 Distinguished Name that identifies the subject.

Return value

const CX500DistinguishedName &

The X.500 Distinguished Name that identifies the subject.


Extensions()

IMPORT_C const CArrayPtrFlat< CX509CertExtension > &Extensions() const;

Description

Gets all generic certificate extensions.

Return value

const CArrayPtrFlat< CX509CertExtension > &

The certificate extensions.


Extension()

IMPORT_C const CX509CertExtension *Extension(const TDesC &aExtensionName) const;

Description

Gets the certificate extension identified by the specified object identifier (OID).

Parameters

const TDesC &aExtensionName

The OID identifying the extension.

Return value

const CX509CertExtension *

The certificate extension: Note that ownership is not transferred to the caller.


InternalizeL()

virtual IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalises an object of this class from a read stream.

The presence of this function means that the standard templated operator>>() can be used to internalise objects of this class.

Note that the function has assignment semantics. It replaces the old value of the object with a new value read from the read stream.

Parameters

RReadStream &aStream

Stream from which the object is to be internalised.


DataElementEncoding()

virtual IMPORT_C const TPtrC8 *DataElementEncoding(const TUint aIndex) const;

Description

Gets the encoded data for the specified encoded data element (in the To Be Signed (TBS) certificate data structure) of the signed object.

Parameters

const TUint aIndex

The encoded data element position in the TBSCertificate data structure. (See the CX509Certificate enumeration.)

Return value

const TPtrC8 *

The encoded data for the specified data element of the signed object.


IssuerL()

virtual IMPORT_C HBufC *IssuerL() const;

Description

Gets the issuer of the certificate.

Return value

HBufC *

A heap descriptor representing the issuer of the certificate.


SubjectL()

virtual IMPORT_C HBufC *SubjectL() const;

Description

Gets the subject of the certificate.

Return value

HBufC *

A heap descriptor representing the issuer of the certificate.


IsSelfSignedL()

virtual IMPORT_C TBool IsSelfSignedL() const;

Description

Tests whether the certificate is self-signed.

Return value

TBool

ETrue, if it is self-signed; EFalse, otherwise.


KeyIdentifierL()

virtual IMPORT_C TKeyIdentifier KeyIdentifierL() const;

Description

Gets the key identifier for the certificate.

Return value

TKeyIdentifier

The key identifier for the certificate.

[Top]


Member enumerations


Enum anonymous

n/a

Description

Enumerates values for encoded data element positions in the TBSCertificate data structure.

These values are to be used as parameters to the DataElementEncoding() function.

EVersionNumber

ESerialNumber

EAlgorithmId

EIssuerName

EValidityPeriod

ESubjectName

ESubjectPublicKeyInfo

EIssuerUID

ESubjectUID

EExtensionList