»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Security CERTMAN »
CX509Certificate
Location:
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
:
DataElementEncoding()
, EAlgorithmId
, EExtensionList
, EIssuerName
, EIssuerUID
, ESerialNumber
, ESubjectName
, ESubjectPublicKeyInfo
, ESubjectUID
, EValidityPeriod
, EVersionNumber
, Extension()
, Extensions()
, InternalizeL()
, IsEqualL()
, IsSelfSignedL()
, IssuerL()
, IssuerName()
, KeyIdentifierL()
, NewL()
, NewL()
, NewL()
, NewL()
, NewLC()
, NewLC()
, NewLC()
, NewLC()
, SignedDataL()
, SubjectL()
, SubjectName()
, Version()
, anonymous
, ~CX509Certificate()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CCertificate
:
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 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
static IMPORT_C 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
static IMPORT_C 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
static IMPORT_C 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
static IMPORT_C 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
static IMPORT_C 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
static IMPORT_C 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
static IMPORT_C 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.
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.
|
|
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.
|
|
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
IMPORT_C const CX509CertExtension *Extension(const TDesC &aExtensionName) const;
Description
Gets the certificate extension identified by the specified object identifier (OID).
Parameters
const TDesC &aExtensionName |
The OID identifying the extension.
|
|
Return value
const CX509CertExtension * |
The certificate extension: Note that ownership is not transferred to the caller.
|
|
virtual IMPORT_C 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>>()
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.
|
|
virtual IMPORT_C 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.
|
|
virtual IMPORT_C HBufC *IssuerL() const;
Description
Gets the issuer of the certificate.
Return value
HBufC *
|
A heap descriptor representing the issuer of the certificate.
|
|
virtual IMPORT_C HBufC *SubjectL() const;
Description
Gets the subject of the certificate.
Return value
HBufC *
|
A heap descriptor representing the issuer of the certificate.
|
|
virtual IMPORT_C TBool IsSelfSignedL() const;
Description
Tests whether the certificate is self-signed.
Return value
TBool
|
ETrue, if it is self-signed; EFalse, otherwise.
|
|
virtual IMPORT_C TKeyIdentifier KeyIdentifierL() const;
Description
Gets the key identifier for the certificate.
Return value
TKeyIdentifier |
The 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 DataElementEncoding()
function.