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