»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Security CERTMAN »
CWTLSCertificate
Location:
wtlscert.h
Link against: wtlscert.lib
class CWTLSCertificate : public CCertificate;
Description
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CCertificate
- A data structure that binds a public key to a given individual
CWTLSCertificate
- (No abstract)
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
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
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
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
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
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
Return value
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
Return value
static IMPORT_C CWTLSCertificate *NewL(const CWTLSCertificate &aCert);
Description
Creates a new CWTLSCertificate object from an existing one in the certificate store.
Parameters
Return value
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
Return value
IMPORT_C ~CWTLSCertificate();
Description
Destructor.
Frees all resources owned by the object, prior to its destruction.
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
Return value
TBool
|
ETrue, if the parameter is the same certificate; EFalse, otherwise.
|
|
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.
|
|
IMPORT_C const CWTLSName &IssuerName() const;
Description
Gets the name of the WTLS certificate's issuing authority.
Return value
IMPORT_C const CWTLSName &SubjectName() const;
Description
Gets the name of the owner of the public key the WTLS certificate contains.
Return value
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.
|
|
virtual IMPORT_C HBufC *SubjectL() const;
Description
Gets the subject.
Return value
HBufC *
|
A heap descriptor representing the subject.
|
|
virtual IMPORT_C HBufC *IssuerL() const;
Description
Gets the issuer.
Return value
HBufC *
|
A heap descriptor representing the issuer.
|
|
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
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.
|
|
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
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.
|
|