#include <wtlscert.h>
class CWTLSCertificate : public CCertificate |
Public Member Enumerations | |
---|---|
enum | anonymous { EVersionNumber, EAlgorithmId, EIssuerName, EValidityPeriod, ..., ESubjectPublicKeyInfo } |
Public Member Functions | |
---|---|
~CWTLSCertificate() | |
virtual IMPORT_C const TPtrC8 * | DataElementEncoding(const TUint) |
virtual IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C TBool | IsEqualL(const CWTLSCertificate &) |
virtual IMPORT_C TBool | IsSelfSignedL() |
IMPORT_C TBool | IsTCAL() |
virtual IMPORT_C HBufC * | IssuerL() |
IMPORT_C const CWTLSName & | IssuerName() |
IMPORT_C CWTLSCertificate * | NewL(const TDesC8 &) |
IMPORT_C CWTLSCertificate * | NewL(const TDesC8 &, TInt &) |
IMPORT_C CWTLSCertificate * | NewL(RReadStream &) |
IMPORT_C CWTLSCertificate * | NewL(const CWTLSCertificate &) |
IMPORT_C CWTLSCertificate * | NewLC(const TDesC8 &) |
IMPORT_C CWTLSCertificate * | NewLC(const TDesC8 &, TInt &) |
IMPORT_C CWTLSCertificate * | NewLC(RReadStream &) |
IMPORT_C CWTLSCertificate * | NewLC(const CWTLSCertificate &) |
virtual IMPORT_C const TPtrC8 | SignedDataL() |
virtual IMPORT_C HBufC * | SubjectL() |
IMPORT_C const CWTLSName & | SubjectName() |
IMPORT_C TInt | Version() |
IMPORT_C | ~CWTLSCertificate | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
Reimplemented from CSignedObject::DataElementEncoding(const TUint)const
Gets the encoding for a data element at the specified index.
Parameter | Description |
---|---|
aIndex | The position of the encoded data element. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
Reimplemented from CSignedObject::InternalizeL(RReadStream &)
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.
IMPORT_C TBool | IsEqualL | ( | const CWTLSCertificate & | aCert | ) | const |
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).
Parameter | Description |
---|---|
aCert | A WTLS certificate |
Returns: ETrue, if the parameter is the same certificate; EFalse, otherwise.
IMPORT_C TBool | IsSelfSignedL | ( | ) | const [virtual] |
Reimplemented from CCertificate::IsSelfSignedL()const
Tests whether a certificate is self-signed.
Returns: ETrue, if it is self-signed; EFalse, otherwise.
IMPORT_C TBool | IsTCAL | ( | ) | const |
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.
Returns: ETrue, if the certificate is capable of signing other certificates; otherwise, EFalse.
IMPORT_C HBufC * | IssuerL | ( | ) | const [virtual] |
Reimplemented from CCertificate::IssuerL()const
Gets the issuer.
Returns: A heap descriptor representing the issuer.
IMPORT_C const CWTLSName & | IssuerName | ( | ) | const |
Gets the name of the WTLS certificate's issuing authority.
Returns: A WTLS name: If the name is an X.500 DN, then if the name contains a Common name, that will be returned. Otherwise, if the name contains an Organization name, that will be returned. Otherwise an empty string will be returned. If the name is of type text, then if the name is not a 'structured' name the entire string will be returned, otherwise the same procedure will be followed as for X.509 certificates. If the name is null an empty string will be returned.
IMPORT_C CWTLSCertificate * | NewL | ( | const TDesC8 & | aBinaryData | ) | [static] |
Creates a new CWTLSCertificate object from the specified buffer containing the binary coded representation.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewL | ( | const TDesC8 & | aBinaryData, |
TInt & | aPos | |||
) | [static] |
Creates a new CWTLSCertificate object from the specified buffer containing the binary coded representation.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
aPos | An offset into the descriptor, and is updated to the position at the end of the object. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewL | ( | RReadStream & | aStream | ) | [static] |
Creates a new CWTLSCertificate object from a stream.
The stream must have been written using the corresponding ExternalizeL() function.
Parameter | Description |
---|---|
aStream | The stream to be used as input. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewL | ( | const CWTLSCertificate & | aCert | ) | [static] |
Creates a new CWTLSCertificate object from an existing one in the certificate store.
Parameter | Description |
---|---|
aCert | The certificate to be copied. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewLC | ( | const TDesC8 & | aBinaryData | ) | [static] |
Creates a new CWTLSCertificate object from the specified buffer containing the binary coded representation, and puts a pointer to it onto the cleanup stack.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewLC | ( | const TDesC8 & | aBinaryData, |
TInt & | aPos | |||
) | [static] |
Creates a new CWTLSCertificate object from the specified buffer containing the binary coded representation, and puts a pointer to it onto the cleanup stack.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
aPos | An offset into the descriptor, and is updated to the position at the end of the object. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewLC | ( | RReadStream & | aStream | ) | [static] |
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.
Parameter | Description |
---|---|
aStream | The stream to be used as input. |
Returns: The new CWTLSCertificate object.
IMPORT_C CWTLSCertificate * | NewLC | ( | const CWTLSCertificate & | aCert | ) | [static] |
Creates a new CWTLSCertificate object from an existing one in the certificate store, and puts a pointer to it onto the cleanup stack.
Parameter | Description |
---|---|
aCert | The certificate to be copied. |
Returns: The new CWTLSCertificate object.
IMPORT_C const TPtrC8 | SignedDataL | ( | ) | const [virtual] |
Reimplemented from CSignedObject::SignedDataL()const
Gets the certificate's signed data.
Returns: A non-modifiable pointer descriptor representing the certificate's signed data.
IMPORT_C HBufC * | SubjectL | ( | ) | const [virtual] |
Reimplemented from CCertificate::SubjectL()const
Gets the subject.
Returns: A heap descriptor representing the subject.
IMPORT_C const CWTLSName & | SubjectName | ( | ) | const |
Gets the name of the owner of the public key the WTLS certificate contains.
Returns: A WTLS name.
IMPORT_C TInt | Version | ( | ) | const |
Gets the version number of the WTLS certificate.
Returns: The version number of the certificate. Always returns 1.