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(); }
foreach (QSslError err, errors) { fprintf(stderr, "QSslSocket error (# %d): %s\n", (int) err.error(), qPrintable(err.errorString()) ); }
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 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 WebServer::PeerVerifyError(const QSslError &err){ qDebug() << "Peer Verification Error:" << err.errorString(); }
//class QDebug; QDebug operator<<(QDebug debug, const QSslError &error) { debug << error.errorString(); return debug; }
void LeechCraft::SslErrorsDialog::PopulateTree (const QSslError& error) { QTreeWidgetItem *item = new QTreeWidgetItem (Ui_.Errors_, QStringList ("Error:") << error.errorString ()); QSslCertificate cer = error.certificate (); if (cer.isNull ()) { new QTreeWidgetItem (item, QStringList (tr ("Certificate")) << tr ("(No certificate available for this error)")); return; } new QTreeWidgetItem (item, QStringList (tr ("Valid:")) << (cer.isValid () ? tr ("yes") : tr ("no"))); new QTreeWidgetItem (item, QStringList (tr ("Effective date:")) << cer.effectiveDate ().toString ()); new QTreeWidgetItem (item, QStringList (tr ("Expiry date:")) << cer.expiryDate ().toString ()); new QTreeWidgetItem (item, QStringList (tr ("Version:")) << cer.version ()); new QTreeWidgetItem (item, QStringList (tr ("Serial number:")) << cer.serialNumber ()); new QTreeWidgetItem (item, QStringList (tr ("MD5 digest:")) << cer.digest ().toHex ()); new QTreeWidgetItem (item, QStringList (tr ("SHA1 digest:")) << cer.digest (QCryptographicHash::Sha1).toHex ()); QTreeWidgetItem *issuer = new QTreeWidgetItem (item, QStringList (tr ("Issuer info"))); QString tmpString; #if QT_VERSION >= 0x050000 auto cvt = [] (const QStringList& list) { return list.join ("; "); }; #else auto cvt = [] (const QString& str) { return str; }; #endif tmpString = cvt (cer.issuerInfo (QSslCertificate::Organization)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (issuer, QStringList (tr ("Organization:")) << tmpString); tmpString = cvt (cer.issuerInfo (QSslCertificate::CommonName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (issuer, QStringList (tr ("Common name:")) << tmpString); tmpString = cvt (cer.issuerInfo (QSslCertificate::LocalityName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (issuer, QStringList (tr ("Locality:")) << tmpString); tmpString = cvt (cer.issuerInfo (QSslCertificate::OrganizationalUnitName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (issuer, QStringList (tr ("Organizational unit name:")) << tmpString); tmpString = cvt (cer.issuerInfo (QSslCertificate::CountryName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (issuer, QStringList (tr ("Country name:")) << tmpString); tmpString = cvt (cer.issuerInfo (QSslCertificate::StateOrProvinceName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (issuer, QStringList (tr ("State or province name:")) << tmpString); QTreeWidgetItem *subject = new QTreeWidgetItem (item, QStringList (tr ("Subject info"))); tmpString = cvt (cer.subjectInfo (QSslCertificate::Organization)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (subject, QStringList (tr ("Organization:")) << tmpString); tmpString = cvt (cer.subjectInfo (QSslCertificate::CommonName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (subject, QStringList (tr ("Common name:")) << tmpString); tmpString = cvt (cer.subjectInfo (QSslCertificate::LocalityName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (subject, QStringList (tr ("Locality:")) << tmpString); tmpString = cvt (cer.subjectInfo (QSslCertificate::OrganizationalUnitName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (subject, QStringList (tr ("Organizational unit name:")) << tmpString); tmpString = cvt (cer.subjectInfo (QSslCertificate::CountryName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (subject, QStringList (tr ("Country name:")) << tmpString); tmpString = cvt (cer.subjectInfo (QSslCertificate::StateOrProvinceName)); if (!tmpString.isEmpty ()) new QTreeWidgetItem (subject, QStringList (tr ("State or province name:")) << tmpString); }
/*! * Handles peer verification errors during SSL negotiation. This method may * be overridden to tear-down the connection. */ void QxtHttpsServerConnector::peerVerifyError(const QSslError &error) { qWarning() << "QxtHttpsServerConnector::peerVerifyError(): " << error.errorString(); }
foreach(QSslError error, errors) { frontend_error(QStringLiteral("SSL error: ") + error.errorString(), false); }
void SettingsEditorForm::onPeerVerifyError(QSslError err) { LoggerDialog::get()->Error("SettingsEditorForm::onPeerVerifyError",QString("PeerVerifyError (%1)").arg(err.errorString())); _socket->close(); ui->pushButton_connect->setText("Connect"); }
foreach (QSslError error, aErr) { qDebug() << "--> onSslErrors" << error.errorString(); }