CCMSSignerInfo Class Reference

class CCMSSignerInfo : public CCMSSequence

SignerInfo module

SignerInfo ::= SEQUENCE { version CMSVersion, sid SignerIdentifier, digestAlgorithm DigestAlgorithmIdentifier, signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL, signatureAlgorithm SignatureAlgorithmIdentifier, signature SignatureValue, unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }

SignerIdentifier ::= CHOICE { issuerAndSerialNumber IssuerAndSerialNumber, subjectKeyIdentifier [0] SubjectKeyIdentifier }

cms.lib
Since
2.8

Inherits from

Public Member Functions
~CCMSSignerInfo()
IMPORT_C TIntCMSVersion()
voidDecodeL(const TDesC8 &)
IMPORT_C const CCMSX509AlgorithmIdentifier &DigestAlgorithmIdentifier()
CASN1EncBase *EncoderLC()
IMPORT_C const CCMSIssuerAndSerialNumber *IssuerAndSerialNumber()
IMPORT_C CCMSSignerInfo *NewL()
IMPORT_C CCMSSignerInfo *NewL(const CCMSX509Certificate &, const TDesC8 &)
IMPORT_C CCMSSignerInfo *NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C voidSetCertificateL(const CCMSX509Certificate &)
IMPORT_C voidSetCertificateUrlL(const TDesC8 &, const TDesC8 &)
IMPORT_C voidSetDigestAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &)
IMPORT_C voidSetSignatureAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &)
IMPORT_C voidSetSignatureValueL(const TDesC8 &)
IMPORT_C voidSetSignedAttributesL(const TDesC &, const TDesC8 &, const TTime &, const TDesC8 *)
IMPORT_C voidSetUnsignedAttributesL(CArrayPtrFlat< CCMSAttribute > &)
IMPORT_C const CCMSX509AlgorithmIdentifier &SignatureAlgorithmIdentifier()
IMPORT_C const TDesC8 &SignatureValue()
IMPORT_C const CArrayPtrFlat< CCMSAttribute > &SignedAttributes()
IMPORT_C HBufC8 *SignedAttributesEncodedL()
IMPORT_C const TDesC8 *SubjectKeyIdentifier()
IMPORT_C const CArrayPtrFlat< CCMSAttribute > &UnsignedAttributes()
Protected Member Functions
CCMSSignerInfo()
voidBaseConstructL(const TDesC8 &)
IMPORT_C voidConstructL(const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C voidConstructL(const CCMSX509Certificate &, const TDesC8 &)
Private Member Functions
CCMSAttribute *CreateCertificateUrlLC(const TDesC8 &)
voidDecodeAttributesL(const TDesC8 &, CArrayPtrFlat< CCMSAttribute > *)
NONSHARABLE_CLASS(CSignerInfoData)
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()
CCMSSequence::CCMSSequence()
CCMSSequence::CreateDerEncodingL(CASN1EncBase *)
CCMSSequence::DecodeSequenceLC(const TDesC8 &)
CCMSSequence::DecodeSequenceLC(const TDesC8 &,TInt,TInt)
CCMSSequence::EncodeL(HBufC8 *&)const
Private Attributes
CSignerInfoData *iData
MCMSSignerInfoExtension *iReserved

Constructor & Destructor Documentation

CCMSSignerInfo()

IMPORT_CCCMSSignerInfo()[protected]

C++ default constructor.

~CCMSSignerInfo()

~CCMSSignerInfo()[virtual]

Destructor.

Member Functions Documentation

BaseConstructL(const TDesC8 &)

voidBaseConstructL(const TDesC8 &aMessageDigest)[protected, virtual]

Default construction

Parameters

const TDesC8 & aMessageDigest

CMSVersion()

IMPORT_C TIntCMSVersion()const
Getter for Version
Since
2,8

ConstructL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C voidConstructL(const TDesC8 &aCertificateUrl,
const TDesC8 &aSubjectKeyID,
const TDesC8 &aMessageDigest
)[protected]

Protected construction to allow derivation

Parameters

const TDesC8 & aCertificateUrl
const TDesC8 & aSubjectKeyID
const TDesC8 & aMessageDigest

ConstructL(const CCMSX509Certificate &, const TDesC8 &)

IMPORT_C voidConstructL(const CCMSX509Certificate &aCertificate,
const TDesC8 &aMessageDigest
)[protected]

Protected construction to allow derivation

Parameters

const CCMSX509Certificate & aCertificate
const TDesC8 & aMessageDigest

CreateCertificateUrlLC(const TDesC8 &)

CCMSAttribute *CreateCertificateUrlLC(const TDesC8 &aCertificateUrl)[private]

Creates certificate url attribute

Parameters

const TDesC8 & aCertificateUrl

DecodeAttributesL(const TDesC8 &, CArrayPtrFlat< CCMSAttribute > *)

voidDecodeAttributesL(const TDesC8 &aRawData,
CArrayPtrFlat< CCMSAttribute > *aAttributes
)[private]

Decodes attributes to array

Parameters

const TDesC8 & aRawData
CArrayPtrFlat< CCMSAttribute > * aAttributes

DecodeL(const TDesC8 &)

voidDecodeL(const TDesC8 &aRawData)
From MCMSModule
Since
2.8

Parameters

const TDesC8 & aRawDataraw-data to be parsed in this instance

DigestAlgorithmIdentifier()

IMPORT_C const CCMSX509AlgorithmIdentifier &DigestAlgorithmIdentifier()const
Getter for DigestAlgorithmIdentifier Default value is SHA-1
Since
2,8

EncoderLC()

CASN1EncBase *EncoderLC()const
From MCMSModule
Since
2.8

IssuerAndSerialNumber()

IMPORT_C const CCMSIssuerAndSerialNumber *IssuerAndSerialNumber()const
Getter for IssuerAndSerialNumber This will be present when normal certificate is used
Since
2,8

NONSHARABLE_CLASS(CSignerInfoData)

NONSHARABLE_CLASS(CSignerInfoData)[private, inline]

Parameters

CSignerInfoData

NewL()

IMPORT_C CCMSSignerInfo *NewL()[static]

Two-phased constructor. NOTE: Encrypt will leave with KErrBadDescriptor if valid Attribute Type has not setted.

NewL(const CCMSX509Certificate &, const TDesC8 &)

IMPORT_C CCMSSignerInfo *NewL(const CCMSX509Certificate &aCertificate,
const TDesC8 &aMessageDigest
)[static]

Two-phased constructor. Takes copy of the both type and values.

Parameters

const CCMSX509Certificate & aCertificateUsed certificate
const TDesC8 & aMessageDigestMessage Digest value

NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C CCMSSignerInfo *NewL(const TDesC8 &aCertificateUrl,
const TDesC8 &aSubjectKeyID,
const TDesC8 &aMessageDigest
)[static]

Two-phased constructor. Takes copy of the both type and values.

Parameters

const TDesC8 & aCertificateUrlUsed certificate url
const TDesC8 & aSubjectKeyIDSubject Key ID
const TDesC8 & aMessageDigestMessage Digest value

SetCertificateL(const CCMSX509Certificate &)

IMPORT_C voidSetCertificateL(const CCMSX509Certificate &aCertificate)

Setter for Certificate

Since
2,8

Parameters

const CCMSX509Certificate & aCertificatecertificate to be set

SetCertificateUrlL(const TDesC8 &, const TDesC8 &)

IMPORT_C voidSetCertificateUrlL(const TDesC8 &aCertificateUrl,
const TDesC8 &aSubjectKeyIdentifier
)
Getter for SubjectKeyIdentifier
Since
2,8

Parameters

const TDesC8 & aCertificateUrlcertificate url to be set
const TDesC8 & aSubjectKeyIdentifierSubjectKeyIdentifier to be set

SetDigestAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &)

