Class: QgsPkiBundle¶
-
class
qgis.core.
QgsPkiBundle
(clientCert: QSslCertificate = QSslCertificate(), clientKey: QSslKey = QSslKey(), caChain: Iterable[QSslCertificate] = [])¶ Bases:
sip.wrapper
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
QgsPkiBundle(QgsPkiBundle)
Storage set for PKI bundle: SSL certificate, key, optional CA cert chain
Note
Useful for caching the bundle during application run sessions
Enums
Methods
Chain of Certificate Authorities for client certificate
The sha hash of the client certificate
Client certificate object
Private key object
Construct a bundle of PKI components from PEM-formatted file paths
Construct a bundle of PKI components from a PKCS#12 file path
Whether the bundle, either its certificate or private key, is null
Whether the bundle is valid
Sets chain of Certificate Authorities for client certificate
Sets client certificate object
Sets private key object
Signals
Attributes
-
caChain
(self) → List[QSslCertificate]¶ Chain of Certificate Authorities for client certificate
-
certId
(self) → str¶ The sha hash of the client certificate
-
clientCert
(self) → QSslCertificate¶ Client certificate object
-
clientKey
(self) → QSslKey¶ Private key object
-
fromPemPaths
(certPath: str, keyPath: str, keyPass: str = '', caChain: Iterable[QSslCertificate] = []) → QgsPkiBundle¶ 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
-
fromPkcs12Paths
(bundlepath: str, bundlepass: str = '') → QgsPkiBundle¶ Construct a bundle of PKI components from a PKCS#12 file path
- Parameters
bundlepath – Bundle file path
bundlepass – Optional bundle passphrase
-
isNull
(self) → bool¶ Whether the bundle, either its certificate or private key, is null
-
isValid
(self) → bool¶ Whether the bundle is valid
-
setCaChain
(self, cachain: Iterable[QSslCertificate])¶ Sets chain of Certificate Authorities for client certificate
-
setClientCert
(self, cert: QSslCertificate)¶ Sets client certificate object
-
setClientKey
(self, certkey: QSslKey)¶ Sets private key object