CX509Certificate Class Reference
class CX509Certificate : public CCertificate |
Constructor & Destructor Documentation
CX509Certificate()
CX509Certificate | ( | ) | [private] |
~CX509Certificate()
IMPORT_C | ~CX509Certificate | ( | ) | |
Destructor.
Frees all resources owned by the object, prior to its destruction.
Member Functions Documentation
ConstructCertL()
void | ConstructCertL | ( | ) | [private] |
ConstructL(const TDesC8 &, TInt &)
void | ConstructL | ( | const TDesC8 & | aBinaryData, |
| TInt & | aPos |
| ) | [private] |
ConstructL(const CX509Certificate &)
DataElementEncoding(const TUint)
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.
Parameters
const TUint aIndex | The encoded data element position in the TBSCertificate data structure. (See the CX509Certificate enumeration.) |
DecodeExtsL(const TDesC8 &, TBool &)
void | DecodeExtsL | ( | const TDesC8 & | aBinaryData, |
| TBool & | aHasElementAlready |
| ) | [private] |
DecodeUidL(const TDesC8 &, TBool &)
Extension(const TDesC &)
Gets the certificate extension identified by the specified object identifier (OID).
Parameters
const TDesC & aExtensionName | The OID identifying the extension. |
Extensions()
Gets all generic certificate extensions.
InitDataElementsL(const CX509Certificate &)
InternalizeL(RReadStream &)
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.
Parameters
RReadStream & aStream | Stream from which the object is to be internalised. |
IsEqualL(const CX509Certificate &)
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.
IsSelfSignedL()
IMPORT_C TBool | IsSelfSignedL | ( | ) | const [virtual] |
Tests whether the certificate is self-signed.
IssuerL()
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.
IssuerName()
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.
KeyIdentifierL()
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.
NewL(const TDesC8 &)
Creates a new X.509 certificate object from the specified buffer containing the binary coded representation.
Parameters
const TDesC8 & aBinaryData | The encoded binary representation. |
NewL(const TDesC8 &, TInt &)
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. |
NewL(RReadStream &)
Creates a new X.509 certificate object from the specified read stream.
Parameters
RReadStream & aStream | Stream from which the contents should be internalised. |
NewL(const CX509Certificate &)
Creates a new X.509 certificate object from an existing object.
This is equivalent to a copy constructor.
NewLC(const TDesC8 &)
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. |
NewLC(const TDesC8 &, TInt &)
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. |
NewLC(RReadStream &)
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. |
NewLC(const CX509Certificate &)
Creates a new X.509 certificate object from an existing object.
This is equivalent to a copy constructor.
SignedDataL()
IMPORT_C const TPtrC8 | SignedDataL | ( | ) | const [virtual] |
Gets the certificate's signed data.
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.
SubjectKeyIdentifierL()
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.
SubjectL()
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.
SubjectName()
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.
Version()
IMPORT_C TInt | Version | ( | ) | const |
Gets the version number of the certificate.
Member Enumerations Documentation
Enum anonymous
Enumerates values for encoded data element positions in the TBSCertificate data structure.
These values are to be used as parameters to the DataElementEncoding() function.
Enumerators
EVersionNumber = 0 | |
ESerialNumber = 1 | |
EAlgorithmId = 2 | |
EIssuerName = 3 | |
EValidityPeriod = 4 | |
ESubjectName = 5 | |
ESubjectPublicKeyInfo = 6 | |
EIssuerUID = 7 | |
ESubjectUID = 8 | |
EExtensionList = 9 | |
Member Data Documentation
TFixedArray< TPtrC8 *, KX509MaxDataElements > * iDataElements
CArrayPtrFlat< CX509CertExtension > * iExtensions
CX500DistinguishedName * iIssuerName
CX500DistinguishedName * iSubjectName
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.