CSignedObject Class Reference

#include <signed.h>

Link against: crypto.lib

class CSignedObject : public CBase

Inherits from

  • CSignedObject

    Detailed Description

    Base class for certificates.

    Since
    v6.0

    Member Attribute Documentation

    iEncoding

    HBufC8 *iEncoding[protected]

    A heap descriptor representing the entire encoding.

    iFingerprint

    HBufC8 *iFingerprint[protected]

    The fingerprint.

    The SHA1 hash of the encoding of the entire object.

    iKeyFactory

    TKeyFactory *iKeyFactory[protected]

    A pointer to a key factory object.

    iParameters

    CSigningKeyParameters *iParameters[protected]

    The signing key parameters

    iSignature

    HBufC8 *iSignature[protected]

    The digital signature.

    iSigningAlgorithm

    CSigningAlgorithmIdentifier *iSigningAlgorithm[protected]

    The signing algorithm ID.

    Constructor & Destructor Documentation

    ~CSignedObject ( )

    IMPORT_C~CSignedObject()

    Destructor.

    Frees all resources owned by the object.

    Member Function Documentation

    DataElementEncoding ( const TUint )

    IMPORT_C const TPtrC8 *DataElementEncoding(const TUintaIndex)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.

    ParameterDescription
    aIndexThe encoded data element position in the tbsCertificate data structure. See the enumeration: CX509Certificate::Anonymous.

    Returns: The encoded data for the specified data element of the signed object.

    Encoding ( )

    IMPORT_C const TPtrC8Encoding()const

    Gets the entire encoding.

    Returns: A non-modifiable pointer descriptor representing the entire encoding.

    ExternalizeL ( RWriteStream & )

    IMPORT_C voidExternalizeL(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.

    ParameterDescription
    aStreamStream to which the object should be externalised.

    Fingerprint ( )

    IMPORT_C const TPtrC8Fingerprint()const

    Gets the fingerprint.

    The fingerprint returned is the SHA1 hash of the encoding of the entire object.

    Returns: A non-modifiable pointer descriptor representing the finger print.

    InternalizeL ( RReadStream & )

    IMPORT_C voidInternalizeL(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.

    ParameterDescription
    aStreamStream from which the contents of the field should be internalised.

    SetParametersL ( const CSigningKeyParameters & )

    IMPORT_C voidSetParametersL(const CSigningKeyParameters &aParameters)

    Sets the signing key parameters.

    ParameterDescription
    aParametersThe signing key parameters.

    Signature ( )

    IMPORT_C const TPtrC8Signature()const

    Gets the digital signature.

    Returns: A non-modifiable pointer descriptor representing the digital signature.

    SignedDataL ( )

    IMPORT_C const TPtrC8SignedDataL()const [pure virtual]

    Gets the signed data.

    Returns: A non-modifiable pointer descriptor representing the signed data.

    SigningAlgorithm ( )

    IMPORT_C const CSigningAlgorithmIdentifier &SigningAlgorithm()const

    Gets the signing algorithm ID used.

    Returns: The signing algorithm ID.

    VerifyRSASignatureL ( const TDesC8 & )

    TBool VerifyRSASignatureL(const TDesC8 &aEncodedKey)const [protected]

    Verifies a RSA signature using the specified encoded key.

    ParameterDescription
    aEncodedKeyThe encoded key.

    Returns: ETrue if the signature is valid, otherwise EFalse.

    VerifyRSASignatureL ( const TDesC8 &, const TDesC8 & )

    TBool VerifyRSASignatureL(const TDesC8 &aEncodedKey,
    const TDesC8 &aHash
    )const [protected]

    VerifySignatureL ( const TDesC8 & )

    IMPORT_C TBoolVerifySignatureL(const TDesC8 &aEncodedKey)const

    Verifies a signature using the specified encoded key.

    ParameterDescription
    aEncodedKeyThe encoded key.

    Returns: ETrue if the signature is valid, otherwise EFalse.

    VerifySignatureL ( const TDesC8 &, const TDesC8 & )

    IMPORT_C TBoolVerifySignatureL(const TDesC8 &aEncodedKey,
    const TDesC8 &aHash
    )const

    Verifies a signature using the specified encoded key and hash.

    ParameterDescription
    aEncodedKeyThe encoded key.
    aHashThe hash of the data to be validated.

    Returns: ETrue if the signature is valid, otherwise EFalse.