all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: GnuTLS integration manual patch needs review
Date: Wed, 19 Aug 2015 09:57:46 -0400	[thread overview]
Message-ID: <87wpwrnzxh.fsf@lifelogs.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

The patch here suggests some testing methods to ensure (with the current
Emacs) that the GnuTLS integration works, and to secure things if the
integration is not available. I'd like some review, please, before I
push it into master.

Thanks
Ted


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnutls-texi.patch --]
[-- Type: text/x-diff, Size: 1950 bytes --]

diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index 4f6ef01..a40aa67 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -97,6 +97,27 @@
 This function returns @code{t} if GnuTLS is available in this instance of Emacs.
 @end defun
 
+If you're on a platform without the GnuTLS integration support, you
+can try using the following settings, but they are strongly
+discouraged and will have no effect in a future Emacs release (the
+exact release where that will happen is as of yet unknown).  Again,
+these settings are discouraged!
+
+(You may want to replace the @code{python -m certifi} there with a
+static path to your CA trust bundle, for example,
+@file{/etc/ssl/certs/ca-certificates.crt}.
+@url{https://pypi.python.org/pypi/certifi} is a Python package that
+distributes a root CA trust bundle for other programs to use.  If you
+don't know what any of this means, you should absolutely not be using
+these settings.  Did we mention they are discouraged?)
+
+@lisp
+ '(tls-checktrust t)
+ '(tls-program
+   (quote
+    ("gnutls-cli --x509cafile \"$(python -m certifi)\" -p %p %h")))
+@end lisp
+
 Oh, but sometimes things go wrong.  Budgets aren't balanced,
 television ads lie, and even TLS and SSL connections can fail to work
 properly.  Well, there's something to be done in the last case.
@@ -108,6 +129,17 @@
 information.
 @end defvar
 
+You can check your SSL/TLS connectivity with the built-in Emacs URL
+package.  Switch to the @code{*scratch*} buffer and run:
+
+@lisp
+(require 'url)
+;; valid certificate, you should check out Let's Encrypt!
+(url-insert-file-contents "https://letsencrypt.org/")
+;; invalid certificate authority, abort
+(url-insert-file-contents "https://www.financialcryptography.com/")
+@end lisp
+
 @defvar gnutls-algorithm-priority
 The @code{gnutls-algorithm-priority} variable sets the GnuTLS priority
 string.  This is global, not per host name (although

             reply	other threads:[~2015-08-19 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 13:57 Ted Zlatanov [this message]
2015-08-19 15:17 ` GnuTLS integration manual patch needs review Eli Zaretskii

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=87wpwrnzxh.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@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 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.