Sur cette page

QSslError Class

La classe QSslError fournit une erreur SSL. Plus d'informations...

En-tête : #include <QSslError>
CMake : find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake : QT += network

Remarque : toutes les fonctions de cette classe sont réentrantes.

Types publics

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

Fonctions publiques

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

Description détaillée

QSslError fournit une API simple pour gérer les erreurs au cours de la poignée de main SSL de QSslSocket.

Voir aussi QSslSocket, QSslCertificate, et QSslCipher.

Type de membre Documentation

enum QSslError::SslError

Décrit toutes les erreurs reconnues qui peuvent se produire lors d'une poignée de main SSL.

ConstanteValeur
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

Voir aussi QSslError::errorString().

Documentation des fonctions membres

QSslError::QSslError()

Construit un objet QSslError sans erreur et avec un certificat par défaut.

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

Construit un objet QSslError. L'argument spécifie l'adresse error qui s'est produite.

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

Construit un objet QSslError. Les deux arguments spécifient le error qui s'est produit et le certificate auquel l'erreur se rapporte.

Voir aussi QSslCertificate.

QSslError::QSslError(const QSslError &other)

Construit une copie identique de other.

[noexcept] QSslError::~QSslError()

Détruit l'objet QSslError.

QSslCertificate QSslError::certificate() const

Renvoie le certificat associé à cette erreur, ou un certificat nul si l'erreur ne concerne aucun certificat.

Voir aussi error() et errorString().

QSslError::SslError QSslError::error() const

Renvoie le type d'erreur.

Voir aussi errorString() et certificate().

QString QSslError::errorString() const

Renvoie une courte description localisée et lisible par l'homme de l'erreur.

Voir aussi error() et certificate().

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

Remplace cette instance d'erreur par other. Cette opération est très rapide et n'échoue jamais.

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

Renvoie true si cette erreur n'est pas égale à other; sinon, renvoie false.

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

Affecte le contenu de other à cette erreur.

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

Renvoie true si cette erreur est égale à other; sinon renvoie false.

© 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.