CCmsSignerInfo Class Reference

class CCmsSignerInfo : public CBase

Represents CMS signer information as defined in RFC2630. SignedAttributes and UnsignedAttributes are not supported.

Inherits from

Public Member Functions
~CCmsSignerInfo ()
IMPORT_C const CX509AlgorithmIdentifier & DigestAlgorithm ()
CASN1EncSequence * EncodeASN1DERLC ()
IMPORT_C TBool IsSignedAttributesPresent ()
IMPORT_C TBool IsUnsignedAttributesPresent ()
CCmsSignerInfo * NewL (const TDesC8 &, TBool , const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
CCmsSignerInfo * NewL (const TDesC8 &, TBool , const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
CCmsSignerInfo * NewL (const TDesC8 &)
CCmsSignerInfo * NewLC (const TDesC8 &, TBool , const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
CCmsSignerInfo * NewLC (const TDesC8 &, TBool , const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
CCmsSignerInfo * NewLC (const TDesC8 &)
IMPORT_C const CX509AlgorithmIdentifier & SignatureAlgorithm ()
IMPORT_C const TPtrC8 SignatureValue ()
IMPORT_C const CCmsSignerIdentifier & SignerIdentifier ()
IMPORT_C TInt Version ()
Private Member Functions
CCmsSignerInfo ()
void ConstructL (const TDesC8 &, TBool , const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
void ConstructL (const TDesC8 &, TBool , const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
void ConstructL (const TDesC8 &)
void DecodeEncryptedDigestL (const TDesC8 &)
void DecodeSignerIdentifierL (const TDesC8 &)
CASN1EncBase * EncodeSignerIdentifierLC ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CX509AlgorithmIdentifier * iDigestAlgorithm
CX509AlgorithmIdentifier * iSignatureAlgorithm
HBufC8 * iSignatureValue
TBool iSignedAttributesPresent
CCmsSignerIdentifier * iSignerIdentifier
TBool iUnsignedAttributesPresent
TInt iVersion

Constructor & Destructor Documentation

CCmsSignerInfo()

CCmsSignerInfo ( ) [private]

Constructor.

~CCmsSignerInfo()

~CCmsSignerInfo ( ) [virtual]

Member Functions Documentation

ConstructL(const TDesC8 &, TBool, const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)

void ConstructL ( const TDesC8 & aDataToBeSigned,
TBool aIsHash,
const CDSAPrivateKey & aKey,
CCmsSignerIdentifier * aSignerIdentifier,
CX509AlgorithmIdentifier * aDigestAlgorithm,
CX509AlgorithmIdentifier * aSignatureAlgorithm
) [private]

second phase constructor

Parameters

const TDesC8 & aDataToBeSigned the data or its hash
TBool aIsHash a flag to represent if the first paramter is hash or data content
const CDSAPrivateKey & aKey the DSA private key used to create the signature.
CCmsSignerIdentifier * aSignerIdentifier the signer identifier.
CX509AlgorithmIdentifier * aDigestAlgorithm the digest algorithm used to create hash.
CX509AlgorithmIdentifier * aSignatureAlgorithm the signature alogorithm to create signature

ConstructL(const TDesC8 &, TBool, const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)

void ConstructL ( const TDesC8 & aDataToBeSigned,
TBool aIsHash,
const CRSAPrivateKey & aKey,
CCmsSignerIdentifier * aSignerIdentifier,
CX509AlgorithmIdentifier * aDigestAlgorithm,
CX509AlgorithmIdentifier * aSignatureAlgorithm
) [private]

second phase constructor

Parameters

const TDesC8 & aDataToBeSigned the data or its hash
TBool aIsHash a flag to represent if the first paramter is hash or data content
const CRSAPrivateKey & aKey the RSA private key used to create the signature.
CCmsSignerIdentifier * aSignerIdentifier the signer identifier.
CX509AlgorithmIdentifier * aDigestAlgorithm the digest algorithm used to create hash.
CX509AlgorithmIdentifier * aSignatureAlgorithm the signature alogorithm to create signature.

ConstructL(const TDesC8 &)

void ConstructL ( const TDesC8 & aRawData ) [private]

Second phase constructor

Parameters

const TDesC8 & aRawData the encoded the CMS content info

DecodeEncryptedDigestL(const TDesC8 &)

void DecodeEncryptedDigestL ( const TDesC8 & aRawData ) [private]

Decode the signature

Parameters

const TDesC8 & aRawData the encoded signature

DecodeSignerIdentifierL(const TDesC8 &)

void DecodeSignerIdentifierL ( const TDesC8 & aRawData ) [private]

Decode the signer identifier

Parameters

const TDesC8 & aRawData the encoded signer identifier

DigestAlgorithm()

IMPORT_C const CX509AlgorithmIdentifier & DigestAlgorithm ( ) const

Returns the digest algorithm identifier.

EncodeASN1DERLC()

CASN1EncSequence * EncodeASN1DERLC ( ) const

Creates the ASN.1 sequence of this CMS signed object and leaves it on the cleanup stack.

EncodeSignerIdentifierLC()

CASN1EncBase * EncodeSignerIdentifierLC ( ) const [private]

Encode the signer identifier

IsSignedAttributesPresent()

IMPORT_C TBool IsSignedAttributesPresent ( ) const

Returns whether signed attributes are present or not.

IsUnsignedAttributesPresent()

IMPORT_C TBool IsUnsignedAttributesPresent ( ) const

Returns whether unsigned attributes are present or not.

NewL(const TDesC8 &, TBool, const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)

CCmsSignerInfo * NewL ( const TDesC8 & aDataToBeSigned,
TBool aIsHash,
const CDSAPrivateKey & aKey,
CCmsSignerIdentifier * aSignerIdentifier,
CX509AlgorithmIdentifier * aDigestAlgorithm,
CX509AlgorithmIdentifier * aSignatureAlgorithm
) [static]

Creates a CMS signer info object as defined in RFC2630.

Parameters

const TDesC8 & aDataToBeSigned The data content or its hash to be signed.
TBool aIsHash Indicates whether the first parameter is a hash.
const CDSAPrivateKey & aKey The DSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifier The signer identifier. Ownership of the signer identifier is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aSignerIdentifier onto the cleanup stack before calling this method, and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aDigestAlgorithm The digest algorithm used to create the hash. Ownership of the digest algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aSignatureAlgorithm The signature algorithm to create the signature. Ownership of the signature algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.

NewL(const TDesC8 &, TBool, const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)

CCmsSignerInfo * NewL ( const TDesC8 & aDataToBeSigned,
TBool aIsHash,
const CRSAPrivateKey & aKey,
CCmsSignerIdentifier * aSignerIdentifier,
CX509AlgorithmIdentifier * aDigestAlgorithm,
CX509AlgorithmIdentifier * aSignatureAlgorithm
) [static]

Creates a CMS signer info object as defined in RFC2630.

Parameters

const TDesC8 & aDataToBeSigned The data content or its hash to be signed.
TBool aIsHash Indicates whether the first parameter is a hash.
const CRSAPrivateKey & aKey The RSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifier The signer identifier. Ownership of the signer identifier is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aSignerIdentifier onto the cleanup stack before calling this method, and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aDigestAlgorithm The digest algorithm used to create the hash. Ownership of the digest algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aSignatureAlgorithm The signature algorithm to create the signature. Ownership of the signature algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.

NewL(const TDesC8 &)

CCmsSignerInfo * NewL ( const TDesC8 & aRawData ) [static]

Creates a CMS signer info object as defined in RFC2630.

Parameters

const TDesC8 & aRawData the encoded signer info.

NewLC(const TDesC8 &, TBool, const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)

CCmsSignerInfo * NewLC ( const TDesC8 & aDataToBeSigned,
TBool aIsHash,
const CDSAPrivateKey & aKey,
CCmsSignerIdentifier * aSignerIdentifier,
CX509AlgorithmIdentifier * aDigestAlgorithm,
CX509AlgorithmIdentifier * aSignatureAlgorithm
) [static]

Creates a CMS signer info object as defined in RFC2630 and leaves it on the cleanup stack.

Parameters

const TDesC8 & aDataToBeSigned The data content or its hash to be signed.
TBool aIsHash Indicates whether the first parameter is a hash.
const CDSAPrivateKey & aKey The DSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifier The signer identifier. Ownership of the signer identifier is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aSignerIdentifier onto the cleanup stack before calling this method, and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aDigestAlgorithm The digest algorithm used to create the hash. Ownership of the digest algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aSignatureAlgorithm The signature algorithm to create the signature. Ownership of the signature algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.

NewLC(const TDesC8 &, TBool, const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)

CCmsSignerInfo * NewLC ( const TDesC8 & aDataToBeSigned,
TBool aIsHash,
const CRSAPrivateKey & aKey,
CCmsSignerIdentifier * aSignerIdentifier,
CX509AlgorithmIdentifier * aDigestAlgorithm,
CX509AlgorithmIdentifier * aSignatureAlgorithm
) [static]

Creates a CMS signer info object as defined in RFC2630 and leaves it on the cleanup stack.

Parameters

const TDesC8 & aDataToBeSigned The data content or its hash to be signed.
TBool aIsHash Indicates whether the first parameter is a hash.
const CRSAPrivateKey & aKey The RSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifier The signer identifier. Ownership of the signer identifier is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aSignerIdentifier onto the cleanup stack before calling this method, and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aDigestAlgorithm The digest algorithm used to create the hash. Ownership of the digest algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.
CX509AlgorithmIdentifier * aSignatureAlgorithm The signature algorithm to create the signature. Ownership of the signature algorithm instance is taken by this newly created signer info object. If construction fails, ownership is not transferred. The user needs to push aDigestAlgorithm onto the cleanup stack before calling this method and pop it off the cleanup stack after successful construction.

NewLC(const TDesC8 &)

CCmsSignerInfo * NewLC ( const TDesC8 & aRawData ) [static]

Creates a CMS signer info object as defined in RFC2630 and leaves it on the cleanup stack.

Parameters

const TDesC8 & aRawData The encoded signer info.

SignatureAlgorithm()

IMPORT_C const CX509AlgorithmIdentifier & SignatureAlgorithm ( ) const

Returns the signature algorithm identifier.

SignatureValue()

IMPORT_C const TPtrC8 SignatureValue ( ) const

Returns the signature value.

SignerIdentifier()

IMPORT_C const CCmsSignerIdentifier & SignerIdentifier ( ) const

Returns the signer identifier.

Version()

IMPORT_C TInt Version ( ) const

Returns the version of the CMS signer info object.

Member Data Documentation

CX509AlgorithmIdentifier * iDigestAlgorithm

CX509AlgorithmIdentifier * iDigestAlgorithm [private]

The digest algorithm identifier

CX509AlgorithmIdentifier * iSignatureAlgorithm

CX509AlgorithmIdentifier * iSignatureAlgorithm [private]

The signature algorithm identifier

HBufC8 * iSignatureValue

HBufC8 * iSignatureValue [private]

the signature value

TBool iSignedAttributesPresent

TBool iSignedAttributesPresent [private]

Represents if the Signed Attribute is present

CCmsSignerIdentifier * iSignerIdentifier

CCmsSignerIdentifier * iSignerIdentifier [private]

the signer identifier

TBool iUnsignedAttributesPresent

TBool iUnsignedAttributesPresent [private]

Represents if the Unsigned Attribute is present

TInt iVersion

TInt iVersion [private]

The version of the signer info