aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Zlatanov2012-04-09 09:10:22 -0400
committerTed Zlatanov2012-04-09 09:10:22 -0400
commit6b4f4a2d6badbe414c8b662feeac3db8edcbda89 (patch)
tree695441508770c455e2167b42003f0e26c09f5e06
parentfb7ada5f94a71d73bf6cfad5cc87fe7fb26125a5 (diff)
downloademacs-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--ChangeLog6
-rw-r--r--Makefile.in10
-rw-r--r--doc/misc/ChangeLog8
-rw-r--r--doc/misc/Makefile.in12
-rw-r--r--doc/misc/emacs-gnutls.texi198
-rw-r--r--info/dir1
6 files changed, 230 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2fe50a6d83b..a1b9a9ca7df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12012-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
12012-04-09 Glenn Morris <rgm@gnu.org> 72012-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.
137infodir=@infodir@ 137infodir=@infodir@
138INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse \ 138INFO_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".
146HAVE_MAKEINFO=@HAVE_MAKEINFO@ 146HAVE_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 @@
12012-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
12012-04-05 Teodor Zlatanov <tzz@lifelogs.com> 92012-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
342eieio.pdf: ${srcdir}/eieio.texi 345eieio.pdf: ${srcdir}/eieio.texi
343 $(ENVADD) $(TEXI2PDF) $< 346 $(ENVADD) $(TEXI2PDF) $<
344 347
348emacs-gnutls : $(infodir)/emacs-gnutls
349$(infodir)/emacs-gnutls: emacs-gnutls.texi
350 $(mkinfodir)
351 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $<
352emacs-gnutls.dvi: ${srcdir}/emacs-gnutls.texi
353 $(ENVADD) $(TEXI2DVI) $<
354emacs-gnutls.pdf: ${srcdir}/emacs-gnutls.texi
355 $(ENVADD) $(TEXI2PDF) $<
356
345emacs-mime : $(infodir)/emacs-mime 357emacs-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
9This file describes the Emacs GnuTLS integration.
10
11Copyright @copyright{} 2012 Free Software Foundation, Inc.
12
13@quotation
14Permission is granted to copy, distribute and/or modify this document
15under the terms of the GNU Free Documentation License, Version 1.3 or
16any later version published by the Free Software Foundation; with no
17Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
18and with the Back-Cover Texts as in (a) below. A copy of the license
19is included in the section entitled ``GNU Free Documentation License''
20in the Emacs manual.
21
22(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
23modify this GNU manual. Buying copies from the FSF supports it in
24developing GNU and promoting software freedom.''
25
26This document is part of a collection distributed under the GNU Free
27Documentation License. If you want to distribute this document
28separately from the collection, you can do so by adding a copy of the
29license 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
51This manual describes the Emacs GnuTLS integration.
52
53GnuTLS 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}
56Emacs 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
72The GnuTLS library is an optional add-on for Emacs. Through it, any
73Emacs Lisp program can establish encrypted network connections that
74use @dfn{Secure Socket Layer} (@acronym{SSL}) and @dfn{Transport Layer
75Security} (@acronym{TLS}) protocols. The process of using
76@acronym{SSL} and @acronym{TLS} in establishing connections is as
77automated and transparent as possible.
78
79The user has only a few customization options currently: the log
80level, priority string, trustfile list, and the minimum number of bits
81to be used in Diffie-Hellman key exchange. Rumors that every Emacs
82library requires at least 83 customizable variables are thus proven
83false.
84
85@node Help For Users
86@chapter Help For Users
87
88From the user's perspective, there's nothing to the GnuTLS
89integration. 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
92Manual}). The two functions are equivalent, the first one being an
93alias of the second.
94
95There'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
99Zaretskii) in the same directory as Emacs, you should be OK.
100
101@defun gnutls-available-p
102This function returns t if GnuTLS is available in this instance of Emacs.
103@end defun
104
105Oh, but sometimes things go wrong. Budgets aren't balanced,
106television ads lie, and even TLS and SSL connections can fail to work
107properly. Well, there's something to be done in the last case.
108
109@defvar gnutls-log-level
110The @code{gnutls-log-level} variable sets the log level. 1 is
111verbose. 2 is very verbose. 5 is crazy. Crazy! Set it to 1 or 2
112and look in the @code{*Messages*} buffer for the debugging
113information.
114@end defvar
115
116@defvar gnutls-algorithm-priority
117The @code{gnutls-algorithm-priority} variable sets the GnuTLS priority
118string. This is global, not per host name (although
119@code{gnutls-negotiate} supports a priority string per connection so
120it could be done if needed). The priority string syntax is in the
121@uref{http://www.gnu.org/software/gnutls/documentation.html, GnuTLS
122documentation}.
123@end defvar
124
125@defvar gnutls-trustfiles
126The @code{gnutls-trustfiles} variable is a list of trustfiles
127(certificates for the issuing authorities). This is global, not per
128host name (although @code{gnutls-negotiate} supports a trustfile per
129connection so it could be done if needed). The trustfiles can be in
130PEM or DER format and examples can be found in most Unix
131distributions. By default four locations are tried in this order:
132@file{/etc/ssl/certs/ca-certificates.crt} for Debian, Ubuntu, Gentoo
133and Arch Linux; @file{/etc/pki/tls/certs/ca-bundle.crt} for Fedora
134and RHEL; @file{/etc/ssl/ca-bundle.pem} for Suse;
135@file{/usr/ssl/certs/ca-bundle.crt} for Cygwin. You can easily
136customize @code{gnutls-trustfiles} to be something else, but let us
137know if you do, so we can make the change to benefit the other users
138of that platform.
139@end defvar
140
141@defvar gnutls-min-prime-bits
142The @code{gnutls-min-prime-bits} variable is a pretty exotic
143customization for cases where you want to refuse handshakes with keys
144under a specific size. If you don't know for sure that you need it,
145you don't. Leave it @code{nil}.
146@end defvar
147
148@node Help For Developers
149@chapter Help For Developers
150
151The GnuTLS library is detected automatically at compile time. You
152should see that it's enabled in the @code{configure} output. If not,
153follow the standard procedure for finding out why a system library is
154not picked up by the Emacs compilation. On the W32 (Windows)
155platform, installing the DLLs with a recent build should be enough.
156
157Just use @code{open-protocol-stream} or @code{open-network-stream}
158(the two are equivalent, the first one being an alias to the second).
159You should not have to use the @file{gnutls.el} functions directly.
160But you can test them with @code{open-gnutls-stream}.
161
162@defun open-gnutls-stream name buffer host service
163This function creates a buffer connected to a specific @var{host} and
164@var{service} (port number or service name). The parameters and their
165syntax are the same as those given to @code{open-network-stream}
166(@pxref{Network,, Network Connections, elisp, The Emacs Lisp Reference
167Manual}). The connection process is called @var{name} (made unique if
168necessary). 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
180The function @code{gnutls-negotiate} is not generally useful and it
181may change as needed, so please see @file{gnutls.el} for the details.
182
183@defun gnutls-negotiate spec
184Please see @file{gnutls.el} for the @var{spec} details and for usage,
185but 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:
diff --git a/info/dir b/info/dir
index 06ee2ab8240..d18a38cefa6 100644
--- a/info/dir
+++ b/info/dir
@@ -40,6 +40,7 @@ Emacs editing modes
40Emacs network features 40Emacs 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