Class: QgsPkiBundle¶
Storage set for PKI bundle: SSL certificate, key, optional CA cert chain.
Note
Useful for caching the bundle during application run sessions
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 |
- class qgis.core.QgsPkiBundle[source]¶
Bases:
object
- __init__(clientCert: QSslCertificate = QSslCertificate(), clientKey: QSslKey = QSslKey(), caChain: Iterable[QSslCertificate] = [])
Construct a bundle from existing PKI components
- Parameters:
clientCert (QSslCertificate = QSslCertificate()) – Certificate to store in bundle
clientKey (QSslKey = QSslKey()) – Private key to store in bundle
caChain (Iterable[QSslCertificate] = []) – Chain of Certificate Authorities for client certificate
- __init__(a0: QgsPkiBundle)
- Parameters:
a0 (QgsPkiBundle)
- caChain(self) List[QSslCertificate] ¶
Chain of Certificate Authorities for client certificate
- Return type:
List[QSslCertificate]
- fromPemPaths(certPath: str | None, keyPath: str | None, keyPass: str | None = '', caChain: Iterable[QSslCertificate] = []) QgsPkiBundle [source]¶
Construct a bundle of PKI components from PEM-formatted file paths
- Parameters:
certPath (Optional[str]) – Certificate file path
keyPath (Optional[str]) – Private key path
keyPass (Optional[str] = '') – Private key passphrase
caChain (Iterable[QSslCertificate] = []) – Chain of Certificate Authorities for client certificate
- Return type:
- fromPkcs12Paths(bundlepath: str | None, bundlepass: str | None = '') QgsPkiBundle [source]¶
Construct a bundle of PKI components from a PKCS#12 file path
- Parameters:
bundlepath (Optional[str]) – Bundle file path
bundlepass (Optional[str] = '') – Optional bundle passphrase
- Return type:
- isNull(self) bool [source]¶
Whether the bundle, either its certificate or private key, is null
- Return type:
bool
- setCaChain(self, cachain: Iterable[QSslCertificate])[source]¶
Sets chain of Certificate Authorities for client certificate
- Parameters:
cachain (Iterable[QSslCertificate])