#include <x509cert.h>
Link against:
x509.lib
class CX509Certificate : public CCertificate;
Description
An X.509 certificate.
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.
CX509Certificate
- An X.509 certificate.
Members
Defined in CX509Certificate
:
Inherited from CBase
:
Inherited from CCertificate
:
Inherited from CSignedObject
:
Construction and destruction
IMPORT_C static 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
IMPORT_C static 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
NewL(const TDesC8 &,TInt &)
IMPORT_C static 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
NewLC(const TDesC8 &,TInt &)
IMPORT_C static 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
IMPORT_C static 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
IMPORT_C static 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
NewL(const CX509Certificate &)
IMPORT_C static 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
Return value
NewLC(const CX509Certificate &)
IMPORT_C static 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
Return value
IMPORT_C ~CX509Certificate();
Description
Destructor.
Frees all resources owned by the object, prior to its destruction.
IsEqualL(const CX509Certificate &)const
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
Return value
TBool
|
ETrue, if the certificates are equal;EFalse, otherwise.
|
|
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.
|
|
IMPORT_C TInt Version() const;
Description
Gets the version number of the certificate.
Return value
TInt
|
The version number of the certificate.
|
|
IMPORT_C const CX500DistinguishedName& IssuerName() const;
Description
Gets the X.500 Distinguished Name that identifies the issuer.
Return value
IMPORT_C const CX500DistinguishedName& SubjectName() const;
Description
Gets the X.500 Distinguished Name that identifies the subject.
Return value
IMPORT_C const CArrayPtrFlat< CX509CertExtension >& Extensions() const;
Description
Gets all generic certificate extensions.
Return value
Extension(const TDesC &)const
IMPORT_C const CX509CertExtension* Extension(const TDesC &aExtensionName) const;
Description
Gets the certificate extension identified by the specified object identifier (OID).
Parameters
const TDesC16 &aExtensionName |
The OID identifying the extension.
|
|
Return value
const CX509CertExtension * |
The certificate extension: Note that ownership is not transferred to the caller.
|
|
InternalizeL(RReadStream &)
IMPORT_C virtual 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>>(RReadStream &,T &)
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(const TUint)const
IMPORT_C virtual 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.
|
|
IMPORT_C virtual HBufC* IssuerL() const;
Description
Gets the issuer of the certificate.
Return value
HBufC16 *
|
A heap descriptor representing the issuer of the certificate.
|
|
IMPORT_C virtual HBufC* SubjectL() const;
Description
Gets the subject of the certificate.
Return value
HBufC16 *
|
A heap descriptor representing the issuer of the certificate.
|
|
IMPORT_C virtual TBool IsSelfSignedL() const;
Description
Tests whether the certificate is self-signed.
Return value
TBool
|
ETrue, if it is self-signed; EFalse, otherwise.
|
|
IMPORT_C virtual TKeyIdentifier KeyIdentifierL() const;
Description
Gets a key identifier for the certificate. This is a unique identifier, calculated according to the recommended method of
computing it from RFC3280, section 4.2.1.2. Please note that this method does NOT return the value of the Subject Key Id extension,
if it is present.
Return value
TBuf8
|
A unique key identifier for the certificate.
|
|
SubjectKeyIdentifierL()const
IMPORT_C TKeyIdentifier SubjectKeyIdentifierL() const;
Description
Gets the subject key identifier for the certificate. This identifier is extracted from the certificate (if the corresponding
extension exists), or calculated (if the extension doesn't exist). If calculated, the recommendation from section 4.2.1.2,
RFC3280 is used (hash of the public key). Please note, that for subject key ids extracted from the certificate there is a
length limit - if the extension is longer than 160 bits, it is ignored and the value is calculated instead.
Return value
TBuf8
|
The subject key identifier for the certificate.
|
|
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 CX509Certificate::DataElementEncoding(const TUint)const
function.