diff options
| author | Ted Zlatanov | 2012-04-09 09:10:22 -0400 |
|---|---|---|
| committer | Ted Zlatanov | 2012-04-09 09:10:22 -0400 |
| commit | 6b4f4a2d6badbe414c8b662feeac3db8edcbda89 (patch) | |
| tree | 695441508770c455e2167b42003f0e26c09f5e06 | |
| parent | fb7ada5f94a71d73bf6cfad5cc87fe7fb26125a5 (diff) | |
| download | emacs-6b4f4a2d6badbe414c8b662feeac3db8edcbda89.tar.gz emacs-6b4f4a2d6badbe414c8b662feeac3db8edcbda89.zip | |
Add documentation for the Emacs GnuTLS integration.
* info/dir (File):
* Makefile.in: Add emacs-gnutls to the info directory and the
INFO_FILES target.
* doc/misc/emacs-gnutls.texi: Add documentation for the GnuTLS integration.
* doc/misc/gnutls.texi: New file to explain the GnuTLS integration.
* doc/misc/Makefile.in: Add gnutls.texi to build.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | Makefile.in | 10 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/misc/Makefile.in | 12 | ||||
| -rw-r--r-- | doc/misc/emacs-gnutls.texi | 198 | ||||
| -rw-r--r-- | info/dir | 1 |
6 files changed, 230 insertions, 5 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * info/dir (File): | ||
| 4 | * Makefile.in: Add emacs-gnutls to the info directory and the | ||
| 5 | INFO_FILES target. | ||
| 6 | |||
| 1 | 2012-04-09 Glenn Morris <rgm@gnu.org> | 7 | 2012-04-09 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * Makefile.in (leim): Check cd return value. Pass fewer variables. | 9 | * Makefile.in (leim): Check cd return value. Pass fewer variables. |
diff --git a/Makefile.in b/Makefile.in index 3ee5e8ae8ed..8851384162b 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -136,11 +136,11 @@ MAN_PAGES=ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ | |||
| 136 | # system, it is inappropriate to imply that it is part of Emacs. | 136 | # system, it is inappropriate to imply that it is part of Emacs. |
| 137 | infodir=@infodir@ | 137 | infodir=@infodir@ |
| 138 | INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse \ | 138 | INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse \ |
| 139 | ede ediff edt eieio efaq eintr elisp emacs emacs-mime epa erc \ | 139 | ede ediff edt eieio efaq eintr elisp emacs emacs-gnutls \ |
| 140 | ert eshell eudc flymake forms gnus idlwave info mairix-el \ | 140 | emacs-mime epa erc ert eshell eudc flymake forms gnus \ |
| 141 | message mh-e newsticker nxml-mode org pcl-cvs pgg rcirc \ | 141 | idlwave info mairix-el message mh-e newsticker nxml-mode \ |
| 142 | reftex remember sasl sc semantic ses sieve smtpmail speedbar \ | 142 | org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses \ |
| 143 | tramp url vip viper widget woman | 143 | sieve smtpmail speedbar tramp url vip viper widget woman |
| 144 | 144 | ||
| 145 | # If no makeinfo was found and configured --without-makeinfo, "no"; else "yes". | 145 | # If no makeinfo was found and configured --without-makeinfo, "no"; else "yes". |
| 146 | HAVE_MAKEINFO=@HAVE_MAKEINFO@ | 146 | HAVE_MAKEINFO=@HAVE_MAKEINFO@ |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index e2f2c949676..ee6b7606c55 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * Makefile.in: Add gnutls.texi to build. | ||
| 4 | |||
| 5 | * gnutls.texi: New file to explain the GnuTLS integration. | ||
| 6 | |||
| 7 | * emacs-gnutls.texi: Add documentation for the GnuTLS integration. | ||
| 8 | |||
| 1 | 2012-04-05 Teodor Zlatanov <tzz@lifelogs.com> | 9 | 2012-04-05 Teodor Zlatanov <tzz@lifelogs.com> |
| 2 | 10 | ||
| 3 | * auth.texi (Secret Service API): Edit further and give examples. | 11 | * auth.texi (Secret Service API): Edit further and give examples. |
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 6fd0b983b87..429b84abf8f 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in | |||
| @@ -68,6 +68,7 @@ INFO_TARGETS = \ | |||
| 68 | $(infodir)/flymake \ | 68 | $(infodir)/flymake \ |
| 69 | $(infodir)/forms \ | 69 | $(infodir)/forms \ |
| 70 | $(infodir)/gnus \ | 70 | $(infodir)/gnus \ |
| 71 | $(infodir)/emacs-gnutls \ | ||
| 71 | $(infodir)/idlwave \ | 72 | $(infodir)/idlwave \ |
| 72 | $(infodir)/info \ | 73 | $(infodir)/info \ |
| 73 | $(infodir)/mairix-el \ | 74 | $(infodir)/mairix-el \ |
| @@ -119,6 +120,7 @@ DVI_TARGETS = \ | |||
| 119 | flymake.dvi \ | 120 | flymake.dvi \ |
| 120 | forms.dvi \ | 121 | forms.dvi \ |
| 121 | gnus.dvi \ | 122 | gnus.dvi \ |
| 123 | emacs-gnutls.dvi \ | ||
| 122 | idlwave.dvi \ | 124 | idlwave.dvi \ |
| 123 | info.dvi \ | 125 | info.dvi \ |
| 124 | mairix-el.dvi \ | 126 | mairix-el.dvi \ |
| @@ -170,6 +172,7 @@ PDF_TARGETS = \ | |||
| 170 | flymake.pdf \ | 172 | flymake.pdf \ |
| 171 | forms.pdf \ | 173 | forms.pdf \ |
| 172 | gnus.pdf \ | 174 | gnus.pdf \ |
| 175 | emacs-gnutls.pdf \ | ||
| 173 | idlwave.pdf \ | 176 | idlwave.pdf \ |
| 174 | info.pdf \ | 177 | info.pdf \ |
| 175 | mairix-el.pdf \ | 178 | mairix-el.pdf \ |
| @@ -342,6 +345,15 @@ eieio.dvi: ${srcdir}/eieio.texi | |||
| 342 | eieio.pdf: ${srcdir}/eieio.texi | 345 | eieio.pdf: ${srcdir}/eieio.texi |
| 343 | $(ENVADD) $(TEXI2PDF) $< | 346 | $(ENVADD) $(TEXI2PDF) $< |
| 344 | 347 | ||
| 348 | emacs-gnutls : $(infodir)/emacs-gnutls | ||
| 349 | $(infodir)/emacs-gnutls: emacs-gnutls.texi | ||
| 350 | $(mkinfodir) | ||
| 351 | cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< | ||
| 352 | emacs-gnutls.dvi: ${srcdir}/emacs-gnutls.texi | ||
| 353 | $(ENVADD) $(TEXI2DVI) $< | ||
| 354 | emacs-gnutls.pdf: ${srcdir}/emacs-gnutls.texi | ||
| 355 | $(ENVADD) $(TEXI2PDF) $< | ||
| 356 | |||
| 345 | emacs-mime : $(infodir)/emacs-mime | 357 | emacs-mime : $(infodir)/emacs-mime |
| 346 | $(infodir)/emacs-mime: emacs-mime.texi | 358 | $(infodir)/emacs-mime: emacs-mime.texi |
| 347 | $(mkinfodir) | 359 | $(mkinfodir) |
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi new file mode 100644 index 00000000000..d429f21fbf6 --- /dev/null +++ b/doc/misc/emacs-gnutls.texi | |||
| @@ -0,0 +1,198 @@ | |||
| 1 | \input texinfo @c -*-texinfo-*- | ||
| 2 | |||
| 3 | @setfilename ../../info/emacs-gnutls | ||
| 4 | @settitle Emacs GnuTLS Integration @value{VERSION} | ||
| 5 | |||
| 6 | @set VERSION 0.3 | ||
| 7 | |||
| 8 | @copying | ||
| 9 | This file describes the Emacs GnuTLS integration. | ||
| 10 | |||
| 11 | Copyright @copyright{} 2012 Free Software Foundation, Inc. | ||
| 12 | |||
| 13 | @quotation | ||
| 14 | Permission is granted to copy, distribute and/or modify this document | ||
| 15 | under the terms of the GNU Free Documentation License, Version 1.3 or | ||
| 16 | any later version published by the Free Software Foundation; with no | ||
| 17 | Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' | ||
| 18 | and with the Back-Cover Texts as in (a) below. A copy of the license | ||
| 19 | is included in the section entitled ``GNU Free Documentation License'' | ||
| 20 | in the Emacs manual. | ||
| 21 | |||
| 22 | (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and | ||
| 23 | modify this GNU manual. Buying copies from the FSF supports it in | ||
| 24 | developing GNU and promoting software freedom.'' | ||
| 25 | |||
| 26 | This document is part of a collection distributed under the GNU Free | ||
| 27 | Documentation License. If you want to distribute this document | ||
| 28 | separately from the collection, you can do so by adding a copy of the | ||
| 29 | license to the document, as described in section 6 of the license. | ||
| 30 | @end quotation | ||
| 31 | @end copying | ||
| 32 | |||
| 33 | @dircategory Emacs lisp libraries | ||
| 34 | @direntry | ||
| 35 | * GnuTLS: (gnutls). The Emacs GnuTLS Integration. | ||
| 36 | @end direntry | ||
| 37 | |||
| 38 | @titlepage | ||
| 39 | @title Emacs GnuTLS Integration | ||
| 40 | @author by Ted Zlatanov | ||
| 41 | @page | ||
| 42 | @vskip 0pt plus 1filll | ||
| 43 | @insertcopying | ||
| 44 | @end titlepage | ||
| 45 | |||
| 46 | @contents | ||
| 47 | |||
| 48 | @ifnottex | ||
| 49 | @node Top | ||
| 50 | @top Emacs GnuTLS | ||
| 51 | This manual describes the Emacs GnuTLS integration. | ||
| 52 | |||
| 53 | GnuTLS is a library that establishes encrypted @acronym{SSL} or | ||
| 54 | @acronym{TLS} connections. Emacs supports it through the | ||
| 55 | @file{gnutls.c} and @file{gnutls.h} C files and the @file{gnutls.el} | ||
| 56 | Emacs Lisp library. | ||
| 57 | |||
| 58 | @insertcopying | ||
| 59 | |||
| 60 | @menu | ||
| 61 | * Overview:: Overview of the GnuTLS integration. | ||
| 62 | * Help For Users:: | ||
| 63 | * Help For Developers:: | ||
| 64 | * Function Index:: | ||
| 65 | * Variable Index:: | ||
| 66 | @end menu | ||
| 67 | @end ifnottex | ||
| 68 | |||
| 69 | @node Overview | ||
| 70 | @chapter Overview | ||
| 71 | |||
| 72 | The GnuTLS library is an optional add-on for Emacs. Through it, any | ||
| 73 | Emacs Lisp program can establish encrypted network connections that | ||
| 74 | use @dfn{Secure Socket Layer} (@acronym{SSL}) and @dfn{Transport Layer | ||
| 75 | Security} (@acronym{TLS}) protocols. The process of using | ||
| 76 | @acronym{SSL} and @acronym{TLS} in establishing connections is as | ||
| 77 | automated and transparent as possible. | ||
| 78 | |||
| 79 | The user has only a few customization options currently: the log | ||
| 80 | level, priority string, trustfile list, and the minimum number of bits | ||
| 81 | to be used in Diffie-Hellman key exchange. Rumors that every Emacs | ||
| 82 | library requires at least 83 customizable variables are thus proven | ||
| 83 | false. | ||
| 84 | |||
| 85 | @node Help For Users | ||
| 86 | @chapter Help For Users | ||
| 87 | |||
| 88 | From the user's perspective, there's nothing to the GnuTLS | ||
| 89 | integration. It Just Works for any Emacs Lisp code that uses | ||
| 90 | @code{open-protocol-stream} or @code{open-network-stream} | ||
| 91 | (@pxref{Network,, Network Connections, elisp, The Emacs Lisp Reference | ||
| 92 | Manual}). The two functions are equivalent, the first one being an | ||
| 93 | alias of the second. | ||
| 94 | |||
| 95 | There's one way to find out if GnuTLS is available, by calling | ||
| 96 | @code{gnutls-available-p}. This is a little bit trickier on the W32 | ||
| 97 | (Windows) platform, but if you have the GnuTLS DLLs (available from | ||
| 98 | @url{http://sourceforge.net/projects/ezwinports/files/} thanks to Eli | ||
| 99 | Zaretskii) in the same directory as Emacs, you should be OK. | ||
| 100 | |||
| 101 | @defun gnutls-available-p | ||
| 102 | This function returns t if GnuTLS is available in this instance of Emacs. | ||
| 103 | @end defun | ||
| 104 | |||
| 105 | Oh, but sometimes things go wrong. Budgets aren't balanced, | ||
| 106 | television ads lie, and even TLS and SSL connections can fail to work | ||
| 107 | properly. Well, there's something to be done in the last case. | ||
| 108 | |||
| 109 | @defvar gnutls-log-level | ||
| 110 | The @code{gnutls-log-level} variable sets the log level. 1 is | ||
| 111 | verbose. 2 is very verbose. 5 is crazy. Crazy! Set it to 1 or 2 | ||
| 112 | and look in the @code{*Messages*} buffer for the debugging | ||
| 113 | information. | ||
| 114 | @end defvar | ||
| 115 | |||
| 116 | @defvar gnutls-algorithm-priority | ||
| 117 | The @code{gnutls-algorithm-priority} variable sets the GnuTLS priority | ||
| 118 | string. This is global, not per host name (although | ||
| 119 | @code{gnutls-negotiate} supports a priority string per connection so | ||
| 120 | it could be done if needed). The priority string syntax is in the | ||
| 121 | @uref{http://www.gnu.org/software/gnutls/documentation.html, GnuTLS | ||
| 122 | documentation}. | ||
| 123 | @end defvar | ||
| 124 | |||
| 125 | @defvar gnutls-trustfiles | ||
| 126 | The @code{gnutls-trustfiles} variable is a list of trustfiles | ||
| 127 | (certificates for the issuing authorities). This is global, not per | ||
| 128 | host name (although @code{gnutls-negotiate} supports a trustfile per | ||
| 129 | connection so it could be done if needed). The trustfiles can be in | ||
| 130 | PEM or DER format and examples can be found in most Unix | ||
| 131 | distributions. By default four locations are tried in this order: | ||
| 132 | @file{/etc/ssl/certs/ca-certificates.crt} for Debian, Ubuntu, Gentoo | ||
| 133 | and Arch Linux; @file{/etc/pki/tls/certs/ca-bundle.crt} for Fedora | ||
| 134 | and RHEL; @file{/etc/ssl/ca-bundle.pem} for Suse; | ||
| 135 | @file{/usr/ssl/certs/ca-bundle.crt} for Cygwin. You can easily | ||
| 136 | customize @code{gnutls-trustfiles} to be something else, but let us | ||
| 137 | know if you do, so we can make the change to benefit the other users | ||
| 138 | of that platform. | ||
| 139 | @end defvar | ||
| 140 | |||
| 141 | @defvar gnutls-min-prime-bits | ||
| 142 | The @code{gnutls-min-prime-bits} variable is a pretty exotic | ||
| 143 | customization for cases where you want to refuse handshakes with keys | ||
| 144 | under a specific size. If you don't know for sure that you need it, | ||
| 145 | you don't. Leave it @code{nil}. | ||
| 146 | @end defvar | ||
| 147 | |||
| 148 | @node Help For Developers | ||
| 149 | @chapter Help For Developers | ||
| 150 | |||
| 151 | The GnuTLS library is detected automatically at compile time. You | ||
| 152 | should see that it's enabled in the @code{configure} output. If not, | ||
| 153 | follow the standard procedure for finding out why a system library is | ||
| 154 | not picked up by the Emacs compilation. On the W32 (Windows) | ||
| 155 | platform, installing the DLLs with a recent build should be enough. | ||
| 156 | |||
| 157 | Just use @code{open-protocol-stream} or @code{open-network-stream} | ||
| 158 | (the two are equivalent, the first one being an alias to the second). | ||
| 159 | You should not have to use the @file{gnutls.el} functions directly. | ||
| 160 | But you can test them with @code{open-gnutls-stream}. | ||
| 161 | |||
| 162 | @defun open-gnutls-stream name buffer host service | ||
| 163 | This function creates a buffer connected to a specific @var{host} and | ||
| 164 | @var{service} (port number or service name). The parameters and their | ||
| 165 | syntax are the same as those given to @code{open-network-stream} | ||
| 166 | (@pxref{Network,, Network Connections, elisp, The Emacs Lisp Reference | ||
| 167 | Manual}). The connection process is called @var{name} (made unique if | ||
| 168 | necessary). This function returns the connection process. | ||
| 169 | |||
| 170 | @lisp | ||
| 171 | ;; open a HTTPS connection | ||
| 172 | (open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https") | ||
| 173 | |||
| 174 | ;; open a IMAPS connection | ||
| 175 | (open-gnutls-stream "tls" "tls-buffer" "imap.gmail.com" "imaps") | ||
| 176 | @end lisp | ||
| 177 | |||
| 178 | @end defun | ||
| 179 | |||
| 180 | The function @code{gnutls-negotiate} is not generally useful and it | ||
| 181 | may change as needed, so please see @file{gnutls.el} for the details. | ||
| 182 | |||
| 183 | @defun gnutls-negotiate spec | ||
| 184 | Please see @file{gnutls.el} for the @var{spec} details and for usage, | ||
| 185 | but do not rely on this function's interface if possible. | ||
| 186 | @end defun | ||
| 187 | |||
| 188 | @node Function Index | ||
| 189 | @chapter Function Index | ||
| 190 | @printindex fn | ||
| 191 | |||
| 192 | @node Variable Index | ||
| 193 | @chapter Variable Index | ||
| 194 | @printindex vr | ||
| 195 | |||
| 196 | @bye | ||
| 197 | |||
| 198 | @c End: | ||
| @@ -40,6 +40,7 @@ Emacs editing modes | |||
| 40 | Emacs network features | 40 | Emacs network features |
| 41 | * EUDC: (eudc). Emacs client for directory servers (LDAP, PH). | 41 | * EUDC: (eudc). Emacs client for directory servers (LDAP, PH). |
| 42 | * Gnus: (gnus). The newsreader Gnus. | 42 | * Gnus: (gnus). The newsreader Gnus. |
| 43 | * GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration. | ||
| 43 | * Mairix: (mairix-el). Emacs interface to the Mairix mail indexer. | 44 | * Mairix: (mairix-el). Emacs interface to the Mairix mail indexer. |
| 44 | * MH-E: (mh-e). Emacs interface to the MH mail system. | 45 | * MH-E: (mh-e). Emacs interface to the MH mail system. |
| 45 | * Message: (message). Mail and news composition mode that | 46 | * Message: (message). Mail and news composition mode that |