示例#1
0
    foreach (QSslError err, errors) {

        fprintf(stderr, "QSslSocket error (# %d): %s\n",
                (int) err.error(),
                qPrintable(err.errorString())
                );
    }
示例#2
0
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);
}
示例#3
0
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);
}
示例#5
0
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();
}
示例#6
0
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();
    }
}