foreach (QSslError err, errors) { fprintf(stderr, "QSslSocket error (# %d): %s\n", (int) err.error(), qPrintable(err.errorString()) ); }
bool SslCertificateManager::acceptCertificate(const QString &hostName, const QSslError &error) const { if (error.error() == QSslError::HostNameMismatch) if (m_sslCertificateRepository->containsCertificateFor(hostName, error.certificate().subjectAlternativeNames().values(QSsl::DnsEntry))) return true; auto hostCertificate = SslCertificate{hostName, error.certificate().toPem().toHex()}; return m_sslCertificateRepository->containsCertificate(hostCertificate); }
void HttpDownload::slot_getSSLError(QNetworkReply* reply, const QList<QSslError> &errors) { QSslError sslError = errors.first(); if(sslError.error() == 11 ) { // Error on main window } }
void SslConnect::processPeerVerifyError(const QSslError& e) { printf("\nIn processPeerVerifyError"); QTextStream out(stdout); out << endl << e.errorString() <<'(' << e.error() << ')' << endl; QList<QSslError> tmp; tmp.append(e); pSkt->ignoreSslErrors(tmp); }
void GroupSocket::onPeerVerifyError(const QSslError &error) { // Ignore expected warnings if (error.error() == QSslError::SelfSignedCertificate) return; emit sendLog("<b>WARNING:</b> " + error.errorString()); qWarning() << "onPeerVerifyError" << static_cast<int>(socket.error()) << socket.errorString() << error.errorString(); }
void HttpDownload::slot_getSSLError(QNetworkReply* reply, const QList<QSslError> &errors) { QSslError sslError = errors.first(); if(sslError.error() == 11) { Logging::addEntry(LOG_LEVEL_INF, "SSL error: " + sslError.errorString(), FUNCTION_NAME); Logging::addEntry(LOG_LEVEL_INF, "Reply error: " + reply->errorString(), FUNCTION_NAME); } }
void ApiClient::printSslErrors(QList<QSslError> errors) { QSslError error; foreach (error, errors) { qDebug() << "\t" << error.error(); } }