CCMSSignedData Class Reference

class CCMSSignedData : public CCMSSequence

Attribute type module

ASN.1 Definition: SignedData ::= SEQUENCE { version CMSVersion, digestAlgorithms DigestAlgorithmIdentifiers, encapContentInfo EncapsulatedContentInfo, certificates [0] IMPLICIT CertificateSet OPTIONAL, crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, signerInfos SignerInfos }

DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier

SignerInfos ::= SET OF SignerInfo

cms.lib
Since
2.8

Inherits from

Public Member Functions
~CCMSSignedData ()
IMPORT_C const CArrayPtr < CCMSCertificateChoices > * Certificates ()
void DecodeL (const TDesC8 &)
IMPORT_C const CArrayPtr < CCMSX509AlgorithmIdentifier > & DigestAlgorithmIdentifiers ()
IMPORT_C const CCMSEncapsulatedContentInfo & EncapsulatedContentInfo ()
CASN1EncBase * EncoderLC ()
IMPORT_C CCMSSignedData * NewLC ()
IMPORT_C CCMSSignedData * NewLC (const CArrayPtr < CCMSX509AlgorithmIdentifier > &, const CCMSEncapsulatedContentInfo &, const CArrayPtr < CCMSSignerInfo > &)
IMPORT_C CCMSSignedData * NewLC (const CArrayPtr < CCMSX509AlgorithmIdentifier > &, const CCMSEncapsulatedContentInfo &, const CArrayPtr < CCMSSignerInfo > &, const CArrayPtr < CCMSCertificateChoices > *, const CArrayPtr < CCMSX509CertificateList > *)
IMPORT_C const CArrayPtr < CCMSX509CertificateList > * RevokedCertificates ()
IMPORT_C void SetCertificatesL (const CArrayPtr < CCMSCertificateChoices > *)
IMPORT_C void SetDigestAlgorithmIdentifiersL (const CArrayPtr < CCMSX509AlgorithmIdentifier > &)
IMPORT_C void SetEncapsulatedContentInfoL (const CCMSEncapsulatedContentInfo &)
IMPORT_C void SetRevokedCertificatesL (const CArrayPtr < CCMSX509CertificateList > *)
IMPORT_C void SetSignerInfosL (const CArrayPtr < CCMSSignerInfo > &)
IMPORT_C const CArrayPtr < CCMSSignerInfo > & SignerInfos ()
IMPORT_C TInt Version ()
Protected Member Functions
CCMSSignedData ()
IMPORT_C void ConstructL ()
IMPORT_C void ConstructL (const CArrayPtr < CCMSX509AlgorithmIdentifier > &, const CCMSEncapsulatedContentInfo &, const CArrayPtr < CCMSSignerInfo > &, const CArrayPtr < CCMSCertificateChoices > *, const CArrayPtr < CCMSX509CertificateList > *)
Private Member Functions
void ValidateVersion ()
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
CArrayPtr < CCMSCertificateChoices > * iCertificates
CCMSEncapsulatedContentInfo * iContentInfo
CArrayPtr < CCMSX509AlgorithmIdentifier > * iDigestAlgorithmIdentifiers
MCMSSignedDataExtension * iReserved
CArrayPtr < CCMSX509CertificateList > * iRevokedCertificates
CArrayPtr < CCMSSignerInfo > * iSignerInfos
TInt iVersion

Constructor & Destructor Documentation

CCMSSignedData()

IMPORT_C CCMSSignedData ( ) [protected]

C++ default constructor.

~CCMSSignedData()

~CCMSSignedData ( ) [virtual]

Destructor.

Member Functions Documentation

Certificates()

IMPORT_C const CArrayPtr < CCMSCertificateChoices > * Certificates ( ) const

Getter for Certificate

Certificates is a collection of certificates. It is intended that the set of certificates be sufficient to contain chains from a recognized "root" or "top-level certification authority" to all of the signers in the signerInfos field. There may be more certificates than necessary, and there may be certificates sufficient to contain chains from two or more independent top- level certification authorities. There may also be fewer certificates than necessary, if it is expected that recipients have an alternate means of obtaining necessary certificates (e.g., from a previous set of certificates).

Since
2.8

ConstructL()

IMPORT_C void ConstructL ( ) [protected]

Protected construction to allow derivation

