PythonQt.QtNetwork.QSslCertificate
QSslCertificate
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
QSslCertificate stores an X509 certificate, and is commonly used to verify the identity and store information about the local host, a remotely connected peer, or a trusted third party Certificate Authority.
There are many ways to construct a QSslCertificate. The most common way is to call QSslSocket::peerCertificate(), which returns a QSslCertificate object, or QSslSocket::peerCertificateChain(), which returns a list of them. You can also load certificates from a DER (binary) or PEM (Base64) encoded bundle, typically stored as one or more local files, or in a Qt Resource.
You can call isNull() to check if your certificate is null. By default, QSslCertificate constructs a null certificate. A null certificate is invalid, but an invalid certificate is not necessarily null. If you want to reset all contents in a certificate, call clear().
After loading a certificate, you can find information about the certificate, its subject, and its issuer, by calling one of the many accessor functions, including version(), serialNumber(), issuerInfo() and subjectInfo(). You can call effectiveDate() and expiryDate() to check when the certificate starts being effective and when it expires. The publicKey() function returns the certificate subject's public key as a QSslKey. You can call issuerInfo() or subjectInfo() to get detailed information about the certificate issuer and its subject.
Internally, QSslCertificate is stored as an X509 structure. You can access this handle by calling handle(), but the results are likely to not be portable.
Source: https://doc.qt.io/archives/qt-5.15/qsslcertificate.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
CommonName |
attribute | Any |
|
CountryName |
attribute | Any |
|
DistinguishedNameQualifier |
attribute | Any |
|
EmailAddress |
attribute | Any |
|
LocalityName |
attribute | Any |
|
Organization |
attribute | Any |
|
OrganizationalUnitName |
attribute | Any |
|
SerialNumber |
attribute | Any |
|
StateOrProvinceName |
attribute | Any |
|
SubjectInfo |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
clear |
function | (self) -> None |
Clears the contents of this certificate, making it a null certificate. |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
digest |
function | (self, algorithm: Any) -> Any |
X.digest(algorithm) -> PythonQt.QtCore.QByteArray |
effectiveDate |
function | (self) -> Any |
X.effectiveDate() -> PythonQt.QtCore.QDateTime |
expiryDate |
function | (self) -> Any |
X.expiryDate() -> PythonQt.QtCore.QDateTime |
extensions |
function | (self) -> tuple |
X.extensions() -> tuple |
fromData |
function | (self, data: Any, format: Any) -> tuple |
X.fromData(data, format) -> tuple |
fromDevice |
function | (self, device: Any, format: Any) -> tuple |
X.fromDevice(device, format) -> tuple |
fromPath |
function | (self, path: str, format: Any, syntax: Any) -> tuple |
X.fromPath(path, format, syntax) -> tuple |
handle |
function | (self) -> int |
Returns a pointer to the native certificate handle, if there is one, else nullptr. |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
importPkcs12 |
function | (self, device: Any, key: Any, cert: Any, caCertificates: Any, passPhrase: Any) -> bool |
X.importPkcs12(device, key, cert, caCertificates, passPhrase) -> bool |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
isBlacklisted |
function | (self) -> bool |
X.isBlacklisted() -> bool |
isNull |
function | (self) -> bool |
X.isNull() -> bool |
isSelfSigned |
function | (self) -> bool |
X.isSelfSigned() -> bool |
issuerInfo |
function | (self, info: Any) -> tuple |
X.issuerInfo(info) -> tuple |
issuerInfoAttributes |
function | (self) -> Any |
Returns a list of the attributes that have values in the issuer information of this certificate. |
operator_assign |
function | (self, other: Any) -> Any |
X.operator_assign(other) -> PythonQt.QtNetwork.QSslCertificate |
publicKey |
function | (self) -> Any |
X.publicKey() -> PythonQt.QtNetwork.QSslKey |
serialNumber |
function | (self) -> Any |
X.serialNumber() -> PythonQt.QtCore.QByteArray |
subjectAlternativeNames |
function | (self) -> Any |
Returns the list of alternative subject names for this certificate. |
subjectInfo |
function | (self, info: Any) -> tuple |
X.subjectInfo(info) -> tuple |
subjectInfoAttributes |
function | (self) -> Any |
Returns a list of the attributes that have values in the subject information of this certificate. |
swap |
function | (self, other: Any) -> None |
Swaps this certificate instance with other. |
toDer |
function | (self) -> Any |
X.toDer() -> PythonQt.QtCore.QByteArray |
toPem |
function | (self) -> Any |
X.toPem() -> PythonQt.QtCore.QByteArray |
toText |
function | (self) -> str |
X.toText() -> str |
verify |
function | (self, certificateChain: Any, hostName: str) -> tuple |
X.verify(certificateChain, hostName) -> tuple |
version |
function | (self) -> Any |
X.version() -> PythonQt.QtCore.QByteArray |