class CX509Certificate : public CCertificate |
An X.509 certificate.
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 } |
Private Attributes | |
---|---|
TFixedArray < TPtrC8 *, KX509MaxDataElements > * | iDataElements |
CArrayPtrFlat < CX509CertExtension > * | iExtensions |
CX500DistinguishedName * | iIssuerName |
HBufC8 * | iIssuerUid |
CX500DistinguishedName * | iSubjectName |
HBufC8 * | iSubjectUid |
TInt | iVersion |
IMPORT_C | ~CX509Certificate | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
void | ConstructL | ( | const TDesC8 & | aBinaryData, |
TInt & | aPos | |||
) | [private] |
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.
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).
const TDesC & aExtensionName | The OID identifying the extension. |
IMPORT_C const CArrayPtrFlat < CX509CertExtension > & | Extensions | ( | ) | const |
Gets all generic 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.
const CX509Certificate & aCert | The X.509 certificate to be compared. |
IMPORT_C TBool | IsSelfSignedL | ( | ) | const [virtual] |
Tests whether the certificate is self-signed.
IMPORT_C HBufC * | IssuerL | ( | ) | const [virtual] |
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.
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.
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.
IMPORT_C CX509Certificate * | NewL | ( | const TDesC8 & | aBinaryData | ) | [static] |
Creates a new X.509 certificate object from the specified buffer containing the binary coded representation.
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.
IMPORT_C CX509Certificate * | NewL | ( | RReadStream & | aStream | ) | [static] |
Creates a new X.509 certificate object from the specified read stream.
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.
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.
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.
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.
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.
const CX509Certificate & aCert | The X.509 certificate to be copied. |
IMPORT_C const TPtrC8 | SignedDataL | ( | ) | const [virtual] |
Gets 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.
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.
IMPORT_C HBufC * | SubjectL | ( | ) | const [virtual] |
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.
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.
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] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.