emacs-gnutls 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. This is ../../info/emacs-gnutls, produced by makeinfo version 4.13 from
  2. emacs-gnutls.texi.
  3. This file describes the Emacs GnuTLS integration.
  4. Copyright (C) 2012 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this
  6. document under the terms of the GNU Free Documentation License,
  7. Version 1.3 or any later version published by the Free Software
  8. Foundation; with no Invariant Sections, with the Front-Cover texts
  9. being "A GNU Manual," and with the Back-Cover Texts as in (a)
  10. below. A copy of the license is included in the section entitled
  11. "GNU Free Documentation License" in the Emacs manual.
  12. (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
  13. modify this GNU manual. Buying copies from the FSF supports it in
  14. developing GNU and promoting software freedom."
  15. This document is part of a collection distributed under the GNU
  16. Free Documentation License. If you want to distribute this
  17. document separately from the collection, you can do so by adding a
  18. copy of the license to the document, as described in section 6 of
  19. the license.
  20. INFO-DIR-SECTION Emacs network features
  21. START-INFO-DIR-ENTRY
  22. * GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
  23. END-INFO-DIR-ENTRY
  24. 
  25. File: emacs-gnutls, Node: Top, Next: Overview, Up: (dir)
  26. Emacs GnuTLS
  27. ************
  28. This manual describes the Emacs GnuTLS integration.
  29. GnuTLS is a library that establishes encrypted SSL or TLS
  30. connections. Emacs supports it through the `gnutls.c' and `gnutls.h' C
  31. files and the `gnutls.el' Emacs Lisp library.
  32. This file describes the Emacs GnuTLS integration.
  33. Copyright (C) 2012 Free Software Foundation, Inc.
  34. Permission is granted to copy, distribute and/or modify this
  35. document under the terms of the GNU Free Documentation License,
  36. Version 1.3 or any later version published by the Free Software
  37. Foundation; with no Invariant Sections, with the Front-Cover texts
  38. being "A GNU Manual," and with the Back-Cover Texts as in (a)
  39. below. A copy of the license is included in the section entitled
  40. "GNU Free Documentation License" in the Emacs manual.
  41. (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
  42. modify this GNU manual. Buying copies from the FSF supports it in
  43. developing GNU and promoting software freedom."
  44. This document is part of a collection distributed under the GNU
  45. Free Documentation License. If you want to distribute this
  46. document separately from the collection, you can do so by adding a
  47. copy of the license to the document, as described in section 6 of
  48. the license.
  49. * Menu:
  50. * Overview:: Overview of the GnuTLS integration.
  51. * Help For Users::
  52. * Help For Developers::
  53. * Function Index::
  54. * Variable Index::
  55. 
  56. File: emacs-gnutls, Node: Overview, Next: Help For Users, Prev: Top, Up: Top
  57. 1 Overview
  58. **********
  59. The GnuTLS library is an optional add-on for Emacs. Through it, any
  60. Emacs Lisp program can establish encrypted network connections that use
  61. "Secure Socket Layer" (SSL) and "Transport Layer Security" (TLS)
  62. protocols. The process of using SSL and TLS in establishing
  63. connections is as automated and transparent as possible.
  64. The user has only a few customization options currently: the log
  65. level, priority string, trustfile list, and the minimum number of bits
  66. to be used in Diffie-Hellman key exchange. Rumors that every Emacs
  67. library requires at least 83 customizable variables are thus proven
  68. false.
  69. 
  70. File: emacs-gnutls, Node: Help For Users, Next: Help For Developers, Prev: Overview, Up: Top
  71. 2 Help For Users
  72. ****************
  73. From the user's perspective, there's nothing to the GnuTLS integration.
  74. It Just Works for any Emacs Lisp code that uses `open-protocol-stream'
  75. or `open-network-stream' (*note Network Connections: (elisp)Network.).
  76. The two functions are equivalent, the first one being an alias of the
  77. second.
  78. There's one way to find out if GnuTLS is available, by calling
  79. `gnutls-available-p'. This is a little bit trickier on the W32
  80. (Windows) platform, but if you have the GnuTLS DLLs (available from
  81. `http://sourceforge.net/projects/ezwinports/files/' thanks to Eli
  82. Zaretskii) in the same directory as Emacs, you should be OK.
  83. -- Function: gnutls-available-p
  84. This function returns t if GnuTLS is available in this instance of
  85. Emacs.
  86. Oh, but sometimes things go wrong. Budgets aren't balanced,
  87. television ads lie, and even TLS and SSL connections can fail to work
  88. properly. Well, there's something to be done in the last case.
  89. -- Variable: gnutls-log-level
  90. The `gnutls-log-level' variable sets the log level. 1 is verbose.
  91. 2 is very verbose. 5 is crazy. Crazy! Set it to 1 or 2 and look
  92. in the `*Messages*' buffer for the debugging information.
  93. -- Variable: gnutls-algorithm-priority
  94. The `gnutls-algorithm-priority' variable sets the GnuTLS priority
  95. string. This is global, not per host name (although
  96. `gnutls-negotiate' supports a priority string per connection so it
  97. could be done if needed). The priority string syntax is in the
  98. GnuTLS documentation
  99. (http://www.gnu.org/software/gnutls/documentation.html).
  100. -- Variable: gnutls-trustfiles
  101. The `gnutls-trustfiles' variable is a list of trustfiles
  102. (certificates for the issuing authorities). This is global, not
  103. per host name (although `gnutls-negotiate' supports a trustfile per
  104. connection so it could be done if needed). The trustfiles can be
  105. in PEM or DER format and examples can be found in most Unix
  106. distributions. By default four locations are tried in this order:
  107. `/etc/ssl/certs/ca-certificates.crt' for Debian, Ubuntu, Gentoo
  108. and Arch Linux; `/etc/pki/tls/certs/ca-bundle.crt' for Fedora and
  109. RHEL; `/etc/ssl/ca-bundle.pem' for Suse;
  110. `/usr/ssl/certs/ca-bundle.crt' for Cygwin. You can easily
  111. customize `gnutls-trustfiles' to be something else, but let us
  112. know if you do, so we can make the change to benefit the other
  113. users of that platform.
  114. -- Variable: gnutls-min-prime-bits
  115. The `gnutls-min-prime-bits' variable is a pretty exotic
  116. customization for cases where you want to refuse handshakes with
  117. keys under a specific size. If you don't know for sure that you
  118. need it, you don't. Leave it `nil'.
  119. 
  120. File: emacs-gnutls, Node: Help For Developers, Next: Function Index, Prev: Help For Users, Up: Top
  121. 3 Help For Developers
  122. *********************
  123. The GnuTLS library is detected automatically at compile time. You
  124. should see that it's enabled in the `configure' output. If not, follow
  125. the standard procedure for finding out why a system library is not
  126. picked up by the Emacs compilation. On the W32 (Windows) platform,
  127. installing the DLLs with a recent build should be enough.
  128. Just use `open-protocol-stream' or `open-network-stream' (the two
  129. are equivalent, the first one being an alias to the second). You
  130. should not have to use the `gnutls.el' functions directly. But you can
  131. test them with `open-gnutls-stream'.
  132. -- Function: open-gnutls-stream name buffer host service
  133. This function creates a buffer connected to a specific HOST and
  134. SERVICE (port number or service name). The parameters and their
  135. syntax are the same as those given to `open-network-stream' (*note
  136. Network Connections: (elisp)Network.). The connection process is
  137. called NAME (made unique if necessary). This function returns the
  138. connection process.
  139. ;; open a HTTPS connection
  140. (open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https")
  141. ;; open a IMAPS connection
  142. (open-gnutls-stream "tls" "tls-buffer" "imap.gmail.com" "imaps")
  143. The function `gnutls-negotiate' is not generally useful and it may
  144. change as needed, so please see `gnutls.el' for the details.
  145. -- Function: gnutls-negotiate spec
  146. Please see `gnutls.el' for the SPEC details and for usage, but do
  147. not rely on this function's interface if possible.
  148. 
  149. File: emacs-gnutls, Node: Function Index, Next: Variable Index, Prev: Help For Developers, Up: Top
  150. 4 Function Index
  151. ****************
  152. [index]
  153. * Menu:
  154. * gnutls-available-p: Help For Users. (line 19)
  155. * gnutls-negotiate: Help For Developers. (line 36)
  156. * open-gnutls-stream: Help For Developers. (line 18)
  157. 
  158. File: emacs-gnutls, Node: Variable Index, Prev: Function Index, Up: Top
  159. 5 Variable Index
  160. ****************
  161. [index]
  162. * Menu:
  163. * gnutls-algorithm-priority: Help For Users. (line 32)
  164. * gnutls-log-level: Help For Users. (line 27)
  165. * gnutls-min-prime-bits: Help For Users. (line 55)
  166. * gnutls-trustfiles: Help For Users. (line 40)
  167. 
  168. Tag Table:
  169. Node: Top1309
  170. Node: Overview2868
  171. Node: Help For Users3583
  172. Node: Help For Developers6433
  173. Node: Function Index8123
  174. Node: Variable Index8505
  175. 
  176. End Tag Table