diff options
| author | Glenn Morris | 2014-06-04 23:15:44 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-06-04 23:15:44 -0700 |
| commit | e1b3f35f9373d71f58638e9dcaffc2ff8c4ab3b6 (patch) | |
| tree | e09363a815ba1488ca47c29aa9e7676b0a43ae5d /doc | |
| parent | a56ae34d229242a065fc87d75d80d07ab14641fe (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/package.texi | 40 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/package.texi | 35 |
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 @@ | |||
| 1 | 2014-06-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * package.texi (Package Menu, Package Installation): | ||
| 4 | Mention signed packages. | ||
| 5 | |||
| 1 | 2014-06-03 Glenn Morris <rgm@gnu.org> | 6 | 2014-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 |
| 61 | The package's status---normally one of @samp{available} (can be | 61 | The package's status---normally one of @samp{available} (can be |
| 62 | downloaded from the package archive), @samp{installed}, or | 62 | downloaded 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}), |
| 64 | or @samp{built-in} (included in Emacs by default). | ||
| 64 | 65 | ||
| 65 | The status can also be @samp{new}. This is equivalent to | 66 | The 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 | |||
| 167 | wish to use third party package archives---but do so at your own risk, | 168 | wish to use third party package archives---but do so at your own risk, |
| 168 | and use only third parties that you think you can trust! | 169 | and 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 | ||
| 175 | can have in their packages by @dfn{signing} them. They generate a | ||
| 176 | private/public pair of crytopgraphic keys, and use the private key to | ||
| 177 | create a @dfn{signature file} for each package. With the public key, you | ||
| 178 | can use the signature files to verify who created the package, and | ||
| 179 | that it has not been modified. A valid signature is not a cast-iron | ||
| 180 | guarantee that a package is not malicious, so you should still | ||
| 181 | exercise caution. Package archives should provide instructions | ||
| 182 | on how you can obtain their public key. One way is to download the | ||
| 183 | key from a server such as @url{http://pgp.mit.edu/}. | ||
| 184 | Use @kbd{M-x package-import-keyring} to import the key into Emacs. | ||
| 185 | Emacs stores package keys in the @file{gnupg} subdirectory | ||
| 186 | of @code{package-user-dir}. | ||
| 187 | @c Uncomment this if it becomes true. | ||
| 188 | @ignore | ||
| 189 | The public key for the GNU package archive is distributed with Emacs, | ||
| 190 | in 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}, | ||
| 196 | Emacs attempts to verify signatures when you install packages. If the | ||
| 197 | option has the value @code{allow-unsigned}, you can still install a | ||
| 198 | package that is not signed. If you use some archives that do not sign | ||
| 199 | their 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}. | ||
| 203 | Emacs 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 |
| 172 | offer different versions of the same package, you may find the option | 208 | offer 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 @@ | |||
| 1 | 2014-06-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * package.texi (Package Archives): Mention signing packages. | ||
| 4 | |||
| 1 | 2014-05-27 Glenn Morris <rgm@gnu.org> | 5 | 2014-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 |
| 343 | After you create an archive, remember that it is not accessible in the | 343 | After you create an archive, remember that it is not accessible in the |
| 344 | Package Menu interface unless it is in @code{package-archives}. | 344 | Package Menu interface unless it is in @code{package-archives}. |
| 345 | |||
| 346 | @cindex package archive security | ||
| 347 | @cindex package signing | ||
| 348 | Maintaining a public package archive entails a degree of responsibility. | ||
| 349 | When Emacs users install packages from your archive, those packages | ||
| 350 | can cause Emacs to run arbitrary code with the permissions of the | ||
| 351 | installing user. (This is true for Emacs code in general, not just | ||
| 352 | for packages.) So you should ensure that your archive is | ||
| 353 | well-maintained and keep the hosting system secure. | ||
| 354 | |||
| 355 | One way to increase the security of your packages is to @dfn{sign} | ||
| 356 | them using a crytopgraphic key. If you have generated a | ||
| 357 | private/public gpg key pair, you can use gpg to sign the package like | ||
| 358 | this: | ||
| 359 | |||
| 360 | @c FIXME EasyPG / package-x way to do this. | ||
| 361 | @example | ||
| 362 | gpg -ba -o @var{file}.sig @var{file} | ||
| 363 | @end example | ||
| 364 | |||
| 365 | @noindent | ||
| 366 | For a single-file package, @var{file} is the package Lisp file; | ||
| 367 | for a multi-file package, it is the package tar file. | ||
| 368 | You can also sign the archive's contents file in the same way. | ||
| 369 | Make the @file{.sig} files available in the same location as the packages. | ||
| 370 | You should also make your public key available for people to download; | ||
| 371 | e.g., by uploading it to a key server such as @url{http://pgp.mit.edu/}. | ||
| 372 | When people install packages from your archive, they can use | ||
| 373 | your public key to verify the signatures. | ||
| 374 | |||
| 375 | A full explanation of these matters is outside the scope of this | ||
| 376 | manual. For more information on crytopgraphic keys and signing, | ||
| 377 | @pxref{Top,, GnuPG, gnupg, The GNU Privacy Guard Manual}. Emacs comes | ||
| 378 | with an interface to GNU Privacy Guard, @pxref{Top,, EasyPG, epa, | ||
| 379 | Emacs EasyPG Assistant Manual}. | ||