pgg-def.el 2.7 KB

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