Revision: miles@gnu.org--gnu-2004/gnus--devo--0--patch-21
[gnus] / lisp / pgg-def.el
1 ;;; pgg-def.el --- functions/macros for defining PGG functions
2
3 ;; Copyright (C) 1999, 2003 Free Software Foundation, Inc.
4
5 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Created: 1999/11/02
7 ;; Keywords: PGP, OpenPGP, GnuPG
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Code:
27
28 (defgroup pgg ()
29   "Glue for the various PGP implementations."
30   :group 'mime)
31
32 (defcustom pgg-default-scheme 'gpg
33   "Default PGP scheme."
34   :group 'pgg
35   :type '(choice (const :tag "GnuPG" gpg)
36                  (const :tag "PGP 5" pgp5)
37                  (const :tag "PGP" pgp)))
38
39 (defcustom pgg-default-user-id (user-login-name)
40   "User ID of your default identity."
41   :group 'pgg
42   :type 'string)
43
44 (defcustom pgg-default-keyserver-address "subkeys.pgp.net"
45   "Host name of keyserver."
46   :group 'pgg
47   :type 'string)
48
49 (defcustom pgg-query-keyserver nil
50   "Whether PGG queries keyservers for missing keys when verifying messages."
51   :group 'pgg
52   :type 'boolean)
53
54 (defcustom pgg-encrypt-for-me t
55   "If t, encrypt all outgoing messages with user's public key."
56   :group 'pgg
57   :type 'boolean)
58
59 (defcustom pgg-cache-passphrase t
60   "If t, cache passphrase."
61   :group 'pgg
62   :type 'boolean)
63
64 (defcustom pgg-passphrase-cache-expiry 16
65   "How many seconds the passphrase is cached.
66 Whether the passphrase is cached at all is controlled by
67 `pgg-cache-passphrase'."
68   :group 'pgg
69   :type 'integer)
70
71 (defvar pgg-messages-coding-system nil
72   "Coding system used when reading from a PGP external process.")
73
74 (defvar pgg-status-buffer " *PGG status*")
75 (defvar pgg-errors-buffer " *PGG errors*")
76 (defvar pgg-output-buffer " *PGG output*")
77
78 (defvar pgg-echo-buffer "*PGG-echo*")
79
80 (defvar pgg-scheme nil
81   "Current scheme of PGP implementation.")
82
83 (defmacro pgg-truncate-key-identifier (key)
84   `(if (> (length ,key) 8) (substring ,key 8) ,key))
85
86 (provide 'pgg-def)
87
88 ;;; arch-tag: c425f3ab-ed75-4055-bb46-431a418c94b7
89 ;;; pgg-def.el ends here