From: Vincent Bernat <bernat@luffy.cx>
To: ding@gnus.org
Subject: Re: Builtin GnuTLS support and certificate verification
Date: Sat, 02 Nov 2013 18:40:31 +0100 [thread overview]
Message-ID: <874n7uu2gg.fsf@guybrush.luffy.cx> (raw)
In-Reply-To: <878ux782na.fsf@dex.adm.naquadah.org> (Julien Danjou's message of "Sat, 02 Nov 2013 12:27:21 +0100")
❦ 2 novembre 2013 12:27 CET, Julien Danjou <julien@danjou.info> :
>> Is there a way to enable certificate verification for Gnus? If not, is
>> there a way to force the old way to do TLS (by using an external
>> program)?
>
> This has been on my TODO list a year. There was a thread I launched on
> emacs-devel about that a year ago with Ted:
>
> http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00154.html
> http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00575.html
>
> I didn't have time to dig since then, but I'd appreciate any hint on
> this subject. :)
OK, I have just tested myself with:
#v+
(gnutls-negotiate
:process (open-network-stream "test" nil "www.dailymotion.com" 443)
:hostname "www.dailymotion.com"
:verify-hostname-error t
:verify-error t)
#v-
I don't know what "verify-error" is for since verify-hostname-error
seems to handle any error like certificate expired, mismatched name or
unknown root certificate. Example when the certificate is expired:
#v+
(gnutls-negotiate
:process (open-network-stream "test" nil "www.pcwebshop.co.uk" 443)
:hostname "www.pcwebshop.co.uk"
:verify-hostname-error t
:verify-error t)
#v-
It works for me. Now, if I understand correctly, you are also trying to
use `:trustfiles`.
#v+
(gnutls-negotiate
:process (open-network-stream "test" nil "awesome.naquadah.org" 443)
:hostname "awesome.naquadah.org"
:verify-hostname-error t
:verify-error t)
#v-
I get an error. Now, I extract the certificate and specify it with
trustfiles option:
#v+
(gnutls-negotiate
:process (open-network-stream "test" nil "awesome.naquadah.org" 443)
:hostname "awesome.naquadah.org"
:trustfiles '("/home/bernat/tmp/root.crt")
:verify-hostname-error t
:verify-error t)
#v-
And it works.
I am using Emacs 24.3 from Debian unstable. So far, it seems that the
builtin support is working.
--
printk("??? No FDIV bug? Lucky you...\n");
2.2.16 /usr/src/linux/include/asm-i386/bugs.h
next prev parent reply other threads:[~2013-11-02 17:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-02 11:22 Vincent Bernat
2013-11-02 11:27 ` Julien Danjou
2013-11-02 17:40 ` Vincent Bernat [this message]
2013-11-02 21:09 ` Vincent Bernat
2013-11-03 11:53 ` Ted Zlatanov
2013-11-04 19:54 ` Vincent Bernat
2013-11-04 21:10 ` Ted Zlatanov
2013-11-04 22:38 ` Vincent Bernat
2013-11-11 15:45 ` Ted Zlatanov
2013-11-16 11:18 ` Vincent Bernat
2013-11-16 13:11 ` Julien Danjou
2013-12-08 4:22 ` Ted Zlatanov
2013-12-08 8:39 ` Vincent Bernat
2013-12-08 16:08 ` Ted Zlatanov
2013-12-14 18:06 ` Ted Zlatanov
2013-12-16 1:39 ` Katsumi Yamaoka
2013-12-16 6:31 ` Herbert J. Skuhra
2013-12-16 13:51 ` Tassilo Horn
2013-12-16 15:25 ` Ted Zlatanov
2013-12-16 15:24 ` Ted Zlatanov
2013-12-16 15:27 ` Ted Zlatanov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874n7uu2gg.fsf@guybrush.luffy.cx \
--to=bernat@luffy.cx \
--cc=ding@gnus.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.
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 NNTP newsgroup(s).