#include <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
:
Inherited from CBase
:
Inherited from CCertificate
:
Inherited from CSignedObject
:
Construction and destruction
IMPORT_C static 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
IMPORT_C static 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
NewL(const TDesC8 &,TInt &)
IMPORT_C static 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
NewLC(const TDesC8 &,TInt &)
IMPORT_C static 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
IMPORT_C static CWTLSCertificate* NewL(RReadStream &aStream);
Description
Creates a new CWTLSCertificate object from a stream.
The stream must have been written using the corresponding CSignedObject::ExternalizeL(RWriteStream &)const
function.
Parameters
Return value
IMPORT_C static 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 CSignedObject::ExternalizeL(RWriteStream &)const
function.
Parameters
Return value
NewL(const CWTLSCertificate &)
IMPORT_C static CWTLSCertificate* NewL(const CWTLSCertificate &aCert);
Description
Creates a new CWTLSCertificate object from an existing one in the certificate store.
Parameters
Return value
NewLC(const CWTLSCertificate &)
IMPORT_C static 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.
IsEqualL(const CWTLSCertificate &)const
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
IMPORT_C virtual TBool IsSelfSignedL() const;
Description
Tests whether a certificate is self-signed.
Return value
TBool
|
ETrue, if it is self-signed; EFalse, otherwise.
|
|
IMPORT_C virtual HBufC* SubjectL() const;
Description
Gets the subject.
Return value
HBufC16 *
|
A heap descriptor representing the subject.
|
|
IMPORT_C virtual HBufC* IssuerL() const;
Description
Gets the issuer.
Return value
HBufC16 *
|
A heap descriptor representing the issuer.
|
|
InternalizeL(RReadStream &)
IMPORT_C virtual 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
IMPORT_C virtual 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(const TUint)const
IMPORT_C virtual 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.
|
|