Qt Cryptographic Architecture
QCA::CMS Class Reference

#include <QtCrypto>

Collaboration diagram for QCA::CMS:

Public Member Functions

 CMS (QObject *parent=nullptr, const QString &provider=QString())
SecureMessageKeyList privateKeys () const
void setPrivateKeys (const SecureMessageKeyList &keys)
void setTrustedCertificates (const CertificateCollection &trusted)
void setUntrustedCertificates (const CertificateCollection &untrusted)
CertificateCollection trustedCertificates () const
CertificateCollection untrustedCertificates () const
Public Member Functions inherited from QCA::Algorithm
 Algorithm (const Algorithm &from)
void change (const QString &type, const QString &provider)
void change (Provider::Context *c)
Provider::Contextcontext ()
const Provider::Contextcontext () const
Algorithmoperator= (const Algorithm &from)
Providerprovider () const
Provider::ContexttakeContext ()
QString type () const

Additional Inherited Members

Protected Member Functions inherited from QCA::SecureMessageSystem
 SecureMessageSystem (QObject *parent, const QString &type, const QString &provider)
Protected Member Functions inherited from QCA::Algorithm
 Algorithm ()
 Algorithm (const QString &type, const QString &provider)

Detailed Description

Cryptographic Message Syntax messaging system.

Cryptographic Message Syntax (CMS) "is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. The %CMS describes an encapsulation syntax for data protection. It supports digital signatures and encryption. The syntax allows multiple encapsulations; one encapsulation envelope can be nested inside another. Likewise, one party can digitally sign some previously encapsulated data. It also allows arbitrary attributes, such as signing time, to be signed along with the message content, and provides for other attributes such as countersignatures to be associated with a signature." (from RFC3852 "Cryptographic Message Syntax")

See also
SecureMessage
SecureMessageKey
Examples
publickeyexample.cpp.

Constructor & Destructor Documentation

◆ CMS()

QCA::CMS::CMS ( QObject * parent = nullptr,
const QString & provider = QString() )
explicit

Standard constructor.

Parameters
parentthe parent object for this object
providerthe provider to use, if a specific provider is required

References CMS(), and QCA::Algorithm::provider().

Referenced by CMS(), and setPrivateKeys().

Member Function Documentation

◆ trustedCertificates()

CertificateCollection QCA::CMS::trustedCertificates ( ) const

Return the trusted certificates set for this object.

◆ untrustedCertificates()

CertificateCollection QCA::CMS::untrustedCertificates ( ) const

Return the untrusted certificates set for this object.

◆ privateKeys()

SecureMessageKeyList QCA::CMS::privateKeys ( ) const

Return the private keys set for this object.

◆ setTrustedCertificates()

void QCA::CMS::setTrustedCertificates ( const CertificateCollection & trusted)

Set the trusted certificates to use for the messages built using this CMS object.

Parameters
trustedthe collection of trusted certificates to use

◆ setUntrustedCertificates()

void QCA::CMS::setUntrustedCertificates ( const CertificateCollection & untrusted)

Set the untrusted certificates to use for the messages built using this CMS object.

This function is useful when verifying messages that don't contain the certificates (or intermediate signers) within the CMS blob. In order to verify such messages, you'll have to pass the possible signer certs with this function.

Parameters
untrustedthe collection of untrusted certificates to use

◆ setPrivateKeys()

void QCA::CMS::setPrivateKeys ( const SecureMessageKeyList & keys)

Set the private keys to use for the messages built using this CMS object.

Keys are required for decrypting and signing (not for encrypting or verifying).

Parameters
keysthe collection of keys to use

References CMS().


The documentation for this class was generated from the following file: