En esta página

QSslError Class

La clase QSslError proporciona un error SSL. Más...

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

Nota: Todas las funciones de esta clase son reentrantes.

Tipos Públicos

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

Funciones Públicas

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

Descripción Detallada

QSslError proporciona una API sencilla para gestionar errores durante el handshake SSL de QSslSocket.

Ver también QSslSocket, QSslCertificate, y QSslCipher.

Documentación de tipos de miembros

enum QSslError::SslError

Describe todos los errores reconocidos que pueden ocurrir durante un handshake SSL.

ConstanteValor
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

Véase también QSslError::errorString().

Documentación de las funciones miembro

QSslError::QSslError()

Construye un objeto QSslError sin error y con certificado por defecto.

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

Construye un objeto QSslError. El argumento especifica el error que ocurrió.

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

Construye un objeto QSslError. Los dos argumentos especifican el error que ha ocurrido, y a qué certificate se refiere el error.

Véase también QSslCertificate.

QSslError::QSslError(const QSslError &other)

Construye una copia idéntica de other.

[noexcept] QSslError::~QSslError()

Destruye el objeto QSslError.

QSslCertificate QSslError::certificate() const

Devuelve el certificado asociado a este error, o un certificado nulo si el error no está relacionado con ningún certificado.

Véase también error() y errorString().

QSslError::SslError QSslError::error() const

Devuelve el tipo de error.

Véase también errorString() y certificate().

QString QSslError::errorString() const

Devuelve una breve descripción localizada y legible por humanos del error.

Véase también error() y certificate().

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

Intercambia esta instancia de error con other. Esta operación es muy rápida y nunca falla.

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

Devuelve true si este error no es igual a other; en caso contrario devuelve false.

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

Asigna el contenido de other a este error.

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

Devuelve true si este error es igual a other; en caso contrario devuelve 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.