In questa pagina

QSslError Class

La classe QSslError rappresenta un errore SSL. Maggiori informazioni...

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

Nota: tutte le funzioni di questa classe sono rientranti.

Tipi pubblici

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

Funzioni pubbliche

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

Descrizione dettagliata

QSslError fornisce una semplice API per la gestione degli errori durante l'handshake SSL di QSslSocket.

Vedi anche QSslSocket, QSslCertificate e QSslCipher.

Documentazione sui tipi dei membri

enum QSslError::SslError

Descrive tutti gli errori riconosciuti che possono verificarsi durante un handshake SSL.

CostanteValore
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

Vedi anche QSslError::errorString().

Documentazione delle funzioni membro

QSslError::QSslError()

Crea un oggetto QSslError senza errori e con il certificato predefinito.

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

Crea un oggetto QSslError. L'argomento specifica l'error e verificatasi.

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

Crea un oggetto QSslError. I due argomenti specificano l'error che si è verificato e a quale certificate si riferisce l'errore.

Vedi anche QSslCertificate.

QSslError::QSslError(const QSslError &other)

Crea una copia identica di other.

[noexcept] QSslError::~QSslError()

Elimina l'oggetto ` QSslError `.

QSslCertificate QSslError::certificate() const

Restituisce il certificato associato a questo errore oppure un certificato nullo se l'errore non è correlato ad alcun certificato.

Vedi anche error() e errorString().

QSslError::SslError QSslError::error() const

Restituisce il tipo dell'errore.

Vedi anche errorString() e certificate().

QString QSslError::errorString() const

Restituisce una breve descrizione dell'errore, localizzata e comprensibile all'utente.

Vedi anche error() e certificate().

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

Sostituisce questa istanza di errore con other. Questa operazione è molto veloce e non fallisce mai.

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

Restituisce ` true ` se questo errore non è uguale a ` other`; altrimenti restituisce `false`.

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

Assegna il contenuto di ` other ` a questo errore.

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

Restituisce ` true ` se questo errore è uguale a ` other`; altrimenti restituisce ` 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.