#include <x509cert.h>
class CX509Certificate : public CCertificate |
Public Member Enumerations | |
---|---|
enum | anonymous { EVersionNumber, ESerialNumber, EAlgorithmId, EIssuerName, ..., EExtensionList } |
An X.509 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.
IMPORT_C | ~CX509Certificate | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
Reimplemented from CSignedObject::DataElementEncoding(const TUint)const
Gets the encoded data for the specified encoded data element (in the To Be Signed (TBS) certificate data structure) of the signed object.
Parameter | Description |
---|---|
aIndex | The encoded data element position in the TBSCertificate data structure. (See the CX509Certificate enumeration.) |
Returns: The encoded data for the specified data element of the signed object.
IMPORT_C const CX509CertExtension * | Extension | ( | const TDesC & | aExtensionName | ) | const |
Gets the certificate extension identified by the specified object identifier (OID).
Parameter | Description |
---|---|
aExtensionName | The OID identifying the extension. |
Returns: The certificate extension: Note that ownership is not transferred to the caller.
IMPORT_C const CArrayPtrFlat< CX509CertExtension > & | Extensions | ( | ) | const |
Gets all generic certificate extensions.
Returns: The certificate extensions.
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
Reimplemented from CSignedObject::InternalizeL(RReadStream &)
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.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
aCert | The X.509 certificate to be compared. |
Returns: ETrue, if the certificates are equal;EFalse, otherwise.
IMPORT_C TBool | IsSelfSignedL | ( | ) | const [virtual] |
Reimplemented from CCertificate::IsSelfSignedL()const
Tests whether the certificate is self-signed.
Returns: ETrue, if it is self-signed; EFalse, otherwise.
IMPORT_C HBufC * | IssuerL | ( | ) | const [virtual] |
Reimplemented from CCertificate::IssuerL()const
Gets the issuer of the certificate.
If the certificate has decoded the members from TeletexString then the return value may be incorrect because TeletexString type is not fully supported by this library. Instead the decode methods perform a direct conversion from 8 to 16bits by adding null characters in the second byte of each character. This will work as expected for cases where the string contains ASCII data.
Returns: 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.
If the certificate has decoded the members from TeletexString then the return value may be incorrect because TeletexString type is not fully supported by this library. Instead the decode methods perform a direct conversion from 8 to 16bits by adding null characters in the second byte of each character. This will work as expected for cases where the string contains ASCII data.
Returns: The X.500 Distinguished Name that identifies the issuer.
IMPORT_C TKeyIdentifier | KeyIdentifierL | ( | ) | const [virtual] |
Reimplemented from CCertificate::KeyIdentifierL()const
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.
Returns: 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.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
Returns: The new X.509 certificate object.
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.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
aPos | The offset position from which to start decoding. |
Returns: 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.
Parameter | Description |
---|---|
aStream | Stream from which the contents should be internalised. |
Returns: The new X.509 certificate object.
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.
Parameter | Description |
---|---|
aCert | The X.509 certificate to be copied. |
Returns: The new X.509 certificate object.
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.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
Returns: The new X.509 certificate object.
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.
Parameter | Description |
---|---|
aBinaryData | The encoded binary representation. |
aPos | The offset position from which to start decoding. |
Returns: 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.
Parameter | Description |
---|---|
aStream | Stream from which the contents should be internalised. |
Returns: The new X.509 certificate object.
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.
Parameter | Description |
---|---|
aCert | The X.509 certificate to be copied. |
Returns: The new X.509 certificate 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 TKeyIdentifier | SubjectKeyIdL | ( | ) | const |
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.
Returns: 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.
Returns: The subject key identifier for the certificate.
IMPORT_C HBufC * | SubjectL | ( | ) | const [virtual] |
Reimplemented from CCertificate::SubjectL()const
Gets the subject of the certificate.
If the certificate has decoded the members from TeletexString then the return value may be incorrect because TeletexString type is not fully supported by this library. Instead the decode methods perform a direct conversion from 8 to 16bits by adding null characters in the second byte of each character. This will work as expected for cases where the string contains ASCII data.
Returns: 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.
If the certificate has decoded the members from TeletexString then the return value may be incorrect because TeletexString type is not fully supported by this library. Instead the decode methods perform a direct conversion from 8 to 16bits by adding null characters in the second byte of each character. This will work as expected for cases where the string contains ASCII data.
Returns: The X.500 Distinguished Name that identifies the subject.
IMPORT_C TInt | Version | ( | ) | const |
Gets the version number of the certificate.
Returns: The version number of the certificate.