ConstructL(const CArrayPtr< CCMSX509AlgorithmIdentifier > &, const CCMSEncapsulatedContentInfo &, const CArrayPtr< CCMSSignerInfo > &, const CArrayPtr< CCMSCertificateChoices > *, const CArrayPtr< CCMSX509CertificateList > *)

IMPORT_C void ConstructL ( const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers,
const CCMSEncapsulatedContentInfo & aContentInfo,
const CArrayPtr < CCMSSignerInfo > & aSignerInfos,
const CArrayPtr < CCMSCertificateChoices > * aCertificates,
const CArrayPtr < CCMSX509CertificateList > * aRevokedCertificates
) [protected]

Protected construction to allow derivation

Parameters

const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers
const CCMSEncapsulatedContentInfo & aContentInfo
const CArrayPtr < CCMSSignerInfo > & aSignerInfos
const CArrayPtr < CCMSCertificateChoices > * aCertificates
const CArrayPtr < CCMSX509CertificateList > * aRevokedCertificates

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

DigestAlgorithmIdentifiers()

IMPORT_C const CArrayPtr < CCMSX509AlgorithmIdentifier > & DigestAlgorithmIdentifiers ( ) const

Getter for DigestAlgorithmIdentifiers

DigestAlgorithms is a collection of message digest algorithm identifiers. There may be any number of elements in the collection, including zero. Each element identifies the message digest algorithm, along with any associated parameters, used by one or more signer. The collection is intended to list the message digest algorithms employed by all of the signers, in any order, to facilitate one-pass signature verification.

Since
2.8

EncapsulatedContentInfo()

IMPORT_C const CCMSEncapsulatedContentInfo & EncapsulatedContentInfo ( ) const

Getter for EncapsulatedContentInfo

EncapsulatedContentInfo is the signed content, consisting of a content type identifier and the content itself.

Since
2.8

EncoderLC()

CASN1EncBase * EncoderLC ( ) const
From MCMSModule
Since
2.8

NewLC()

IMPORT_C CCMSSignedData * NewLC ( ) [static]

Two-phased constructor. NOTE: Encrypt will leave with KErrArgument if valid parameters are not set.

NewLC(const CArrayPtr< CCMSX509AlgorithmIdentifier > &, const CCMSEncapsulatedContentInfo &, const CArrayPtr< CCMSSignerInfo > &)

IMPORT_C CCMSSignedData * NewLC ( const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers,
const CCMSEncapsulatedContentInfo & aContentInfo,
const CArrayPtr < CCMSSignerInfo > & aSignerInfos
) [static]

Two-phased constructor. Takes copy of all parameters. Leaves newly created instance in CleanupStack

Parameters

const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers Array of digest algorithm identifiers, mandatory
const CCMSEncapsulatedContentInfo & aContentInfo Encapsulated content info, mandatory
const CArrayPtr < CCMSSignerInfo > & aSignerInfos

NewLC(const CArrayPtr< CCMSX509AlgorithmIdentifier > &, const CCMSEncapsulatedContentInfo &, const CArrayPtr< CCMSSignerInfo > &, const CArrayPtr< CCMSCertificateChoices > *, const CArrayPtr< CCMSX509CertificateList > *)

IMPORT_C CCMSSignedData * NewLC ( const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers,
const CCMSEncapsulatedContentInfo & aContentInfo,
const CArrayPtr < CCMSSignerInfo > & aSignerInfos,
const CArrayPtr < CCMSCertificateChoices > * aCertificates,
const CArrayPtr < CCMSX509CertificateList > * aRevokedCertificates
) [static]

Two-phased constructor. Same as above although takes only one value Leaves newly created instance in CleanupStack

Parameters

const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers Array of digest algorithm identifiers, mandatory
const CCMSEncapsulatedContentInfo & aContentInfo Encapsulated content info, mandatory
const CArrayPtr < CCMSSignerInfo > & aSignerInfos
const CArrayPtr < CCMSCertificateChoices > * aCertificates Array of certificates choices, optional
const CArrayPtr < CCMSX509CertificateList > * aRevokedCertificates Array of revoked certificates, optional

RevokedCertificates()

IMPORT_C const CArrayPtr < CCMSX509CertificateList > * RevokedCertificates ( ) const

Getter for RevokedCertificates

