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