unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26835@debbugs.gnu.org, Aaron Jensen <aaronjensen@gmail.com>
Subject: bug#26835: 26.0.50; url-retrieve no longer raises certificate errors
Date: Wed, 10 May 2017 16:24:13 +0200	[thread overview]
Message-ID: <m3pofglrhu.fsf@stories> (raw)
In-Reply-To: <83lgq5c40b.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2017 20:51:48 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> It repros in `emacs -Q', just set:
>> 
>> (setq gnutls-verify-error t)
>> (url-retrieve-synchronously "https://wrong.host.badssl.com/")
>> 
>> In Emacs 25.2, this causes an error to be thrown when you use
>> url-retrieve, in 26, it silently proceeds.
>
> That's because we now perform GnuTLS negotiation asynchronously,
> without blocking.

(As an aside, perhaps url-retrieve-synchronously should be opening the
socket with :nowait nil?)

>   status = p->status;
>   if (CONSP (status))
>     status = XCAR (status);
>
> which loses the error message, leaving just 'failed'.  So
> url-retrieve-synchronously silently exits, and doesn't even have the
> info that could cause it to signal an error.
>
> IOW, the problem is not that the connection proceeds -- it does not.
> The problem is that it fails silently without telling the caller what
> caused the failure.
>
> I'll CC Lars, who introduced the non-blocking connections.

Good analysis.  I'll try to have a look at this soonish (and make it
report the error properly) unless somebody else beats me to it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2017-05-10 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 18:42 bug#26835: 26.0.50; url-retrieve no longer raises certificate errors Aaron Jensen
2017-05-08 19:04 ` Eli Zaretskii
2017-05-08 19:44   ` Aaron Jensen
2017-05-09 17:51     ` Eli Zaretskii
2017-05-10 14:24       ` Lars Ingebrigtsen [this message]
2017-05-10 16:48         ` Eli Zaretskii
2017-09-02 13:42           ` Eli Zaretskii
2017-09-13 18:11             ` Lars Ingebrigtsen
2017-09-13 18:44               ` Eli Zaretskii
2017-09-13 17:51           ` 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=m3pofglrhu.fsf@stories \
    --to=larsi@gnus.org \
    --cc=26835@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --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).