IMPORT_C voidSetDigestAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &aDigestAI)
Setter for DigestAlgorithmIdentifier Transfers ownership
Since
2,8

Parameters

CCMSX509AlgorithmIdentifier & aDigestAIDigest algorithm identifier to be set

SetSignatureAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &)

IMPORT_C voidSetSignatureAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &aSignatureAI)
Setter for SignatureAlgorithmIdentifier Transfers ownership
Since
2,8

Parameters

CCMSX509AlgorithmIdentifier & aSignatureAISignature algorithm identifier to be set

SetSignatureValueL(const TDesC8 &)

IMPORT_C voidSetSignatureValueL(const TDesC8 &aSignatureValue)
Setter for SignatureValue
Since
2,8

Parameters

const TDesC8 & aSignatureValueSignature value to be set

SetSignedAttributesL(const TDesC &, const TDesC8 &, const TTime &, const TDesC8 *)

IMPORT_C voidSetSignedAttributesL(const TDesC &aContentType,
const TDesC8 &aMessageDigest,
const TTime &aSigningTime,
const TDesC8 *aCertHash
)
Setter for Signed attributes Support for ContentType, MessageDigest, SigningTime and SigningCert If some of the parameters are not wanted to add use KNullDesC or KNullDesC8
Since
2,8

Parameters

const TDesC & aContentTypeContentType in OID form, e.g. "1.2.840.113549.1.7.1"
const TDesC8 & aMessageDigestMessage Digest
const TTime & aSigningTimeIn most cases current time
const TDesC8 * aCertHashCertificate hash

SetUnsignedAttributesL(CArrayPtrFlat< CCMSAttribute > &)

IMPORT_C voidSetUnsignedAttributesL(CArrayPtrFlat< CCMSAttribute > &aUnsignedAttributes)
Setter for Unsigned attributes Transfers ownership
Since
2,8

Parameters

CArrayPtrFlat< CCMSAttribute > & aUnsignedAttributesArray of attributes, to be set in unsigned attributes.

SignatureAlgorithmIdentifier()

IMPORT_C const CCMSX509AlgorithmIdentifier &SignatureAlgorithmIdentifier()const
Getter for SignatureAlgorithmIdentifier Default value is RSA
Since
2,8

SignatureValue()

IMPORT_C const TDesC8 &SignatureValue()const
Getter for SignatureValue
Since
2,8

SignedAttributes()

IMPORT_C const CArrayPtrFlat< CCMSAttribute > &SignedAttributes()const
Getter for SignedAttributes
Since
2,8

SignedAttributesEncodedL()

IMPORT_C HBufC8 *SignedAttributesEncodedL()const

Gets signedAttributes in encoded form, with SET OF tag instead of [0]. This data is supposed to be signed. since 3.0

SubjectKeyIdentifier()

IMPORT_C const TDesC8 *SubjectKeyIdentifier()const
Getter for SubjectKeyIdentifier This will be present only if certificate url is used
Since
2,8

UnsignedAttributes()

IMPORT_C const CArrayPtrFlat< CCMSAttribute > &UnsignedAttributes()const

Getter for UnsignedAttributes

Since
2,8

Member Data Documentation

CSignerInfoData * iData

CSignerInfoData *iData[private]

MCMSSignerInfoExtension * iReserved

MCMSSignerInfoExtension *iReserved[private]