Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: wtlscert.h
Link against: wtlscert.lib

Class CWTLSCertificate

class CWTLSCertificate : public CCertificate;

Description

Derivation

Members

Defined in CWTLSCertificate:
DataElementEncoding(), EAlgorithmId, EIssuerName, ESubjectName, ESubjectPublicKeyInfo, EValidityPeriod, EVersionNumber, InternalizeL(), IsEqualL(), IsSelfSignedL(), IsTCAL(), IssuerL(), IssuerName(), NewL(), NewL(), NewL(), NewL(), NewLC(), NewLC(), NewLC(), NewLC(), SignedDataL(), SubjectL(), SubjectName(), Version(), anonymous, ~CWTLSCertificate()

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

Inherited from CCertificate:
KeyIdentifierL(), 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 CWTLSCertificate *NewL(const TDesC8 &aBinaryData);

Description

Creates a new CWTLSCertificate object from the specified buffer containing the binary coded representation.

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


NewLC()

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

Description

Creates a new CWTLSCertificate 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

CWTLSCertificate *

The new CWTLSCertificate object.


NewL()

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

Description

Creates a new CWTLSCertificate object from the specified buffer containing the binary coded representation.

Parameters

const TDesC8 &aBinaryData

The encoded binary representation.

TInt &aPos

An offset into the descriptor, and is updated to the position at the end of the object.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


NewLC()

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

Description

Creates a new CWTLSCertificate 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.

TInt &aPos

An offset into the descriptor, and is updated to the position at the end of the object.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


NewL()

static IMPORT_C CWTLSCertificate *NewL(RReadStream &aStream);

Description

Creates a new CWTLSCertificate object from a stream.

The stream must have been written using the corresponding ExternalizeL() function.

Parameters

RReadStream &aStream

The stream to be used as input.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


NewLC()

static IMPORT_C CWTLSCertificate *NewLC(RReadStream &aStream);

Description

Creates a new CWTLSCertificate object from a stream, and puts a pointer to it onto the cleanup stack.

The stream must have been written using the corresponding ExternalizeL() function.

Parameters

RReadStream &aStream

The stream to be used as input.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


NewL()

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

Description

Creates a new CWTLSCertificate object from an existing one in the certificate store.

Parameters

const CWTLSCertificate &aCert

The certificate to be copied.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


NewLC()

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

Description

Creates a new CWTLSCertificate object from an existing one in the certificate store, and puts a pointer to it onto the cleanup stack.

Parameters

const CWTLSCertificate &aCert

The certificate to be copied.

Return value

CWTLSCertificate *

The new CWTLSCertificate object.


~CWTLSCertificate()

IMPORT_C ~CWTLSCertificate();

Description

Destructor.

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

[Top]


Member functions


IsEqualL()

IMPORT_C TBool IsEqualL(const CWTLSCertificate &aCert) const;

Description

Tests whether this WTLS certificate is the same as the specified WTLS certificate.

This is not a simple as it sounds. For X.509 certificates equality means that the issuer name and serial number fields are the same. This guarantees equality since a CA must ensure that every certificate it issues has a unique serial number. But WTLS certificates do not include serial numbers, so there seems to be no definition of equality. This function uses a byte-for-byte comparison of the signatures on the certificates: this should not result in any false positives, but may give false negatives if CAs do naughty things like recertifying the same key (which they have been known to do).

Parameters

const CWTLSCertificate &aCert

A WTLS certificate

Return value

TBool

ETrue, if the parameter is the same certificate; EFalse, otherwise.


Version()

IMPORT_C TInt Version() const;

Description

Gets the version number of the WTLS certificate.

Return value

TInt

The version number of the certificate. Always returns 1.


IssuerName()

IMPORT_C const CWTLSName &IssuerName() const;

Description

Gets the name of the WTLS certificate's issuing authority.

Return value

const CWTLSName &

A WTLS name:


SubjectName()

IMPORT_C const CWTLSName &SubjectName() const;

Description

Gets the name of the owner of the public key the WTLS certificate contains.

Return value

const CWTLSName &

A WTLS name.


IsSelfSignedL()

virtual IMPORT_C TBool IsSelfSignedL() const;

Description

Tests whether a certificate is self-signed.

Return value

TBool

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


SubjectL()

virtual IMPORT_C HBufC *SubjectL() const;

Description

Gets the subject.

Return value

HBufC *

A heap descriptor representing the subject.


IssuerL()

virtual IMPORT_C HBufC *IssuerL() const;

Description

Gets the issuer.

Return value

HBufC *

A heap descriptor representing the issuer.


InternalizeL()

virtual IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Initialises the certificate from a stream.

This should not be called by client code; instead the static factory function above should be used. If a client is using the certstore component for storage then it should use CCertStore::AddL() for externalizing and CWTLSCert::NewL(CCertStore& aStore, const CCertStoreEntry& aEntry); for restoring.

Parameters

RReadStream &aStream


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.


DataElementEncoding()

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

Description

Gets the encoding for a data element at the specified index.

Parameters

const TUint aIndex

The position of the encoded data element.

Return value

const TPtrC8 *


IsTCAL()

IMPORT_C TBool IsTCAL() const;

Description

Tests whether a non-selfsigned certificate can be used to sign others.

Currently this only supports structured text variety of WTLS certificates. Other certificate types will return EFalse.

Return value

TBool

ETrue, if the certificate is capable of signing other certificates; otherwise, EFalse.

[Top]


Member enumerations


Enum anonymous

n/a

Description

EVersionNumber

EAlgorithmId

EIssuerName

EValidityPeriod

ESubjectName

ESubjectPublicKeyInfo