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 TInt CMSVersion ()
void DecodeL (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 void SetCertificateL (const CCMSX509Certificate &)
IMPORT_C void SetCertificateUrlL (const TDesC8 &, const TDesC8 &)
IMPORT_C void SetDigestAlgorithmIdentifier ( CCMSX509AlgorithmIdentifier &)
IMPORT_C void SetSignatureAlgorithmIdentifier ( CCMSX509AlgorithmIdentifier &)
IMPORT_C void SetSignatureValueL (const TDesC8 &)
IMPORT_C void SetSignedAttributesL (const TDesC &, const TDesC8 &, const TTime &, const TDesC8 *)
IMPORT_C void SetUnsignedAttributesL ( 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 ()
void BaseConstructL (const TDesC8 &)
IMPORT_C void ConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void ConstructL (const CCMSX509Certificate &, const TDesC8 &)
Private Member Functions
CCMSAttribute * CreateCertificateUrlLC (const TDesC8 &)
void DecodeAttributesL (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_C CCMSSignerInfo ( ) [protected]

C++ default constructor.

~CCMSSignerInfo()

~CCMSSignerInfo ( ) [virtual]

Destructor.

Member Functions Documentation

BaseConstructL(const TDesC8 &)

void BaseConstructL ( const TDesC8 & aMessageDigest ) [protected, virtual]

Default construction

Parameters

const TDesC8 & aMessageDigest

CMSVersion()

IMPORT_C TInt CMSVersion ( ) const
Getter for Version
Since
2,8

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

IMPORT_C void ConstructL ( 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 void ConstructL ( 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 > *)

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

Decodes attributes to array

Parameters

const TDesC8 & aRawData
CArrayPtrFlat < CCMSAttribute > * aAttributes

DecodeL(const TDesC8 &)

void DecodeL ( const TDesC8 & aRawData )
From MCMSModule
Since
2.8

Parameters

const TDesC8 & aRawData raw-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 & aCertificate Used certificate
const TDesC8 & aMessageDigest Message 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 & aCertificateUrl Used certificate url
const TDesC8 & aSubjectKeyID Subject Key ID
const TDesC8 & aMessageDigest Message Digest value

SetCertificateL(const CCMSX509Certificate &)

IMPORT_C void SetCertificateL ( const CCMSX509Certificate & aCertificate )

Setter for Certificate

Since
2,8

Parameters

const CCMSX509Certificate & aCertificate certificate to be set

SetCertificateUrlL(const TDesC8 &, const TDesC8 &)

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

Parameters

const TDesC8 & aCertificateUrl certificate url to be set
const TDesC8 & aSubjectKeyIdentifier SubjectKeyIdentifier to be set

SetDigestAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &)

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

Parameters

CCMSX509AlgorithmIdentifier & aDigestAI Digest algorithm identifier to be set

SetSignatureAlgorithmIdentifier(CCMSX509AlgorithmIdentifier &)

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

Parameters

CCMSX509AlgorithmIdentifier & aSignatureAI Signature algorithm identifier to be set

SetSignatureValueL(const TDesC8 &)

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

Parameters

const TDesC8 & aSignatureValue Signature value to be set

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

IMPORT_C void SetSignedAttributesL ( 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 & aContentType ContentType in OID form, e.g. "1.2.840.113549.1.7.1"
const TDesC8 & aMessageDigest Message Digest
const TTime & aSigningTime In most cases current time
const TDesC8 * aCertHash Certificate hash

SetUnsignedAttributesL(CArrayPtrFlat< CCMSAttribute > &)

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

Parameters

CArrayPtrFlat < CCMSAttribute > & aUnsignedAttributes Array 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]