class CX509Certificate : public CCertificate |
An X.509 certificate.
v6.0
Private Member Functions | |
---|---|
CX509Certificate() | |
void | ConstructCertL() |
void | ConstructL(const TDesC8 &, TInt &) |
void | ConstructL(const CX509Certificate &) |
void | DecodeExtsL(const TDesC8 &, TBool &) |
HBufC8 * | DecodeUidL(const TDesC8 &, TBool &) |
void | InitDataElementsL(const CX509Certificate &) |
Public Member Enumerations | |
---|---|
enum | anonymous { EVersionNumber = 0, ESerialNumber = 1, EAlgorithmId = 2, EIssuerName = 3, EValidityPeriod = 4, ESubjectName = 5, ESubjectPublicKeyInfo = 6, EIssuerUID = 7, ESubjectUID = 8, EExtensionList = 9 } |
IMPORT_C | ~CX509Certificate | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
void | ConstructL | ( | const CX509Certificate & | aCertificate | ) | [private] |
const CX509Certificate & aCertificate |
IMPORT_C const TPtrC8 * | DataElementEncoding | ( | const TUint | aIndex | ) | const [virtual] |
Gets the encoded data for the specified encoded data element (in the To Be Signed (TBS) certificate data structure) of the signed object.
The encoded data for the specified data element of the signed object.
v7.0
const TUint aIndex | The encoded data element position in the TBSCertificate data structure. (See the CX509Certificate enumeration.) |
void | DecodeExtsL | ( | const TDesC8 & | aBinaryData, |
TBool & | aHasElementAlready | |||
) | [private] |
HBufC8 * | DecodeUidL | ( | const TDesC8 & | aBinaryData, |
TBool & | aHasElementAlready | |||
) | [private] |
IMPORT_C const CX509CertExtension * | Extension | ( | const TDesC & | aExtensionName | ) | const |
Gets the certificate extension identified by the specified object identifier (OID).
The certificate extension: Note that ownership is not transferred to the caller.
const TDesC & aExtensionName | The OID identifying the extension. |
IMPORT_C const CArrayPtrFlat< CX509CertExtension > & | Extensions | ( | ) | const |
Gets all generic certificate extensions.
The certificate extensions.
void | InitDataElementsL | ( | const CX509Certificate & | aCertificate | ) | [private] |
const CX509Certificate & aCertificate |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
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.
RReadStream & aStream | Stream from which the object is to be internalised. |
IMPORT_C TBool | IsEqualL | ( | const CX509Certificate & | aCert | ) | const |
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.
ETrue, if the certificates are equal;EFalse, otherwise.
const CX509Certificate & aCert | The X.509 certificate to be compared. |
IMPORT_C TBool | IsSelfSignedL | ( | ) | const [virtual] |
Tests whether the certificate is self-signed.
ETrue, if it is self-signed; EFalse, otherwise.
IMPORT_C HBufC * | IssuerL | ( | ) | const [virtual] |
Gets the issuer of the certificate.
A heap descriptor representing the issuer of the certificate.
IMPORT_C const CX500DistinguishedName & | IssuerName | ( | ) | const |
Gets the X.500 Distinguished Name that identifies the issuer.
The X.500 Distinguished Name that identifies the issuer.
IMPORT_C TKeyIdentifier | KeyIdentifierL | ( | ) | const [virtual] |
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.
A unique key identifier for the certificate.
IMPORT_C CX509Certificate * | NewL | ( | const TDesC8 & | aBinaryData | ) | [static] |
Creates a new X.509 certificate object from the specified buffer containing the binary coded representation.
The new X.509 certificate object.
const TDesC8 & aBinaryData | The encoded binary representation. |
IMPORT_C CX509Certificate * | NewL | ( | const TDesC8 & | aBinaryData, |
TInt & | aPos | |||
) | [static] |
Creates a new X.509 certificate object from the specified buffer containing the binary coded representation, starting at the specified offset.
The new X.509 certificate object.
IMPORT_C CX509Certificate * | NewL | ( | RReadStream & | aStream | ) | [static] |
Creates a new X.509 certificate object from the specified read stream.
The new X.509 certificate object.
RReadStream & aStream | Stream from which the contents should be internalised. |
IMPORT_C CX509Certificate * | NewL | ( | const CX509Certificate & | aCert | ) | [static] |
Creates a new X.509 certificate object from an existing object.
This is equivalent to a copy constructor.
The new X.509 certificate object.
const CX509Certificate & aCert | The X.509 certificate to be copied. |
IMPORT_C CX509Certificate * | NewLC | ( | const TDesC8 & | aBinaryData | ) | [static] |
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.
The new X.509 certificate object.
const TDesC8 & aBinaryData | The encoded binary representation. |
IMPORT_C CX509Certificate * | NewLC | ( | const TDesC8 & | aBinaryData, |
TInt & | aPos | |||
) | [static] |
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.
The new X.509 certificate object.
IMPORT_C CX509Certificate * | NewLC | ( | RReadStream & | aStream | ) | [static] |
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.
The new X.509 certificate object.
RReadStream & aStream | Stream from which the contents should be internalised. |
IMPORT_C CX509Certificate * | NewLC | ( | const CX509Certificate & | aCert | ) | [static] |
Creates a new X.509 certificate object from an existing object.
This is equivalent to a copy constructor.
The new X.509 certificate object.
const CX509Certificate & aCert | The X.509 certificate to be copied. |
IMPORT_C const TPtrC8 | SignedDataL | ( | ) | const [virtual] |
Gets the certificate's signed data.
A non-modifiable pointer descriptor representing the certificate's signed data.
IMPORT_C TKeyIdentifier | SubjectKeyIdL | ( | ) |
Retrieves the subject key identifier of a certificate based on the decision whether it is a CA certificate or not. If it is a CA certificate then returns the stored subject key id as an extension in the certificate, any other certificate it returns the keyidentifier as calculated by Symbian's proprietary logic. The subject key identifier for the certificate.
IMPORT_C TKeyIdentifier | SubjectKeyIdentifierL | ( | ) | const |
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.
The subject key identifier for the certificate.
IMPORT_C HBufC * | SubjectL | ( | ) | const [virtual] |
Gets the subject of the certificate.
A heap descriptor representing the issuer of the certificate.
IMPORT_C const CX500DistinguishedName & | SubjectName | ( | ) | const |
Gets the X.500 Distinguished Name that identifies the subject.
The X.500 Distinguished Name that identifies the subject.
IMPORT_C TInt | Version | ( | ) | const |
Gets the version number of the certificate.
The version number of the certificate.
Enumerates values for encoded data element positions in the TBSCertificate data structure.
These values are to be used as parameters to the DataElementEncoding() function.
EVersionNumber = 0 | |
ESerialNumber = 1 | |
EAlgorithmId = 2 | |
EIssuerName = 3 | |
EValidityPeriod = 4 | |
ESubjectName = 5 | |
ESubjectPublicKeyInfo = 6 | |
EIssuerUID = 7 | |
ESubjectUID = 8 | |
EExtensionList = 9 |
TFixedArray< TPtrC8 *, KX509MaxDataElements > * | iDataElements | [private] |
CArrayPtrFlat< CX509CertExtension > * | iExtensions | [private] |