aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris2014-06-04 23:15:44 -0700
committerGlenn Morris2014-06-04 23:15:44 -0700
commite1b3f35f9373d71f58638e9dcaffc2ff8c4ab3b6 (patch)
treee09363a815ba1488ca47c29aa9e7676b0a43ae5d /doc
parenta56ae34d229242a065fc87d75d80d07ab14641fe (diff)
downloademacs-e1b3f35f9373d71f58638e9dcaffc2ff8c4ab3b6.tar.gz
emacs-e1b3f35f9373d71f58638e9dcaffc2ff8c4ab3b6.zip
Some documentation for signing of packages
* doc/emacs/package.texi (Package Menu, Package Installation): Mention signed packages. * doc/lispref/package.texi (Package Archives): Mention signing packages. * lisp/emacs-lisp/package.el (package-check-signature) (package-unsigned-archives): Doc fixes. * etc/NEWS: Related edits.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/package.texi40
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/package.texi35
4 files changed, 82 insertions, 2 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 27168b00021..6ca98a3f24b 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12014-06-05 Glenn Morris <rgm@gnu.org>
2
3 * package.texi (Package Menu, Package Installation):
4 Mention signed packages.
5
12014-06-03 Glenn Morris <rgm@gnu.org> 62014-06-03 Glenn Morris <rgm@gnu.org>
2 7
3 * package.texi (Package Installation): Mention package-pinned-packages. 8 * package.texi (Package Installation): Mention package-pinned-packages.
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index 98e3c8ac706..9b7f541ac51 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -59,8 +59,9 @@ The package's version number (e.g., @samp{11.86}).
59 59
60@item 60@item
61The package's status---normally one of @samp{available} (can be 61The package's status---normally one of @samp{available} (can be
62downloaded from the package archive), @samp{installed}, or 62downloaded from the package archive), @samp{installed},
63@samp{built-in} (included in Emacs by default). 63@samp{unsigned} (installed, but not signed; @pxref{Package Signing}),
64or @samp{built-in} (included in Emacs by default).
64 65
65The status can also be @samp{new}. This is equivalent to 66The status can also be @samp{new}. This is equivalent to
66@samp{available}, except that it means the package became newly 67@samp{available}, except that it means the package became newly
@@ -167,6 +168,41 @@ directory name of the package archive. You can alter this list if you
167wish to use third party package archives---but do so at your own risk, 168wish to use third party package archives---but do so at your own risk,
168and use only third parties that you think you can trust! 169and use only third parties that you think you can trust!
169 170
171@anchor{Package Signing}
172@cindex package security
173@cindex package signing
174 The maintainers of package archives can increase the trust that you
175can have in their packages by @dfn{signing} them. They generate a
176private/public pair of crytopgraphic keys, and use the private key to
177create a @dfn{signature file} for each package. With the public key, you
178can use the signature files to verify who created the package, and
179that it has not been modified. A valid signature is not a cast-iron
180guarantee that a package is not malicious, so you should still
181exercise caution. Package archives should provide instructions
182on how you can obtain their public key. One way is to download the
183key from a server such as @url{http://pgp.mit.edu/}.
184Use @kbd{M-x package-import-keyring} to import the key into Emacs.
185Emacs stores package keys in the @file{gnupg} subdirectory
186of @code{package-user-dir}.
187@c Uncomment this if it becomes true.
188@ignore
189The public key for the GNU package archive is distributed with Emacs,
190in the @file{etc/package-keyring.gpg}. Emacs uses it automatically.
191@end ignore
192
193@vindex package-check-signature
194@vindex package-unsigned-archives
195 If the user option @code{package-check-signature} is non-@code{nil},
196Emacs attempts to verify signatures when you install packages. If the
197option has the value @code{allow-unsigned}, you can still install a
198package that is not signed. If you use some archives that do not sign
199their packages, you can add them to the list @code{package-unsigned-archives}.
200
201 For more information on crytopgraphic keys and signing,
202@pxref{Top,, Top, gnupg, The GNU Privacy Guard Manual}.
203Emacs comes with an interface to GNU Privacy Guard,
204@pxref{Top,, EasyPG, epa, Emacs EasyPG Assistant Manual}.
205
170@vindex package-pinned-packages 206@vindex package-pinned-packages
171 If you have more than one package archive enabled, and some of them 207 If you have more than one package archive enabled, and some of them
172offer different versions of the same package, you may find the option 208offer different versions of the same package, you may find the option
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e4f5c60c2d1..51f74f2eb12 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12014-06-05 Glenn Morris <rgm@gnu.org>
2
3 * package.texi (Package Archives): Mention signing packages.
4
12014-05-27 Glenn Morris <rgm@gnu.org> 52014-05-27 Glenn Morris <rgm@gnu.org>
2 6
3 * text.texi (Buffer Contents): 7 * text.texi (Buffer Contents):
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index 4bc50b2358f..cac7519671a 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -342,3 +342,38 @@ otherwise, an error is raised.
342@noindent 342@noindent
343After you create an archive, remember that it is not accessible in the 343After you create an archive, remember that it is not accessible in the
344Package Menu interface unless it is in @code{package-archives}. 344Package Menu interface unless it is in @code{package-archives}.
345
346@cindex package archive security
347@cindex package signing
348Maintaining a public package archive entails a degree of responsibility.
349When Emacs users install packages from your archive, those packages
350can cause Emacs to run arbitrary code with the permissions of the
351installing user. (This is true for Emacs code in general, not just
352for packages.) So you should ensure that your archive is
353well-maintained and keep the hosting system secure.
354
355 One way to increase the security of your packages is to @dfn{sign}
356them using a crytopgraphic key. If you have generated a
357private/public gpg key pair, you can use gpg to sign the package like
358this:
359
360@c FIXME EasyPG / package-x way to do this.
361@example
362gpg -ba -o @var{file}.sig @var{file}
363@end example
364
365@noindent
366For a single-file package, @var{file} is the package Lisp file;
367for a multi-file package, it is the package tar file.
368You can also sign the archive's contents file in the same way.
369Make the @file{.sig} files available in the same location as the packages.
370You should also make your public key available for people to download;
371e.g., by uploading it to a key server such as @url{http://pgp.mit.edu/}.
372When people install packages from your archive, they can use
373your public key to verify the signatures.
374
375A full explanation of these matters is outside the scope of this
376manual. For more information on crytopgraphic keys and signing,
377@pxref{Top,, GnuPG, gnupg, The GNU Privacy Guard Manual}. Emacs comes
378with an interface to GNU Privacy Guard, @pxref{Top,, EasyPG, epa,
379Emacs EasyPG Assistant Manual}.