diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2021-12-15 19:25:48 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2021-12-16 08:59:54 +0100 |
commit | 2ff75b95af8c63e8c2ab2b6b551e09ab39432e8b (patch) | |
tree | 0947cc5b2ce2f5ee1e41fd4ee7f84a05e9c9d7eb /source | |
parent | dd0455444d191783d5e025a25efa293a0f6272bb (diff) | |
download | current-2ff75b95af8c63e8c2ab2b6b551e09ab39432e8b.tar.gz |
Wed Dec 15 19:25:48 UTC 202120211215192548
ap/nano-6.0-x86_64-1.txz: Upgraded.
kde/kdepim-runtime-21.12.0-x86_64-3.txz: Rebuilt.
Rebuilt with the updated patch that was merged upstream:
[PATCH] POP3: Fix SSL/TLS connections
Thanks to gmgf.
n/bind-9.16.24-x86_64-1.txz: Upgraded.
n/openvpn-2.5.5-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source')
4 files changed, 129 insertions, 97 deletions
diff --git a/source/kde/kde/build/kdepim-runtime b/source/kde/kde/build/kdepim-runtime index 0cfbf088..00750edc 100644 --- a/source/kde/kde/build/kdepim-runtime +++ b/source/kde/kde/build/kdepim-runtime @@ -1 +1 @@ -2 +3 diff --git a/source/kde/kde/patch/kdepim-runtime.patch b/source/kde/kde/patch/kdepim-runtime.patch index f8ea45d7..d113ad44 100644 --- a/source/kde/kde/patch/kdepim-runtime.patch +++ b/source/kde/kde/patch/kdepim-runtime.patch @@ -1 +1 @@ -cat $CWD/patch/kdepim-runtime/fb456a2ad77b8d2bd4b0013832591c1dda8bb09a.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } +cat $CWD/patch/kdepim-runtime/f14fabcefb45790175e209ef8ae394def4a805e9.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } diff --git a/source/kde/kde/patch/kdepim-runtime/f14fabcefb45790175e209ef8ae394def4a805e9.patch b/source/kde/kde/patch/kdepim-runtime/f14fabcefb45790175e209ef8ae394def4a805e9.patch new file mode 100644 index 00000000..e911588d --- /dev/null +++ b/source/kde/kde/patch/kdepim-runtime/f14fabcefb45790175e209ef8ae394def4a805e9.patch @@ -0,0 +1,127 @@ +From f14fabcefb45790175e209ef8ae394def4a805e9 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Fri, 10 Dec 2021 21:55:13 +0100 +Subject: [PATCH] POP3: Fix SSL connections + +We need to go into ssl before trying to read from the socket, otherwise +nothing works + +BUGS: 446751 +--- + resources/pop3/pop3protocol.cpp | 72 ++++++++++++++++++++------------- + resources/pop3/pop3protocol.h | 2 + + 2 files changed, 45 insertions(+), 29 deletions(-) + +diff --git a/resources/pop3/pop3protocol.cpp b/resources/pop3/pop3protocol.cpp +index c2d01d33a..15971919e 100644 +--- a/resources/pop3/pop3protocol.cpp ++++ b/resources/pop3/pop3protocol.cpp +@@ -535,6 +535,39 @@ Result POP3Protocol::loginPASS() + return Result::pass(); + } + ++Result POP3Protocol::startSsl() ++{ ++ mSocket->ignoreSslErrors(); // Don't worry, errors are handled manually below ++ mSocket->startClientEncryption(); ++ const bool encryptionStarted = mSocket->waitForEncrypted(s_connectTimeout); ++ ++ const QSslCipher cipher = mSocket->sessionCipher(); ++ const QList<QSslError> errors = mSocket->sslHandshakeErrors(); ++ if (!encryptionStarted || !errors.isEmpty() || !mSocket->isEncrypted() || cipher.isNull() || cipher.usedBits() == 0) { ++ QString errorString = std::accumulate(errors.begin(), errors.end(), QString(), [](QString cur, const QSslError &error) { ++ if (!cur.isEmpty()) ++ cur += QLatin1Char('\n'); ++ cur += error.errorString(); ++ return cur; ++ }); ++ ++ qCDebug(POP3_LOG) << "Initial SSL handshake failed. cipher.isNull() is" << cipher.isNull() << ", cipher.usedBits() is" << cipher.usedBits() ++ << ", the socket says:" << mSocket->errorString() << "and the SSL errors are:" << errorString; ++ mContinueAfterSslError = false; ++ Q_EMIT sslError(KSslErrorUiData(mSocket)); ++ if (!mContinueAfterSslError) { ++ if (errorString.isEmpty()) ++ errorString = mSocket->errorString(); ++ qCDebug(POP3_LOG) << "TLS setup has failed. Aborting." << errorString; ++ closeConnection(); ++ return Result::fail(ERR_SSL_FAILURE, i18n("SSL/TLS error: %1", errorString)); ++ } ++ } else { ++ qCDebug(POP3_LOG) << "TLS has been enabled."; ++ } ++ return Result::pass(); ++} ++ + Result POP3Protocol::openConnection() + { + m_try_apop = mSettings.authenticationMethod() == MailTransport::Transport::EnumAuthenticationType::APOP; +@@ -560,6 +593,13 @@ Result POP3Protocol::openConnection() + return Result::fail(mSocket->error(), errorString); + } + ++ if (mSettings.useSSL()) { ++ const Result res = startSsl(); ++ if (!res.success) { ++ return res; ++ } ++ } ++ + mConnected = true; + + greeting_buf = new char[GREETING_BUF_LEN]; +@@ -608,35 +648,9 @@ Result POP3Protocol::openConnection() + "was unsuccessful.\nYou can " + "disable TLS in the POP account settings dialog.")); + } +- } +- if (mSettings.useSSL() || mSettings.useTLS()) { +- mSocket->ignoreSslErrors(); // Don't worry, errors are handled manually below +- mSocket->startClientEncryption(); +- const bool encryptionStarted = mSocket->waitForEncrypted(s_connectTimeout); +- +- const QSslCipher cipher = mSocket->sessionCipher(); +- const QList<QSslError> errors = mSocket->sslHandshakeErrors(); +- if (!encryptionStarted || !errors.isEmpty() || !mSocket->isEncrypted() || cipher.isNull() || cipher.usedBits() == 0) { +- QString errorString = std::accumulate(errors.begin(), errors.end(), QString(), [](QString cur, const QSslError &error) { +- if (!cur.isEmpty()) +- cur += QLatin1Char('\n'); +- cur += error.errorString(); +- return cur; +- }); +- +- qCDebug(POP3_LOG) << "Initial SSL handshake failed. cipher.isNull() is" << cipher.isNull() << ", cipher.usedBits() is" << cipher.usedBits() +- << ", the socket says:" << mSocket->errorString() << "and the SSL errors are:" << errorString; +- mContinueAfterSslError = false; +- Q_EMIT sslError(KSslErrorUiData(mSocket)); +- if (!mContinueAfterSslError) { +- if (errorString.isEmpty()) +- errorString = mSocket->errorString(); +- qCDebug(POP3_LOG) << "TLS setup has failed. Aborting." << errorString; +- closeConnection(); +- return Result::fail(ERR_SSL_FAILURE, i18n("SSL/TLS error: %1", errorString)); +- } +- } else { +- qCDebug(POP3_LOG) << "TLS has been enabled."; ++ const Result res = startSsl(); ++ if (!res.success) { ++ return res; + } + } + +diff --git a/resources/pop3/pop3protocol.h b/resources/pop3/pop3protocol.h +index 9b40b334f..d01f7ab7a 100644 +--- a/resources/pop3/pop3protocol.h ++++ b/resources/pop3/pop3protocol.h +@@ -127,6 +127,8 @@ private: + */ + Q_REQUIRED_RESULT Result loginPASS(); + ++ Q_REQUIRED_RESULT Result startSsl(); ++ + const Settings &mSettings; + QSslSocket *const mSocket; + unsigned short int m_iPort; +-- +GitLab + diff --git a/source/kde/kde/patch/kdepim-runtime/fb456a2ad77b8d2bd4b0013832591c1dda8bb09a.patch b/source/kde/kde/patch/kdepim-runtime/fb456a2ad77b8d2bd4b0013832591c1dda8bb09a.patch deleted file mode 100644 index 9aa39dbf..00000000 --- a/source/kde/kde/patch/kdepim-runtime/fb456a2ad77b8d2bd4b0013832591c1dda8bb09a.patch +++ /dev/null @@ -1,95 +0,0 @@ -From fb456a2ad77b8d2bd4b0013832591c1dda8bb09a Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid <aacid@kde.org> -Date: Fri, 10 Dec 2021 21:55:13 +0100 -Subject: [PATCH] POP3: Fix SSL/TLS connections - -We need to go into ssl before trying to read from the socket, otherwise -nothing works - -BUGS: 446751 ---- - resources/pop3/pop3protocol.cpp | 61 +++++++++++++++++---------------- - 1 file changed, 31 insertions(+), 30 deletions(-) - -diff --git a/resources/pop3/pop3protocol.cpp b/resources/pop3/pop3protocol.cpp -index c2d01d33a..02fa49770 100644 ---- a/resources/pop3/pop3protocol.cpp -+++ b/resources/pop3/pop3protocol.cpp -@@ -560,6 +560,37 @@ Result POP3Protocol::openConnection() - return Result::fail(mSocket->error(), errorString); - } - -+ if (mSettings.useSSL() || mSettings.useTLS()) { -+ mSocket->ignoreSslErrors(); // Don't worry, errors are handled manually below -+ mSocket->startClientEncryption(); -+ const bool encryptionStarted = mSocket->waitForEncrypted(s_connectTimeout); -+ -+ const QSslCipher cipher = mSocket->sessionCipher(); -+ const QList<QSslError> errors = mSocket->sslHandshakeErrors(); -+ if (!encryptionStarted || !errors.isEmpty() || !mSocket->isEncrypted() || cipher.isNull() || cipher.usedBits() == 0) { -+ QString errorString = std::accumulate(errors.begin(), errors.end(), QString(), [](QString cur, const QSslError &error) { -+ if (!cur.isEmpty()) -+ cur += QLatin1Char('\n'); -+ cur += error.errorString(); -+ return cur; -+ }); -+ -+ qCDebug(POP3_LOG) << "Initial SSL handshake failed. cipher.isNull() is" << cipher.isNull() << ", cipher.usedBits() is" << cipher.usedBits() -+ << ", the socket says:" << mSocket->errorString() << "and the SSL errors are:" << errorString; -+ mContinueAfterSslError = false; -+ Q_EMIT sslError(KSslErrorUiData(mSocket)); -+ if (!mContinueAfterSslError) { -+ if (errorString.isEmpty()) -+ errorString = mSocket->errorString(); -+ qCDebug(POP3_LOG) << "TLS setup has failed. Aborting." << errorString; -+ closeConnection(); -+ return Result::fail(ERR_SSL_FAILURE, i18n("SSL/TLS error: %1", errorString)); -+ } -+ } else { -+ qCDebug(POP3_LOG) << "TLS has been enabled."; -+ } -+ } -+ - mConnected = true; - - greeting_buf = new char[GREETING_BUF_LEN]; -@@ -609,36 +640,6 @@ Result POP3Protocol::openConnection() - "disable TLS in the POP account settings dialog.")); - } - } -- if (mSettings.useSSL() || mSettings.useTLS()) { -- mSocket->ignoreSslErrors(); // Don't worry, errors are handled manually below -- mSocket->startClientEncryption(); -- const bool encryptionStarted = mSocket->waitForEncrypted(s_connectTimeout); -- -- const QSslCipher cipher = mSocket->sessionCipher(); -- const QList<QSslError> errors = mSocket->sslHandshakeErrors(); -- if (!encryptionStarted || !errors.isEmpty() || !mSocket->isEncrypted() || cipher.isNull() || cipher.usedBits() == 0) { -- QString errorString = std::accumulate(errors.begin(), errors.end(), QString(), [](QString cur, const QSslError &error) { -- if (!cur.isEmpty()) -- cur += QLatin1Char('\n'); -- cur += error.errorString(); -- return cur; -- }); -- -- qCDebug(POP3_LOG) << "Initial SSL handshake failed. cipher.isNull() is" << cipher.isNull() << ", cipher.usedBits() is" << cipher.usedBits() -- << ", the socket says:" << mSocket->errorString() << "and the SSL errors are:" << errorString; -- mContinueAfterSslError = false; -- Q_EMIT sslError(KSslErrorUiData(mSocket)); -- if (!mContinueAfterSslError) { -- if (errorString.isEmpty()) -- errorString = mSocket->errorString(); -- qCDebug(POP3_LOG) << "TLS setup has failed. Aborting." << errorString; -- closeConnection(); -- return Result::fail(ERR_SSL_FAILURE, i18n("SSL/TLS error: %1", errorString)); -- } -- } else { -- qCDebug(POP3_LOG) << "TLS has been enabled."; -- } -- } - - if (supports_apop && m_try_apop) { - qCDebug(POP3_LOG) << "Trying APOP"; --- -GitLab - |