QGIS API Documentation  2.14.0-Essen
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. More...
 
const QList< QSslCertificatecaChain () const
 Chain of Certificate Authorities for client certificate. More...
 
const QString certId () const
 The sha hash of the client certificate. More...
 
const QSslCertificate clientCert () const
 Client certificate object. More...
 
const QSslKey clientKey () const
 Private key object. More...
 
bool isNull () const
 Whether the bundle, either its certificate or private key, is null. More...
 
bool isValid () const
 Whether the bundle is valid. More...
 
void setCaChain (const QList< QSslCertificate > &cachain)
 Set chain of Certificate Authorities for client certificate. More...
 
void setClientCert (const QSslCertificate &cert)
 Set client certificate object. More...
 
void setClientKey (const QSslKey &certkey)
 Set private key object. More...
 

Static Public Member Functions

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

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 183 of file qgsauthconfig.h.

Constructor & Destructor Documentation

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 165 of file qgsauthconfig.cpp.

Member Function Documentation

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

Chain of Certificate Authorities for client certificate.

Definition at line 236 of file qgsauthconfig.h.

const QString QgsPkiBundle::certId ( ) const

The sha hash of the client certificate.

Definition at line 299 of file qgsauthconfig.cpp.

const QSslCertificate QgsPkiBundle::clientCert ( ) const
inline

Client certificate object.

Definition at line 226 of file qgsauthconfig.h.

const QSslKey QgsPkiBundle::clientKey ( ) const
inline

Private key object.

Definition at line 231 of file qgsauthconfig.h.

const QgsPkiBundle QgsPkiBundle::fromPemPaths ( const QString certPath,
const QString keyPath,
const QString keyPass = QString::null,
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 195 of file qgsauthconfig.cpp.

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

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

Parameters
bundlepathBundle file path
bundlepassOptional bundle passphrase

Definition at line 242 of file qgsauthconfig.cpp.

bool QgsPkiBundle::isNull ( ) const

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

Definition at line 289 of file qgsauthconfig.cpp.

bool QgsPkiBundle::isValid ( ) const

Whether the bundle is valid.

Definition at line 294 of file qgsauthconfig.cpp.

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

Set chain of Certificate Authorities for client certificate.

Definition at line 238 of file qgsauthconfig.h.

void QgsPkiBundle::setClientCert ( const QSslCertificate cert)

Set client certificate object.

Definition at line 308 of file qgsauthconfig.cpp.

void QgsPkiBundle::setClientKey ( const QSslKey certkey)

Set private key object.

Definition at line 317 of file qgsauthconfig.cpp.


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