Commit | Line | Data |
---|---|---|
23f87bed MB |
1 | ;;; pgg-def.el --- functions/macros for defining PGG functions |
2 | ||
aaef169d | 3 | ;; Copyright (C) 1999, 2002, 2003, 2004, 2005, |
5df4f04c | 4 | ;; 2006, 2007, 2008, 2009, 2010, 2011 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 | ||
eb3fa2cf | 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
23f87bed | 13 | ;; it under the terms of the GNU General Public License as published by |
eb3fa2cf GM |
14 | ;; the Free Software Foundation, either version 3 of the License, or |
15 | ;; (at your option) any later version. | |
23f87bed MB |
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 | |
eb3fa2cf | 23 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
23f87bed MB |
24 | |
25 | ;;; Code: | |
26 | ||
23f87bed MB |
27 | (defgroup pgg () |
28 | "Glue for the various PGP implementations." | |
d9ef2710 | 29 | :group 'mime |
bf247b6e | 30 | :version "22.1") |
23f87bed MB |
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." | |
bf247b6e | 51 | :version "22.1" |
23f87bed MB |
52 | :group 'pgg |
53 | :type 'boolean) | |
54 | ||
55 | (defcustom pgg-encrypt-for-me t | |
56 | "If t, encrypt all outgoing messages with user's public key." | |
57 | :group 'pgg | |
58 | :type 'boolean) | |
59 | ||
60 | (defcustom pgg-cache-passphrase t | |
61 | "If t, cache passphrase." | |
62 | :group 'pgg | |
63 | :type 'boolean) | |
64 | ||
65 | (defcustom pgg-passphrase-cache-expiry 16 | |
66 | "How many seconds the passphrase is cached. | |
67 | Whether the passphrase is cached at all is controlled by | |
68 | `pgg-cache-passphrase'." | |
69 | :group 'pgg | |
70 | :type 'integer) | |
71 | ||
11e95b02 | 72 | (defcustom pgg-passphrase-coding-system nil |
31a7c2ff MB |
73 | "Coding system to encode passphrase." |
74 | :group 'pgg | |
75 | :type 'coding-system) | |
76 | ||
23f87bed MB |
77 | (defvar pgg-messages-coding-system nil |
78 | "Coding system used when reading from a PGP external process.") | |
79 | ||
80 | (defvar pgg-status-buffer " *PGG status*") | |
81 | (defvar pgg-errors-buffer " *PGG errors*") | |
82 | (defvar pgg-output-buffer " *PGG output*") | |
83 | ||
84 | (defvar pgg-echo-buffer "*PGG-echo*") | |
85 | ||
86 | (defvar pgg-scheme nil | |
87 | "Current scheme of PGP implementation.") | |
88 | ||
34128042 MB |
89 | (defvar pgg-text-mode nil |
90 | "If t, inform the recipient that the input is text.") | |
91 | ||
23f87bed | 92 | (defmacro pgg-truncate-key-identifier (key) |
88dcc76a | 93 | `(if (> (length ,key) 8) (substring ,key -8) ,key)) |
23f87bed MB |
94 | |
95 | (provide 'pgg-def) | |
96 | ||
cbee283d | 97 | ;; arch-tag: c425f3ab-ed75-4055-bb46-431a418c94b7 |
23f87bed | 98 | ;;; pgg-def.el ends here |