RevokedCertificates is a collection of certificate revocation lists (CRLs). It is intended that the set contain information sufficient to determine whether or not the certificates in the certificates field are valid, but such correspondence is not necessary. There may be more CRLs than necessary, and there may also be fewer CRLs than necessary.

Since
2.8

SetCertificatesL(const CArrayPtr< CCMSCertificateChoices > *)

IMPORT_C void SetCertificatesL ( const CArrayPtr < CCMSCertificateChoices > * aCertificates )
Setter for Certificates, takes copy
Since
2.8

Parameters

const CArrayPtr < CCMSCertificateChoices > * aCertificates Array of certificates or NULL if certificates are intented to remove from this instance

SetDigestAlgorithmIdentifiersL(const CArrayPtr< CCMSX509AlgorithmIdentifier > &)

IMPORT_C void SetDigestAlgorithmIdentifiersL ( const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers )

Setter for DigestAlgorithmIdentifiers, takes copy

Since
2.8

Parameters

const CArrayPtr < CCMSX509AlgorithmIdentifier > & aDigestAlgorithmIdentifiers Array of digest algorithm identifiers

SetEncapsulatedContentInfoL(const CCMSEncapsulatedContentInfo &)

IMPORT_C void SetEncapsulatedContentInfoL ( const CCMSEncapsulatedContentInfo & aContentInfo )
Setter for EncapsulatedContentInfo, takes copy
Since
2.8

Parameters

const CCMSEncapsulatedContentInfo & aContentInfo Encapsulated content info

SetRevokedCertificatesL(const CArrayPtr< CCMSX509CertificateList > *)

IMPORT_C void SetRevokedCertificatesL ( const CArrayPtr < CCMSX509CertificateList > * aRevokedCertificates )
Setter for RevokedCertificates, takes copy
Since
2.8

Parameters

const CArrayPtr < CCMSX509CertificateList > * aRevokedCertificates Array of revoked certificates or NULL if removing revoked certificates from this instance

SetSignerInfosL(const CArrayPtr< CCMSSignerInfo > &)

IMPORT_C void SetSignerInfosL ( const CArrayPtr < CCMSSignerInfo > & aSignerInfos )
Setter for SignerInfos, takes copy
Since
2.8

Parameters

const CArrayPtr < CCMSSignerInfo > & aSignerInfos Array of signer info, array can be also empty

SignerInfos()

IMPORT_C const CArrayPtr < CCMSSignerInfo > & SignerInfos ( ) const

Getter for SignerInfos

SignerInfos is a collection of per-signer information. There may be any number of elements in the collection, including zero.

Since
2.8

ValidateVersion()

void ValidateVersion ( ) [private]

Finds out right version with following rules:

If no attribute certificates are present in the certificates field, the encapsulated content type is id-data, and all of the elements of SignerInfos are version 1, then the value of version shall be 1.

Alternatively, if attribute certificates are present, the encapsulated content type is other than id-data, or any of the elements of SignerInfos are version 3, then the value of version shall be 3.

Version()

IMPORT_C TInt Version ( ) const

Getter for Version

Version is the syntax version number. If no attribute certificates are present in the certificates field, the encapsulated content type is id-data, and all of the elements of SignerInfos are version 1, then the value of version shall be 1. Alternatively, if attribute certificates are present, the encapsulated content type is other than id-data, or any of the elements of SignerInfos are version 3, then the value of version shall be 3.

Since
2.8

Member Data Documentation

CArrayPtr< CCMSCertificateChoices > * iCertificates

CArrayPtr < CCMSCertificateChoices > * iCertificates [private]

CCMSEncapsulatedContentInfo * iContentInfo

CCMSEncapsulatedContentInfo * iContentInfo [private]

CArrayPtr< CCMSX509AlgorithmIdentifier > * iDigestAlgorithmIdentifiers

CArrayPtr < CCMSX509AlgorithmIdentifier > * iDigestAlgorithmIdentifiers [private]

MCMSSignedDataExtension * iReserved

MCMSSignedDataExtension * iReserved [private]

CArrayPtr< CCMSX509CertificateList > * iRevokedCertificates

CArrayPtr < CCMSX509CertificateList > * iRevokedCertificates [private]

CArrayPtr< CCMSSignerInfo > * iSignerInfos

CArrayPtr < CCMSSignerInfo > * iSignerInfos [private]

TInt iVersion

TInt iVersion [private]