QCA::CertificateCollection

Search for usage in LXR

#include <QtCrypto>

Public Member Functions

 CertificateCollection ()
 
 CertificateCollection (const CertificateCollection &from)
 
void addCertificate (const Certificate &cert)
 
void addCRL (const CRL &crl)
 
void append (const CertificateCollection &other)
 
QList< Certificatecertificates () const
 
QList< CRLcrls () const
 
CertificateCollection operator+ (const CertificateCollection &other) const
 
CertificateCollectionoperator+= (const CertificateCollection &other)
 
CertificateCollectionoperator= (const CertificateCollection &from)
 
bool toFlatTextFile (const QString &fileName)
 
bool toPKCS7File (const QString &fileName, const QString &provider=QString())
 

Static Public Member Functions

static bool canUsePKCS7 (const QString &provider=QString())
 
static CertificateCollection fromFlatTextFile (const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
 
static CertificateCollection fromPKCS7File (const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
 

Detailed Description

Bundle of Certificates and CRLs.

CertificateCollection provides a bundle of Certificates and Certificate Revocation Lists (CRLs), not necessarily related.

See also
QCA::CertificateChain for a representation of a chain of Certificates related by signatures.
Examples
certtest.cpp, and ssltest.cpp.

Definition at line 1928 of file qca_cert.h.

Constructor & Destructor Documentation

◆ CertificateCollection() [1/2]

QCA::CertificateCollection::CertificateCollection ( )

Create an empty Certificate / CRL collection.

◆ CertificateCollection() [2/2]

QCA::CertificateCollection::CertificateCollection ( const CertificateCollection & from)

Standard copy constructor.

Parameters
fromthe CertificateCollection to copy from

Member Function Documentation

◆ addCertificate()

void QCA::CertificateCollection::addCertificate ( const Certificate & cert)

Append a Certificate to this collection.

Parameters
certthe Certificate to add to this CertificateCollection
Examples
ssltest.cpp.

◆ addCRL()

void QCA::CertificateCollection::addCRL ( const CRL & crl)

Append a CRL to this collection.

Parameters
crlthe certificate revokation list to add to this CertificateCollection

◆ append()

void QCA::CertificateCollection::append ( const CertificateCollection & other)

Add another CertificateCollection to this collection.

Parameters
otherthe CertificateCollection to add to this collection

◆ canUsePKCS7()

static bool QCA::CertificateCollection::canUsePKCS7 ( const QString & provider = QString())
static

test if the CertificateCollection can be imported and exported to PKCS#7 format

Parameters
providerthe provider to use, if a specific provider is required
Returns
true if the CertificateCollection can be imported and exported to PKCS#7 format

◆ certificates()

QList< Certificate > QCA::CertificateCollection::certificates ( ) const

The Certificates in this collection.

Examples
certtest.cpp.

◆ crls()

QList< CRL > QCA::CertificateCollection::crls ( ) const

The CRLs in this collection.

◆ fromFlatTextFile()

static CertificateCollection QCA::CertificateCollection::fromFlatTextFile ( const QString & fileName,
ConvertResult * result = nullptr,
const QString & provider = QString() )
static

import a CertificateCollection from a text file

Parameters
fileNamethe name (and path, if required) to read the certificate collection from
resulta pointer to a ConvertResult, which if not-null will be set to the conversion status
providerthe provider to use, if a specific provider is required
Returns
the CertificateCollection corresponding to the contents of the file specified in fileName
Examples
certtest.cpp.

◆ fromPKCS7File()

static CertificateCollection QCA::CertificateCollection::fromPKCS7File ( const QString & fileName,
ConvertResult * result = nullptr,
const QString & provider = QString() )
static

import a CertificateCollection from a PKCS#7 file

Parameters
fileNamethe name (and path, if required) to read the certificate collection from
resulta pointer to a ConvertResult, which if not-null will be set to the conversion status
providerthe provider to use, if a specific provider is required
Returns
the CertificateCollection corresponding to the contents of the file specified in fileName

◆ operator+()

CertificateCollection QCA::CertificateCollection::operator+ ( const CertificateCollection & other) const

Add another CertificateCollection to this collection.

Parameters
otherthe CertificateCollection to add to this collection

◆ operator+=()

CertificateCollection & QCA::CertificateCollection::operator+= ( const CertificateCollection & other)

Add another CertificateCollection to this collection.

Parameters
otherthe CertificateCollection to add to this collection

◆ operator=()

CertificateCollection & QCA::CertificateCollection::operator= ( const CertificateCollection & from)

Standard assignment operator.

Parameters
fromthe CertificateCollection to copy from

◆ toFlatTextFile()

bool QCA::CertificateCollection::toFlatTextFile ( const QString & fileName)

export the CertificateCollection to a plain text file

Parameters
fileNamethe name (and path, if required) to write the contents of the CertificateCollection to
Returns
true if the export succeeded, otherwise false

◆ toPKCS7File()

bool QCA::CertificateCollection::toPKCS7File ( const QString & fileName,
const QString & provider = QString() )

export the CertificateCollection to a PKCS#7 file

Parameters
fileNamethe name (and path, if required) to write the contents of the CertificateCollection to
providerthe provider to use, if a specific provider is required
Returns
true if the export succeeded, otherwise false

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.