QgsPkiBundle class
Storage set for PKI bundle: SSL certificate, key, optional CA cert chain.
Contents
Public static functions
- static auto fromPemPaths(const QString& certPath, const QString& keyPath, const QString& keyPass = QString(), const QList<QSslCertificate>& caChain = QList<QSslCertificate>()) -> const QgsPkiBundle
- Construct a bundle of PKI components from PEM-formatted file paths.
- static auto fromPkcs12Paths(const QString& bundlepath, const QString& bundlepass = QString()) -> const QgsPkiBundle
- Construct a bundle of PKI components from a PKCS#12 file path.
Constructors, destructors, conversion operators
- QgsPkiBundle(const QSslCertificate& clientCert = QSslCertificate(), const QSslKey& clientKey = QSslKey(), const QList<QSslCertificate>& caChain = QList<QSslCertificate>())
- Construct a bundle from existing PKI components.
Public functions
- auto caChain() const -> const QList<QSslCertificate>
- Chain of Certificate Authorities for client certificate.
- auto certId() const -> const QString
- The sha hash of the client certificate.
- auto clientCert() const -> const QSslCertificate
- Client certificate object.
- auto clientKey() const -> const QSslKey
- Private key object.
- auto isNull() const -> bool
- Whether the bundle, either its certificate or private key, is null.
- auto isValid() const -> bool
- 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.
Function documentation
static const QgsPkiBundle 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.
| Parameters | |
|---|---|
| certPath | Certificate file path |
| keyPath | Private key path |
| keyPass | Private key passphrase |
| caChain | Chain of Certificate Authorities for client certificate |
static const QgsPkiBundle QgsPkiBundle:: fromPkcs12Paths(const QString& bundlepath,
const QString& bundlepass = QString())
Construct a bundle of PKI components from a PKCS#12 file path.
| Parameters | |
|---|---|
| bundlepath | Bundle file path |
| bundlepass | Optional bundle passphrase |
QgsPkiBundle:: QgsPkiBundle(const QSslCertificate& clientCert = QSslCertificate(),
const QSslKey& clientKey = QSslKey(),
const QList<QSslCertificate>& caChain = QList<QSslCertificate>())
Construct a bundle from existing PKI components.
| Parameters | |
|---|---|
| clientCert | Certificate to store in bundle |
| clientKey | Private key to store in bundle |
| caChain | Chain of Certificate Authorities for client certificate |