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