class CSignedObject : public CBase |
Base class for certificates.
v6.0
Public Member Functions | |
---|---|
~CSignedObject() | |
IMPORT_C const TPtrC8 * | DataElementEncoding(const TUint) |
IMPORT_C const TPtrC8 | Encoding() |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C const TPtrC8 | Fingerprint() |
IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C void | SetParametersL(const CSigningKeyParameters &) |
IMPORT_C const TPtrC8 | Signature() |
IMPORT_C const TPtrC8 | SignedDataL() |
IMPORT_C const CSigningAlgorithmIdentifier & | SigningAlgorithm() |
IMPORT_C TBool | VerifySignatureL(const TDesC8 &) |
IMPORT_C TBool | VerifySignatureL(const TDesC8 &, const TDesC8 &) |
Protected Member Functions | |
---|---|
TBool | VerifyRSASignatureL(const TDesC8 &) |
TBool | VerifyRSASignatureL(const TDesC8 &, const TDesC8 &) |
Protected Attributes | |
---|---|
HBufC8 * | iEncoding |
HBufC8 * | iFingerprint |
TKeyFactory * | iKeyFactory |
CSigningKeyParameters * | iParameters |
HBufC8 * | iSignature |
CSigningAlgorithmIdentifier * | iSigningAlgorithm |
IMPORT_C const TPtrC8 * | DataElementEncoding | ( | const TUint | aIndex | ) | const [pure virtual] |
Gets the encoded data for the specified encoded data element, in the (to be signed) tbsCertificate data structure, of the signed object.
The encoded data for the specified data element of the signed object.
const TUint aIndex | The encoded data element position in the tbsCertificate data structure. See the enumeration: CX509Certificate::Anonymous. |
IMPORT_C const TPtrC8 | Encoding | ( | ) | const |
Gets the entire encoding.
A non-modifiable pointer descriptor representing the entire encoding.
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
Externalises the encoding of the entire object to a write stream.
The fingerprint and the signed data can be regenerated after restoration.
The presence of this function means that the standard templated operator<<() can be used to externalise objects of this class.
RWriteStream & aStream | Stream to which the object should be externalised. |
IMPORT_C const TPtrC8 | Fingerprint | ( | ) | const |
Gets the fingerprint.
The fingerprint returned is the SHA1 hash of the encoding of the entire object.
A non-modifiable pointer descriptor representing the finger print.
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) | [pure virtual] |
Internalises the encoded object from a read stream.
The class makes use of a specification-specific parser class for extracting the various elements, that is provided by a subclass of CSignedObject. For this reason this function is pure virtual.
The presence of this function means that the standard templated operator>>() can be used to internalise objects of this class.
RReadStream & aStream | Stream from which the contents of the field should be internalised. |
IMPORT_C void | SetParametersL | ( | const CSigningKeyParameters & | aParameters | ) |
Sets the signing key parameters.
const CSigningKeyParameters & aParameters | The signing key parameters. |
IMPORT_C const TPtrC8 | Signature | ( | ) | const |
Gets the digital signature.
A non-modifiable pointer descriptor representing the digital signature.
IMPORT_C const TPtrC8 | SignedDataL | ( | ) | const [pure virtual] |
Gets the signed data.
A non-modifiable pointer descriptor representing the signed data.
IMPORT_C const CSigningAlgorithmIdentifier & | SigningAlgorithm | ( | ) | const |
Gets the signing algorithm ID used.
The signing algorithm ID.
TBool | VerifyRSASignatureL | ( | const TDesC8 & | aEncodedKey | ) | const [protected] |
Verifies a RSA signature using the specified encoded key.
ETrue if the signature is valid, otherwise EFalse.
const TDesC8 & aEncodedKey | The encoded key. |
TBool | VerifyRSASignatureL | ( | const TDesC8 & | aEncodedKey, |
const TDesC8 & | aHash | |||
) | const [protected] |
IMPORT_C TBool | VerifySignatureL | ( | const TDesC8 & | aEncodedKey | ) | const |
Verifies a signature using the specified encoded key.
ETrue if the signature is valid, otherwise EFalse.
const TDesC8 & aEncodedKey | The encoded key. |
IMPORT_C TBool | VerifySignatureL | ( | const TDesC8 & | aEncodedKey, |
const TDesC8 & | aHash | |||
) | const |
Verifies a signature using the specified encoded key and hash.
ETrue if the signature is valid, otherwise EFalse.
HBufC8 * | iFingerprint | [protected] |
The fingerprint.
The SHA1 hash of the encoding of the entire object.
CSigningKeyParameters * | iParameters | [protected] |
The signing key parameters
CSigningAlgorithmIdentifier * | iSigningAlgorithm | [protected] |
The signing algorithm ID.