all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH RFC] GnuTLS: Support TOFU certificate checking.
Date: Wed, 08 Oct 2014 13:53:35 +0200	[thread overview]
Message-ID: <m3ppe222ww.fsf@stories.gnus.org> (raw)
In-Reply-To: <87a957o87z.fsf@alrua-karlstad.karlstad.toke.dk> ("Toke \=\?iso-8859-1\?Q\?H\=F8iland-J\=F8rgensen\=22's\?\= message of "Tue, 07 Oct 2014 23:55:44 +0200")

Toke Høiland-Jørgensen <toke@toke.dk> writes:

> Right, I can definitely see the point of that, and ultimately this is
> definitely desirable. The GnuTLS TOFU mode could be a way to do the
> heavy lifting of certificate fingerprint storing and verification etc.
>
> I don't think I'm sufficiently familiar with the innards of
> open-network-stream to implement this, sorry. However, if you agree this
> could be a reasonable building block for the user-facing functionality I
> could rework the patch to (a) signal an appropriate error code when
> verification fails and (b) add a parameter to add the certificate to the
> trust chain. The lisp code could then use this functionality (by passing
> the appropriate parameters to gnutls-boot) to implement the user-facing
> y/no/maybe/whatever on top of it.

Yes, that's what the Emacs gnutls code needs: A way to access the
certificate, and the verification status of that certificate (i.e.,
whether it managed to validate it or not, and if not, why not).

Then the management of this could be done at a higher level, which would
be `open-network-stream'.

> Also, I'll add that TOFU can also be used to ensure stronger trust than
> just checking that the certificate validates; it can also be used for
> certificate pinning to ensure that it doesn't change. This is what I use
> it for personally, and I consider it a nice added security...

Yes, `open-network-stream' would implement certificate pinning.  That
is, it would store a fingerprint of the certificate and query the user
for what to do when that changes.  It would also use that to keep track
of whether a STARTTLS connection suddenly starts not offering STARTTLS,
which would be a typical symptom of a man-in-the-middle attack filtering
out the STARTTLS dialogue from the server.

If you implement the C gnutls bits, that would be great.  Then somebody
else (ahem, probably me) could do the `open-network-stream' bits...

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



  reply	other threads:[~2014-10-08 11:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 21:16 [PATCH RFC] GnuTLS: Support TOFU certificate checking Toke Høiland-Jørgensen
2014-10-07 21:35 ` Lars Magne Ingebrigtsen
2014-10-07 21:55   ` Toke Høiland-Jørgensen
2014-10-08 11:53     ` Lars Magne Ingebrigtsen [this message]
2014-10-08 11:58       ` Lars Magne Ingebrigtsen
2014-10-08 12:10       ` Toke Høiland-Jørgensen
2014-10-08 12:18         ` Lars Magne Ingebrigtsen
2014-10-08 12:39           ` Toke Høiland-Jørgensen
2014-10-08 12:42             ` Lars Magne Ingebrigtsen
2014-10-08 12:53           ` Eli Zaretskii
2014-10-08 12:56             ` Lars Magne Ingebrigtsen
2014-10-08 13:03               ` Eli Zaretskii
2014-10-08 13:06                 ` Lars Magne Ingebrigtsen
2014-10-08 13:17                   ` Eli Zaretskii
2014-10-08 13:25                     ` Lars Magne Ingebrigtsen
2014-10-08 13:38                       ` Eli Zaretskii
2014-10-08 13:47                         ` Lars Magne Ingebrigtsen
2014-10-08 13:59                           ` Toke Høiland-Jørgensen
2014-10-08 14:05                             ` Lars Magne Ingebrigtsen
2014-10-08 14:01                           ` Eli Zaretskii
2014-10-08 14:09                             ` Lars Magne Ingebrigtsen
2014-10-08 14:11                               ` Eli Zaretskii
2014-10-08 14:56                               ` Ted Zlatanov
2014-10-08 15:31                                 ` Lars Magne Ingebrigtsen
2014-10-08 15:37                                   ` Ted Zlatanov
2014-10-09  2:43                                     ` Stephen J. Turnbull
2014-10-09 13:17                                       ` Ted Zlatanov
2014-10-08 13:28                   ` Toke Høiland-Jørgensen
2014-10-08 14:52 ` Ted Zlatanov
2014-10-08 15:19   ` Toke Høiland-Jørgensen
2014-10-08 15:45     ` Ted Zlatanov
2014-10-08 16:09       ` Toke Høiland-Jørgensen
2014-10-08 16:52     ` Lars Magne Ingebrigtsen
2014-10-08 17:07       ` Toke Høiland-Jørgensen
2014-10-09 13:10         ` 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=m3ppe222ww.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=toke@toke.dk \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.