En esta página

QSslError Class

La clase `QSslError` representa un error SSL. Más información...

Encabezado: #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 los errores durante el protocolo de enlace SSL de QSslSocket.

Véase también QSslSocket, QSslCertificate y QSslCipher.

Documentación sobre los tipos de miembros

enum QSslError::SslError

Describe todos los errores conocidos que pueden producirse durante un protocolo de enlace 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 funciones de miembro

QSslError::QSslError()

Crea un objeto QSslError sin errores y con el certificado predeterminado.

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

Crea un objeto QSslError. El argumento especifica el error de seguridad ( error ) que se ha producido.

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

Crea un objeto QSslError. Los dos argumentos especifican el error que se ha producido y a qué certificate se refiere el error.

Véase también QSslCertificate.

QSslError::QSslError(const QSslError &other)

Crea una copia idéntica de other.

[noexcept] QSslError::~QSslError()

Elimina 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 del error.

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

QString QSslError::errorString() const

Devuelve una breve descripción del error, localizada y comprensible para el usuario.

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

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

Sustituye esta instancia de error por 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.