Auf dieser Seite

QSslError Class

Die Klasse „QSslError“ stellt einen SSL-Fehler dar. Mehr dazu...

Header: #include <QSslError>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network

Hinweis: Alle Funktionen dieser Klasse sind reentrant.

Öffentliche Typen

enum SslError { NoError, UnableToGetIssuerCertificate, UnableToDecryptCertificateSignature, UnableToDecodeIssuerPublicKey, CertificateSignatureFailed, …, OcspStatusUnknown }

Öffentliche Funktionen

QSslError()
QSslError(QSslError::SslError error)
QSslError(QSslError::SslError error, const QSslCertificate &certificate)
QSslError(const QSslError &other)
~QSslError()
QSslCertificate certificate() const
QSslError::SslError error() const
QString errorString() const
void swap(QSslError &other)
bool operator!=(const QSslError &other) const
QSslError &operator=(const QSslError &other)
bool operator==(const QSslError &other) const

Ausführliche Beschreibung

QSslError stellt eine einfache API zur Fehlerbehandlung während des SSL-Handshakes von „ QSslSocket “ bereit.

Siehe auch QSslSocket, QSslCertificate und QSslCipher.

Dokumentation zu den Mitgliedstypen

enum QSslError::SslError

Beschreibt alle bekannten Fehler, die während eines SSL-Handshakes auftreten können.

KonstanteWert
QSslError::NoError0
QSslError::UnableToGetIssuerCertificate1
QSslError::UnableToDecryptCertificateSignature2
QSslError::UnableToDecodeIssuerPublicKey3
QSslError::CertificateSignatureFailed4
QSslError::CertificateNotYetValid5
QSslError::CertificateExpired6
QSslError::InvalidNotBeforeField7
QSslError::InvalidNotAfterField8
QSslError::SelfSignedCertificate9
QSslError::SelfSignedCertificateInChain10
QSslError::UnableToGetLocalIssuerCertificate11
QSslError::UnableToVerifyFirstCertificate12
QSslError::CertificateRevoked13
QSslError::InvalidCaCertificate14
QSslError::PathLengthExceeded15
QSslError::InvalidPurpose16
QSslError::CertificateUntrusted17
QSslError::CertificateRejected18
QSslError::SubjectIssuerMismatch19
QSslError::AuthorityIssuerSerialNumberMismatch20
QSslError::NoPeerCertificate21
QSslError::HostNameMismatch22
QSslError::UnspecifiedError-1
QSslError::NoSslSupport23
QSslError::CertificateBlacklisted24
QSslError::CertificateStatusUnknown25
QSslError::OcspNoResponseFound26
QSslError::OcspMalformedRequest27
QSslError::OcspMalformedResponse28
QSslError::OcspInternalError29
QSslError::OcspTryLater30
QSslError::OcspSigRequred31
QSslError::OcspUnauthorized32
QSslError::OcspResponseCannotBeTrusted33
QSslError::OcspResponseCertIdUnknown34
QSslError::OcspResponseExpired35
QSslError::OcspStatusUnknown36

Siehe auch ` QSslError::errorString()`.

Dokumentation der Mitgliedsfunktionen

QSslError::QSslError()

Erstellt ein QSslError-Objekt ohne Fehler und mit einem Standardzertifikat.

[explicit] QSslError::QSslError(QSslError::SslError error)

Erstellt ein QSslError-Objekt. Das Argument gibt den aufgetretenen Fehler „ error “ an.

QSslError::QSslError(QSslError::SslError error, const QSslCertificate &certificate)

Erstellt ein QSslError-Objekt. Die beiden Argumente geben an, welcher Fehler ( error ) aufgetreten ist und auf welche Verbindung ( certificate ) sich der Fehler bezieht.

Siehe auch „ QSslCertificate “.

QSslError::QSslError(const QSslError &other)

Erstellt eine identische Kopie von other.

[noexcept] QSslError::~QSslError()

Löscht das „ QSslError “-Objekt.

QSslCertificate QSslError::certificate() const

Gibt das mit diesem Fehler verbundene Zertifikat zurück oder ein Null-Zertifikat, falls der Fehler nicht mit einem Zertifikat in Zusammenhang steht.

Siehe auch error() und errorString().

QSslError::SslError QSslError::error() const

Gibt den Typ des Fehlers zurück.

Siehe auch errorString() und certificate().

QString QSslError::errorString() const

Gibt eine kurze, lokalisierte und für Menschen lesbare Beschreibung des Fehlers zurück.

Siehe auch error() und certificate().

[noexcept] void QSslError::swap(QSslError &other)

Ersetzt diese Fehlerinstanz durch „ other “. Dieser Vorgang ist sehr schnell und schlägt niemals fehl.

bool QSslError::operator!=(const QSslError &other) const

Gibt „ true “ zurück, wenn dieser Fehler nicht mit „ other “ übereinstimmt; andernfalls wird „false“ zurückgegeben.

QSslError &QSslError::operator=(const QSslError &other)

Weist diesem Fehler den Inhalt von „ other “ zu.

bool QSslError::operator==(const QSslError &other) const

Gibt „ true “ zurück, wenn dieser Fehler mit „ other “ übereinstimmt; andernfalls wird „ false “ zurückgegeben.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.