QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsPkiBundle Class Reference

Storage set for PKI bundle: SSL certificate, key, optional CA cert chain. More...

#include <qgsauthconfig.h>

Public Member Functions

 QgsPkiBundle (const QSslCertificate &clientCert=QSslCertificate(), const QSslKey &clientKey=QSslKey(), const QList< QSslCertificate > &caChain=QList< QSslCertificate >())
 Construct a bundle from existing PKI components.
 
const QList< QSslCertificate > caChain () const
 Chain of Certificate Authorities for client certificate.
 
const QString certId () const
 The sha hash of the client certificate.
 
const QSslCertificate clientCert () const
 Client certificate object.
 
const QSslKey clientKey () const
 Private key object.
 
bool isNull () const
 Whether the bundle, either its certificate or private key, is null.
 
bool isValid () const
 Whether the bundle is valid.
 
void setCaChain (const QList< QSslCertificate > &cachain)
 Sets chain of Certificate Authorities for client certificate.
 
void setClientCert (const QSslCertificate &cert)
 Sets client certificate object.
 
void setClientKey (const QSslKey &certkey)
 Sets private key object.
 

Static Public Member Functions

static const QgsPkiBundle fromPemPaths (const QString &certPath, const QString &keyPath, const QString &keyPass=QString(), const QList< QSslCertificate > &caChain=QList< QSslCertificate >())
 Construct a bundle of PKI components from PEM-formatted file paths.
 
static const QgsPkiBundle fromPkcs12Paths (const QString &bundlepath, const QString &bundlepass=QString())
 Construct a bundle of PKI components from a PKCS#12 file path.
 

Detailed Description

Storage set for PKI bundle: SSL certificate, key, optional CA cert chain.

Note
Useful for caching the bundle during application run sessions

Definition at line 207 of file qgsauthconfig.h.

Constructor & Destructor Documentation

◆ QgsPkiBundle()

QgsPkiBundle::QgsPkiBundle ( const QSslCertificate &  clientCert = QSslCertificate(),
const QSslKey &  clientKey = QSslKey(),
const QList< QSslCertificate > &  caChain = QList<QSslCertificate>() 
)

Construct a bundle from existing PKI components.

Parameters
clientCertCertificate to store in bundle
clientKeyPrivate key to store in bundle
caChainChain of Certificate Authorities for client certificate

Definition at line 211 of file qgsauthconfig.cpp.

Member Function Documentation

◆ caChain()

const QList< QSslCertificate > QgsPkiBundle::caChain ( ) const
inline

Chain of Certificate Authorities for client certificate.

Definition at line 261 of file qgsauthconfig.h.

◆ certId()

const QString QgsPkiBundle::certId ( ) const

The sha hash of the client certificate.

Definition at line 307 of file qgsauthconfig.cpp.

◆ clientCert()

const QSslCertificate QgsPkiBundle::clientCert ( ) const
inline

Client certificate object.

Definition at line 251 of file qgsauthconfig.h.

◆ clientKey()

const QSslKey QgsPkiBundle::clientKey ( ) const
inline

Private key object.

Definition at line 256 of file qgsauthconfig.h.

◆ fromPemPaths()

const QgsPkiBundle QgsPkiBundle::fromPemPaths ( const QString &  certPath,
const QString &  keyPath,
const QString &  keyPass = QString(),
const QList< QSslCertificate > &  caChain = QList<QSslCertificate>() 
)
static

Construct a bundle of PKI components from PEM-formatted file paths.

Parameters
certPathCertificate file path
keyPathPrivate key path
keyPassPrivate key passphrase
caChainChain of Certificate Authorities for client certificate

Definition at line 222 of file qgsauthconfig.cpp.

◆ fromPkcs12Paths()

const QgsPkiBundle QgsPkiBundle::fromPkcs12Paths ( const QString &  bundlepath,
const QString &  bundlepass = QString() 
)
static

Construct a bundle of PKI components from a PKCS#12 file path.

Parameters
bundlepathBundle file path
bundlepassOptional bundle passphrase

Definition at line 250 of file qgsauthconfig.cpp.

◆ isNull()

bool QgsPkiBundle::isNull ( ) const

Whether the bundle, either its certificate or private key, is null.

Definition at line 297 of file qgsauthconfig.cpp.

◆ isValid()

bool QgsPkiBundle::isValid ( ) const

Whether the bundle is valid.

Definition at line 302 of file qgsauthconfig.cpp.

◆ setCaChain()

void QgsPkiBundle::setCaChain ( const QList< QSslCertificate > &  cachain)
inline

Sets chain of Certificate Authorities for client certificate.

Definition at line 263 of file qgsauthconfig.h.

◆ setClientCert()

void QgsPkiBundle::setClientCert ( const QSslCertificate &  cert)

Sets client certificate object.

Definition at line 316 of file qgsauthconfig.cpp.

◆ setClientKey()

void QgsPkiBundle::setClientKey ( const QSslKey &  certkey)

Sets private key object.

Definition at line 325 of file qgsauthconfig.cpp.


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