Commit 33acfd3b authored by Axel Beckert's avatar Axel Beckert

Fix HTTPS connections to sites which offer TLS 1.3

Patch by Andreas Metzler, source:
https://lists.gnu.org/archive/html/lynx-dev/2018-12/msg00009.html
https://lists.gnu.org/archive/html/lynx-dev/2018-12/txtjpEGaTFv9i.txt

Closes: #918934
parent 7f7ddada
lynx (2.8.9rel.1-3) UNRELEASED; urgency=medium
* Apply patch by Andreas Metzler to fix HTTPS connections to sites which
offer TLS 1.3. (Closes: #918934)
-- Axel Beckert <abe@debian.org> Thu, 10 Jan 2019 23:12:33 +0100
lynx (2.8.9rel.1-2) unstable; urgency=medium
* Mark lynx-common as "Multi-Arch: foreign", too. (Closes: #906443)
......
Description: Fix connection to HTTPS sites offering TLS 1.3
Author: Andreas Metzler <ametzler@bebt.de>
Origin: https://lists.gnu.org/archive/html/lynx-dev/2018-12/msg00009.html
--- a/src/tidy_tls.c
+++ b/src/tidy_tls.c
@@ -462,13 +462,25 @@
{
int rc;
- rc = (int) gnutls_record_recv(ssl->gnutls_state, buffer, (size_t) length);
+ do
+ {
+ rc = (int) gnutls_record_recv(ssl->gnutls_state, buffer, (size_t) length);
+ }
+ while ((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED));
if (rc < 0 && gnutls_error_is_fatal(rc) == 0) {
if (rc == GNUTLS_E_REHANDSHAKE) {
(void) gnutls_handshake(ssl->gnutls_state);
- gnutls_record_send(ssl->gnutls_state, ssl->sendbuffer, (size_t) ssl->bytes_sent);
- rc = (int) gnutls_record_recv(ssl->gnutls_state, buffer, (size_t) length);
+ do
+ {
+ rc = (int) gnutls_record_send(ssl->gnutls_state, ssl->sendbuffer, (size_t) ssl->bytes_sent);
+ }
+ while ((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED));
+ do
+ {
+ rc = (int) gnutls_record_recv(ssl->gnutls_state, buffer, (size_t) length);
+ }
+ while ((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED));
}
}
@@ -500,7 +512,11 @@
{
int rc;
- rc = (int) gnutls_record_send(ssl->gnutls_state, buffer, (size_t) length);
+ do
+ {
+ rc = (int) gnutls_record_send(ssl->gnutls_state, buffer, (size_t) length);
+ }
+ while ((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED));
ssl->last_error = rc;
if (rc < 0) {
......@@ -2,3 +2,4 @@ lynxcfg.patch
aboutlynx.patch
21_do_not_strip_-g.diff
nested_tables.patch
fix-tls-1.3.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment