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 TBoolIsSignedAttributesPresent()
IMPORT_C TBoolIsUnsignedAttributesPresent()
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 TPtrC8SignatureValue()
IMPORT_C const CCmsSignerIdentifier &SignerIdentifier()
IMPORT_C TIntVersion()
Private Member Functions
CCmsSignerInfo()
voidConstructL(const TDesC8 &, TBool, const CDSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
voidConstructL(const TDesC8 &, TBool, const CRSAPrivateKey &, CCmsSignerIdentifier *, CX509AlgorithmIdentifier *, CX509AlgorithmIdentifier *)
voidConstructL(const TDesC8 &)
voidDecodeEncryptedDigestL(const TDesC8 &)
voidDecodeSignerIdentifierL(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 *)

voidConstructL(const TDesC8 &aDataToBeSigned,
TBoolaIsHash,
const CDSAPrivateKey &aKey,
CCmsSignerIdentifier *aSignerIdentifier,
CX509AlgorithmIdentifier *aDigestAlgorithm,
CX509AlgorithmIdentifier *aSignatureAlgorithm
)[private]

second phase constructor

Parameters

const TDesC8 & aDataToBeSignedthe data or its hash
TBool aIsHasha flag to represent if the first paramter is hash or data content
const CDSAPrivateKey & aKeythe DSA private key used to create the signature.
CCmsSignerIdentifier * aSignerIdentifierthe signer identifier.
CX509AlgorithmIdentifier * aDigestAlgorithmthe digest algorithm used to create hash.
CX509AlgorithmIdentifier * aSignatureAlgorithmthe signature alogorithm to create signature

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

voidConstructL(const TDesC8 &aDataToBeSigned,
TBoolaIsHash,
const CRSAPrivateKey &aKey,
CCmsSignerIdentifier *aSignerIdentifier,
CX509AlgorithmIdentifier *aDigestAlgorithm,
CX509AlgorithmIdentifier *aSignatureAlgorithm
)[private]

second phase constructor

Parameters

const TDesC8 & aDataToBeSignedthe data or its hash
TBool aIsHasha flag to represent if the first paramter is hash or data content
const CRSAPrivateKey & aKeythe RSA private key used to create the signature.
CCmsSignerIdentifier * aSignerIdentifierthe signer identifier.
CX509AlgorithmIdentifier * aDigestAlgorithmthe digest algorithm used to create hash.
CX509AlgorithmIdentifier * aSignatureAlgorithmthe signature alogorithm to create signature.

ConstructL(const TDesC8 &)

voidConstructL(const TDesC8 &aRawData)[private]

Second phase constructor

Parameters

const TDesC8 & aRawDatathe encoded the CMS content info

DecodeEncryptedDigestL(const TDesC8 &)

voidDecodeEncryptedDigestL(const TDesC8 &aRawData)[private]

Decode the signature

Parameters

const TDesC8 & aRawDatathe encoded signature

DecodeSignerIdentifierL(const TDesC8 &)

voidDecodeSignerIdentifierL(const TDesC8 &aRawData)[private]

Decode the signer identifier

Parameters

const TDesC8 & aRawDatathe 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 TBoolIsSignedAttributesPresent()const

Returns whether signed attributes are present or not.

IsUnsignedAttributesPresent()

IMPORT_C TBoolIsUnsignedAttributesPresent()const

Returns whether unsigned attributes are present or not.

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

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

Creates a CMS signer info object as defined in RFC2630.

Parameters

const TDesC8 & aDataToBeSignedThe data content or its hash to be signed.
TBool aIsHashIndicates whether the first parameter is a hash.
const CDSAPrivateKey & aKeyThe DSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifierThe 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 * aDigestAlgorithmThe 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 * aSignatureAlgorithmThe 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,
TBoolaIsHash,
const CRSAPrivateKey &aKey,
CCmsSignerIdentifier *aSignerIdentifier,
CX509AlgorithmIdentifier *aDigestAlgorithm,
CX509AlgorithmIdentifier *aSignatureAlgorithm
)[static]

Creates a CMS signer info object as defined in RFC2630.

Parameters

const TDesC8 & aDataToBeSignedThe data content or its hash to be signed.
TBool aIsHashIndicates whether the first parameter is a hash.
const CRSAPrivateKey & aKeyThe RSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifierThe 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 * aDigestAlgorithmThe 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 * aSignatureAlgorithmThe 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 & aRawDatathe encoded signer info.

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

CCmsSignerInfo *NewLC(const TDesC8 &aDataToBeSigned,
TBoolaIsHash,
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 & aDataToBeSignedThe data content or its hash to be signed.
TBool aIsHashIndicates whether the first parameter is a hash.
const CDSAPrivateKey & aKeyThe DSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifierThe 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 * aDigestAlgorithmThe 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 * aSignatureAlgorithmThe 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,
TBoolaIsHash,
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 & aDataToBeSignedThe data content or its hash to be signed.
TBool aIsHashIndicates whether the first parameter is a hash.
const CRSAPrivateKey & aKeyThe RSA private key used to sign.
CCmsSignerIdentifier * aSignerIdentifierThe 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 * aDigestAlgorithmThe 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 * aSignatureAlgorithmThe 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 & aRawDataThe encoded signer info.

SignatureAlgorithm()

IMPORT_C const CX509AlgorithmIdentifier &SignatureAlgorithm()const

Returns the signature algorithm identifier.

SignatureValue()

IMPORT_C const TPtrC8SignatureValue()const

Returns the signature value.

SignerIdentifier()

IMPORT_C const CCmsSignerIdentifier &SignerIdentifier()const

Returns the signer identifier.

Version()

IMPORT_C TIntVersion()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