From: thomas@m3y3r.de
To: Eli Zaretskii <eliz@gnu.org>
Cc: thomas@m3y3r.de, 32658@debbugs.gnu.org
Subject: bug#32658: gnutls + non-blocking url-retrieve
Date: Wed, 03 Oct 2018 16:15:31 +0200 [thread overview]
Message-ID: <86d0srp14s.fsf@DESKTOP-DQBDJ0U.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <83efda431j.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 Oct 2018 09:03:04 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: thomas@m3y3r.de
>> Date: Sun, 30 Sep 2018 23:33:10 +0200
>>
>> 1.) I needed to revert to gnutls 3.5.19, the mingw64 build from the
>> gitlab ci build seems to have a working gnutls-cli tools on windows 10.
>> the gitlab builds for 3.6.3 and 3.6.4 seems to have another bug
>> (error code -53) in the gnutls-cli command.
>>
>> so only gnutls 3.5.19 have a working gnutls-cli. i installed this version in emacs 26.1
>>
>> 2.) testing gnutls stream
>> using open-gnutls-stream directly gives me a correct tls connection but
>> eww still fails to load the site.
>>
>> when I change url-open-stream in url/url-gw.el to:
>> (open-network-stream
>> name buffer host service
>> :type gw-method
>> ;; Use non-blocking socket if we can.
>> :nowait nil))
>>
>> I finally can open lwn.net in eww.
>>
>> so something seems to be wrong possible with blocking/non-blocking
>> network access.
>>
>> any ideas?
>
> Thanks for the info.
so what happens in process.c:3669 in function connect_network_socket when gnutls_boot
returns with GNUTLS_STAGE_HANDSHAKE_TRIED and boot(error code) will
error GNUTLS_E_AGAIN (and
not even considered, as far as I understand the code).
I think this is what happens in may case.
gnutls_boot calls gnutls_try_handshake (gnutls.c:595) and the do/while loops returns after 3 times (what
I don't understand is: why is this happening, can maybe_quit() somewho break the loop?)
do
{
ret = gnutls_handshake (state);
emacs_gnutls_handle_error (state, ret);
maybe_quit ();
}
while (ret < 0
&& gnutls_error_is_fatal (ret) == 0
&& ! non_blocking);
//HINT: maybe save emacs_gnutls_handle_error return value and check this
instead of calling gnutls_error_is_fatal again?
proc->gnutls_initstage = GNUTLS_STAGE_HANDSHAKE_TRIED;
if (ret == GNUTLS_E_SUCCESS)
{
/* Here we're finally done. */
proc->gnutls_initstage = GNUTLS_STAGE_READY;
}
else
{
/* check_memory_full (gnutls_alert_send_appropriate (state, ret)); */
}
return ret;
so what do you think?
next prev parent reply other threads:[~2018-10-03 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 9:22 bug#32658: 26.1; Cannot connect to TLS websites thomas
2018-09-30 21:33 ` bug#32658: gnutls + non-blocking url-retrieve thomas
2018-10-01 6:03 ` Eli Zaretskii
2018-10-01 20:48 ` thomas
2018-10-05 18:25 ` Noam Postavsky
2018-10-03 14:15 ` thomas [this message]
2018-10-07 13:42 ` thomas
2019-05-16 13:14 ` Noam Postavsky
2019-09-24 5:18 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86d0srp14s.fsf@DESKTOP-DQBDJ0U.i-did-not-set--mail-host-address--so-tickle-me \
--to=thomas@m3y3r.de \
--cc=32658@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).