Anonymous avatar Anonymous committed 3df25a7

New Mailcrypt

Comments (0)

Files changed (20)

-Mailcrypt version 3.4 is now available.
+  Mailcrypt 3.5.3 is Available for Download
 
-Mailcrypt is an Emacs Lisp package which provides a simple interface
-to message encryption with PGP.  (You do use Emacs to handle your mail
-and news, right?)
 
-Features: Encryption, decryption, signing, adding keys, extracting
-keys, passphrase caching with timeout, multiple secret key (identity)
-support, a simple but flexible interface to Cypherpunk remailers
-(including chaining, response blocks, pseudonyms, and Mixmaster
-support), and an automatic keyserver interface via HTTP.
+  1.  Introduction
 
-*We* think it's the best interface to these functions anywhere, but
-then again, we're biased.
 
-The NEWS file is appended to this message.
+  Mailcrypt is an Emacs Lisp package which provides a simple interface
+  to message encryption with PGP (you do use Emacs to handle your mail
+  and news, right?). Mailcrypt version 3.5b1 and higher have been
+  extended to handle both PGP 2.6.x and PGP 5.x.  Versions 3.5 and
+  higher, including 3.5.3, also support encryption with GnuPG. Thanks
+  to Brian Warner.
 
-Obtain it from the Mailcrypt home page at
 
-	http://cag-www.lcs.mit.edu/mailcrypt/
+  2.  Features
 
-or via FTP to
+  2.1. New Features/Enhancements
 
-	ftp://cag.lcs.mit.edu/pub/patl/
+   We have key fetching for PGP 5.0! Paul Koning has added support for
+   the Horowitz Key Protocol! PGP 5 keyservers can now be queried. If
+   no bugs are exposed in this release, then Mailcrypt's PGP5 support
+   can be considered feature-complete.
 
-Enjoy!
+   Improved compatibility for XEmacs users! We've fixed up several
+   gotchas which prevented version 3.5.1 from working "out of the box"
+   with XEmacs. Cross your fingers...it should be just fine now.
 
- - Patrick J. LoPresti (patl@lcs.mit.edu)
- - Jin S. Choi (jin@atype.com)
+   Fixed a minor compatibility bug with GPG support and GPG verson
+   0.9.3. Fixed a bug which dumped GNUS users into the wrong buffer after
+   verifying a signature. Fixed a compatibility bug between XEmacs and FSF
+   Emacs in mc-setversion. Fixed a bug in mh-e support so that users can
+   view decrypted messages without saving them. Several minor bugfixes.
+
+
+  2.2.	Stable Features for PGP 5.0 and GnuPG
+
+  Support for GnuPG.  Key snarfing functionality for PGP 5.0.
+  Messages from PGP 5.0 operations now resemble more closely the
+  messages generated for version 2.6.  Encryption works correctly,
+  even when the secret keyring is not available (a requested feature
+  for paranoid types ;-).  Mixmaster and Cypherpunk remailers can be
+  used in PGP 5.0 mode, if the user has an RSA key. Further updated
+  documentation for support under various mail packages.
+
+
+  2.3.	Features for PGP 2.6.x (stable)
+
+  Encryption, decryption, signing, adding keys, extracting keys,
+  passphrase caching with timeout, multiple secret key (identity)
+  support, a simple but flexible interface to Cypherpunk remailers
+  (including chaining, response blocks, pseudonyms, and Mixmaster
+  support), and an automatic keyserver interface via HTTP.
+
+
+  2.4.	Still To Do
+
+  o  Restore functionality on Windows 95/98/NT. If tiny-pgp can do it,
+     we can too!
+
+  o  Refine Mailcrypt schemes so that alternate backends, like Crypt++,
+     can be used.
+
+
+
+  3.  Downloading Mailcrypt
+
+  The Official Mailcrypt version 3.5.3 can be downloaded at:
+
+  <http://www.pobox.com/~lbudney/linux/software/mailcrypt.html>
+
+  Since receiving the blessing of the original authors, this is now
+  the official Mailcrypt site.
+
+  Of course, Mailcrypt 3.4 can still be downloaded at the (just as
+  official) Mailcrypt sites: 
+
+  <http://cag-www.lcs.mit.edu/mailcrypt/>
+  and
+  <ftp://cag.lcs.mit.edu/pub/patl/>
+
+  Share and Enjoy!
+	- Len Budney <lbudney@pobox.com>
-1998-01-24  SL Baur  <steve@altair.xemacs.org>
+1999-03-12  Gregory Neil Shapiro  <gshapiro@sendmail.org>
 
-	* Makefile (VERSION): Update to package standard 1.0.
-	* package-info.in: Ditto.
+	* mc-pgp5.el (mc-pgp50-sign-parser): Deactivate the
+	  password if mc-passwd-timeout is set to nil.
 
-1998-01-12  SL Baur  <steve@altair.xemacs.org>
+1999-03-05  Brian Warner <warner@lothar.com>
 
-	* Makefile: Update to newer package interface.
+	* mc-gpg.el: Patched GPG-signing code to work correctly with
+	GPG-0.9.3. Thanks to Brian Warner.
 
-1997-01-05  SL Baur  <steve@altair.xemacs.org>
+1999-03-04  Leonard R. Budney  <lbudney@pobox.com>
 
-	* Makefile: Update to newer package interface.
+	* mc-pgp5.el: Added key-fetching to PGP 5 using the hkp
+	protocol. Thanks Paul Koning!
 
-1997-12-21  SL Baur  <steve@altair.xemacs.org>
+1999-02-27  Leonard R. Budney  <lbudney@pobox.com>
 
-	* Makefile: Created.
+	* mc-toplev.el: Fixed a bug in rmail support, which always
+	reported the wrong "verified" status. Thanks to Gerrit Jahn.
 
-Wed Apr 24 17:59:45 1996  Steven L Baur  <steve@miranova.com>
+	* mc-toplev.el: Patched GNUS support so that Mailcrypt won't dump
+	users into the "raw" article buffer--though that buffer is used
+	for verifying since PGP junk can be hidden in GNUS. Thanks to
+	Ulrik Dickow.
 
-	* mailcrypt.el (mc-modes-alist): September Gnus has message-mode
-	for editing mail and news messages.
+	* mc-toplev.el: Fixed mh-e support so that users can view
+	encrypted messages without saving them. Thanks to Andreas Eder.
 
-Tue Oct 10 15:53:01 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+	* INSTALL, mc-setversion.el: Fixed mc-setversion to use
+	completing-read in a way which works with both emacs and
+	XEmacs. Thanks to Robert Bihlmeyer for the patch, and to numerous
+	people for reporting the bug, including Dan Girellini, and Dirk
+	Husemann.
 
-	* Version 3.4 released.
+	* INSTALL: Added a warning to the INSTALL file for users of Emacs
+	20.3 and higher, to install Mailcrypt correctly into rmail. Thanks
+	to Tony Silva.
 
-Wed Oct  4 18:25:02 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: Fixed out-of-turn passphrase deactivation which
+	breaks mailcrypt for anyone paranoid enough to set
+	mc-passwd-timeout to 0 or nil. Thanks to Gregory Neil Shapiro.
 
-	* INSTALL: Document setting mc-pgp-comment to nil if using
-	obsolete version of PGP.
+	* ChangeLog, mc-gpg.el: Lots of cleanup and improvements in the
+	GPG support code. Thanks to Brian Warner.
 
-	* mc-remail.el (mc-parse-levien-buffer): Allow remailers with
- 	"mix" property, even if "pgp" and "cpunk" properties are lacking.
-	(mc-generic-pre-encrypt-function): Don't try to
-	expand-mail-aliases if 'mail-abbrevs is provided.
+	* mailcrypt.el, mc-pgp5.el: Added support for key fetching under
+	PGP 5.0. Many thanks to Loren J. Rittle!
 
-	* mc-pgp.el (mc-pgp-always-fetch): New variable.  Use to regulate
-	key fetching.
+	* mc-toplev.el: Removed call to (vm-select-folder-buffer) in
+	mc-toplev.el. Thanks to Eric C. Newton.
 
-Fri Sep 29 14:39:17 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-gpg.el: Fixed mc-gpg.el to avoid using with-current-buffer,
+	which emacs 19 didn't have. Thanks to Brian Warner.
 
-	* mailcrypt.el (mc-deactivate-passwd): Don't give feedback unless
-	called interactively.
-	(mc-get-fields): Use `buffer-substring-no-properties' to get the
-	body of the field as well as the name.  Egad.
+1998-11-26  Leonard R. Budney  <lbudney@pobox.com>
 
-Fri Sep 22 15:34:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* INSTALL, ANNOUNCE: Updated the announcement and install
+	documentation. Thanks to Andreas Zell and Remi Guyomarch.
 
-	* mc-toplev.el (mc-gnus-verify-signature): Renamed from
-	`mc-gnus-summary-verify-signature'.
-	(mc-gnus-snarf-keys): Renamed from `mc-gnus-summary-snarf-keys'.
-	(mc-gnus-decrypt-message): Renamed from
-	`mc-gnus-summary-decrypt-message'.
+	* mailcrypt.info-2, mailcrypt.texi, mailcrypt.el, mailcrypt.info,
+	mailcrypt.info-1, ChangeLog, LCD-entry, mailcrypt.dvi: Changed
+	version information to 3.5.1 in all relevant files, preparatory to
+	another release.
 
-	* mailcrypt.el (mc-modes-alist): Add `gnus-article-mode'.
-	Reflect	name changes to Gnus support functions.
+	* mailcrypt.info-1, mailcrypt.info-2, mc-pgp5.el, mailcrypt.info:
+	Incorporated and tested Brian W's changes to mc-pgp5.el. He
+	localized a bunch of variables, cutting down on compiler
+	warnings. Thanks!
 
-Wed Sep 20 09:30:53 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* configure.in, mailcrypt.texi, mc-gpg.el, Makefile.in,
+	README.gpg, configure: Incorporated more fixes from Brian Warner
+	to GPG support; cleaned up Makefile, removed Perl test from
+	configure script, updated the README.gpg, and much much more.
 
-	* mc-toplev.el (mc-gnus-summary-decrypt-message): Bind
-	`case-fold-search' to nil when matching "Gnus".
+	* README.gpg: Sync-ed with patch from Brian Warner against
+	3.5b7. The change appears trivial only because his previous patch
+	was faithfully applied way back when.
 
-	* mailcrypt.el (mc-xemacs-p): "XEmacs", not "Xemacs".
+1998-10-19  Leonard R. Budney  <lbudney@pobox.com>
 
-Sat Sep 16 09:51:03 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: Fixed bug in signing 8-bit data (including messages
+	in most languages other than English!  Bad, Bad PGP 5!).  Thanks
+	to Greg Steuck.
 
-	* mc-pgp.el (mc-pgp-encrypt-region): If no recipients, just armor
-	file.
-	(mc-pgp-msg-end-line): Match optional newline at end.
-	(mc-pgp-encrypt-region): Don't honor mc-encrypt-for-me if only
-	armoring.
-	Output "Armoring..." if only armoring.
+	* mailcrypt.texi, mailcrypt.info-1, mailcrypt.info-2,
+	mailcrypt.info: Updated "mc-setversion" documentation in the
+	Mailcrypt info file.  Thanks to Adam Beck.
 
-	* mc-toplev.el (mc-gnus-summary-decrypt-message): Don't
-	bother trapping error on decrypt.
-	Require Gnus version 5.0.4 or higher.
-	Use new	`gnus-group-read-only-p' predicate.
-	Pass t to `gnus-summary-edit-article'.
-	(mc-encrypt-message): Punt check for no recipients.
+1998-10-16  Leonard R. Budney  <lbudney@pobox.com>
 
-Sun Sep 10 16:36:37 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* configure.in, gpgwrap.pl.in, mc-gpg.el, INSTALL, Makefile.in,
+	README.gpg, configure: Updated GPG support to handle GPG 0.4.1,
+	and improve various aspects of mc-gpg.el.  Most notably, the
+	wrapper script gpgwrap.pl is now obsolete, and Mailcrypt users are
+	heartily recommended to upgrade their GPG installation--it was a
+	GPG bug which necessitated the wrapper script.  Thanks to Brian
+	Warner, the Official Mailcrypt GPG Wizard.
 
-	* mc-pgp.el (mc-pgp-decrypt-parser): Deal with armor-only files.
+	* mc-pgp.el: Re-enabled conventional decryption in PGP 2.6 mode.
+	Thanks to Roger Williams for spotting this bug.
 
-	* mc-remail.el (mc-eliminate-continuation-lines): New function.
-	(mc-generic-pre-encrypt-function): Eliminate continuation lines in
-	preserved headers.
-	(mc-rewrite-for-mixmaster): Ditto.
+1998-10-15  Leonard R. Budney  <lbudney@pobox.com>
 
-Mon Sep  4 17:57:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* Makefile.in: Fixed "bindir" in the makefile, so that gpgwrap
+	gets installed in the correct place.  Thanks to Markku Kolkka.
 
-	* mailcrypt.el (mc-process-region): Make sure we are in the source
- 	buffer when starting process, in case `process-environment' is
- 	buffer-local.
+1998-10-05  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-remail.el (mc-rewrite-for-mixmaster): Signal error if
- 	attempting to post through a Mixmaster.
+	* mc-toplev.el: Modified mc-mh-decrypt-message to optionally turn
+	off backup of MH messages.  By default, backup is enabled (for
+	backward compatibility).  Use this one with caution.
 
-Sun Sep  3 18:09:58 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-10-04  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-pgp.el (mc-pgp-decrypt-region): Add strategic
- 	`save-excursion' calls to avoid changing buffers inside `let'.
+	* mailcrypt.info-2, mc-pgp5.el, mailcrypt.info, mailcrypt.info-1:
+	Fixed a "buffer bug" in which decrypting under mh-e exits with an
+	error and leaves the user in some random buffer (although
+	decryption succeeds).  Basically, the PGP 5.0 parsers all call
+	"pop-to-buffer" near the end, which screws up the buffer history
+	list.  Why on earth was "pop-to-buffer" ever used in the first
+	place?
 
-Fri Sep  1 15:05:56 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-09-28  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-remail.el (mc-remailer-remove-property): New function.
-	(mc-remailer-canonicalize-chain): Make second arg CHAINS-ALIST
-	optional; default to `(mc-remailer-make-chains-alist)'.
-	(mc-demix): New function.
+	* INSTALL: Fixed INSTALL documentation of "mc-setversion".
 
-	* mailcrypt.el (mc-process-region): Fix regexp to match "Process
-	*PGP* killed" et al.
+	* mailcrypt.info-2, mailcrypt.texi, mailcrypt.info,
+	mailcrypt.info-1, mailcrypt.dvi, mailcrypt.el, ChangeLog,
+	LCD-entry, README, ANNOUNCE: Update for release.
 
-Thu Aug 31 12:52:44 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mailcrypt.texi, mailcrypt.info, mailcrypt.info-1: Updated rmail
+	documentation for Emacs 20.3, in which the rmail-mode-hook has
+	changed to rmail-show-message-hook.  Thanks to Tim Steele.
 
-	* mc-toplev.el (mc-encrypt-message): Clean up.  Use
-	`mc-get-fields' and `mc-strip-addresses'.
+	* mailcrypt.texi, mailcrypt.info-2, mailcrypt.info-1,
+	mailcrypt.info: Updated documentation to mention "message-mode"
+	when setting up Mailcrypt for use under Gnus.  Thanks to several
+	usenet posters addressing this problem, particularly Kevin
+	Davidson.
 
-	* mailcrypt.el (mc-strip-addresses): New function. Use everywhere.
-	
-	* mc-remail.el (mc-remailer-choose-first): New function.
-	(mc-remailer-choose-chain): New function.
-	(mc-parse-levien-buffer): Add support for returning a "ranking" of
-	remailers.
-	(mc-remailer-canonicalize-elmt): Add support for using an integer
-	N in a remailer-list to represent the top N remailers, shuffled
-	randomly.
-	(mc-strip-address): New function.  Use everywhere.
+	* mc-pgp.el, mc-pgp5.el: Modified mc-pgp[50]-lookup-key to not
+	mind a missing secret keyring.  This is useful for the paranoid
+	sorts ;-) who keep their secret keyring on a floppy, and who
+	usually encrypt to public keys but don't sign.  These folks can
+	encrypt without their secret keyring even being on the machine in
+	question.  Thanks to Steven T. Smith (usenet post, 1997/02/03).
 
-	* mc-toplev.el (mc-vm-decrypt-message): Bind `this-command' to
-	`vm-edit-message-end' to trick VM into doing the right thing when
-	redisplaying.
+1998-09-27  Leonard R. Budney  <lbudney@pobox.com>
 
-Sun Aug 27 13:12:22 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mailcrypt.el, mc-pgp5.el: Applied patches which help Mailcrypt
+	to run correctly with PGP 5.0i in XEmacs.  Thanks to Gunnar
+	Evermann.
 
-	* mc-toplev.el (mc-sign-generic): Only run hooks if signing was
-	successful.
+	* mc-pgp5.el: Fixed the last bug in key snarfing; updated feedback
+	to adhere to the current convention (list instead of cons).
 
-Sat Aug 26 09:18:51 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-09-24  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-toplev.el (mc-vm-decrypt-message): Bind `vm-frame-per-edit'
-	to nil.
+	* mc-pgp5.el: Improved diagnostic messages, particularly for
+	signatures.  They still don't quite match up with the old
+	Mailcrypt messages, but they are a good deal better.
 
-Fri Aug 25 17:41:28 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-09-23  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-toplev.el (mc-sign-generic): Return result of signing
-	message, instead of always returning nil.
+	* mc-pgp5.el: Encryption now handles the (bogus) case that no
+	recipients are specified.  I believe that PGP 2.6.2 quietly armors
+	text in that case, and perhaps we should do that.  At the moment,
+	however, we trap the error condition.
 
-Mon Aug 21 11:58:07 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: There!  The last bug rooted out.  Now
+	mc-pgp50-process-region works correctly with Brian Warner's key
+	snarfing code.  Provisionally, key snarfing support is now
+	complete.
 
-	* mailcrypt.el (mc-modes-alist): Add support for
-	`vm-virutal-mode'.
+	* mc-pgp5.el, mailcrypt.el, mc-gpg.el: Changed behavior of
+	mc-pgp50-process-region to use more "Mailcryptish" messages.  In
+	part, this is to facilitate key fetching and snarfing, using code
+	contributed by Brian Warner.  We're getting close!
 
-Sun Aug 20 15:19:52 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-09-22  Leonard R. Budney  <lbudney@pobox.com>
 
-	* Makefile.in (install): Use a loop for installing .elc files,
-	since install-sh can't copy multiple files at once.
+	* Makefile.in: Changed "distclean" target to remove derived file
+	"gpgwrap.pl".
 
-	* mc-toplev.el (mc-gnus-summary-decrypt-message): Back out 8/4
-	change; call `gnus-summary-edit-article-postpone' instead.
-	Call `gnus-version' function instead of reading variable.
+	* mc-pgp5.el, gpgwrap.pl, gpgwrap.pl.in, mc-gpg.el, Makefile.in,
+	configure, configure.in: Changed gpgwrap.pl to an "autoconf" file
+	so that the path to perl is set at configuration time.  Also added
+	minor fixes to PGP 5.0 encryption.
 
-Fri Aug  4 11:51:37 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-gpg.el: Oops again.  Missed mc-gpg.el this time.
 
-	* mc-toplev.el (mc-gnus-summary-decrypt-message): Run
-	`gnus-article-display-hook' after decrypting.
+	* README.gpg, gpgwrap.pl: Oops--added in contributed files from
+	Brian Warner containing the guts of GPG support.  The previous
+	revision included only changes to existing files.  All better now!
 
-Wed Aug  2 10:05:06 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-toplev.el, Makefile.in, mailcrypt.el, mc-setversion.el,
+	INSTALL: Added complete implementation of GnuPG support.  Also
+	fixed up mc-setversion so that version selection behaves more like
+	the documentation claims.  Documentation includes discussion of
+	the new GnuPG support.  Much thanks to Brian Warner, again!
 
-	* mailcrypt.el (mc-split): Use \\' instead of $ to match end of
-	string.
-	
-Tue Aug  1 15:55:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: Implemented functional Key Snarfing under PGP 5.0.
+	Thanks to Brian Warner!
 
-	* Version 3.3 released.
+	* mc-remail.el: Modified remailer support to handle multiple
+	newsgroups correctly.  I'm having real trouble posting with
+	Mixmaster remailers, so this is pretty experimental.
 
-Mon Jul 31 11:22:23 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-09-01  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-toplev.el (mc-rmail-decrypt-message): Use abstractions for
-	keymaps to work with XEmacs.
-	(mc-gnus-summary-decrypt-message): Clean up.
-	(mc-gnus-summary-verify-signature): Don't display all headers.
-	(mc-gnus-summary-snarf-keys): Ditto.
+	* mailcrypt.info-1, mailcrypt.info-2, mailcrypt.info: Updated
+	precompiled info files.
 
-Sat Jul 29 11:47:51 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp.el: Updated MIT public keyserver address for PGP 2.6.x
+	key lookup.  Thanks to Bill Wohler.
 
-	* mc-pgp.el (mc-pgp-decrypt-region): Call `undo-boundary'.
+	* mailcrypt.texi, mc-remail.el: Updated finger address for
+	remailer list in variable documentation.  Changed regexp for
+	parsing Levien remailer list to account for single quotes, which
+	are sometimes used.
 
-Thu Jul 27 20:56:41 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-08-29  Leonard R. Budney  <lbudney@pobox.com>
 
-	* load-path.hack: Give a friendly warning if a version of Emacs
-	other than 19 is used to byte-compile.
+	* mailcrypt.info-2, mailcrypt.texi, mailcrypt.info-1,
+	mailcrypt.info, mailcrypt.dvi, Makefile.in, configure,
+	configure.in: Updated Mailcrypt documentation--still a long way to
+	go.  Also fixed up the installation of info files, so the new
+	documentation will install correctly.
 
-Thu Jul 27 16:05:13 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+	* configure.in, configure: Fixed a bug in the configure script
+	which got confused when emacs (or Xemacs) are referred to by their
+	full pathname.  Thanks to Sergio Antoy.
 
-	* configure.in: Use `EMACS19' instead of `EMACS' for autoconf
- 	substitution variable, lest "configure" get confused when run
- 	under an Emacs shell.
+1998-08-28  Leonard R. Budney  <lbudney@pobox.com>
 
-	* Makefile.in: Ditto.
+	* mailcrypt.el, mc-pgp.el, mc-pgp5.el: Moved definition of
+	mc-pgp-always-sign into mailcrypt.el so that it applies to all
+	encryption schemes at once.  Also fixed a bug which prevented
+	deactivation of an incorrect passphrase when signing and
+	encrypting in one step.
 
-Thu Jul 27 10:24:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mailcrypt.el, mc-pgp.el, mc-pgp5.el: Fixed a bug in the RFC-822
+	regular expression for mail headers.  Also enhanced PGP keyid
+	lookup to ignore revoked keys in both PGP 2 and PGP 5.  Thanks to
+	Dean Bullock for spotting this bug.
 
-	* mc-pgp.el (mc-pgp-keyserver-address): Use "pgp.ai.mit.edu"
-	instead of "www-swiss.ai.mit.edu".
+1998-08-27  Leonard R. Budney  <lbudney@pobox.com>
 
-	* ANNOUNCE: Update version and date in preparation for 3.3
- 	release.
+	* mailcrypt.el: Modified mc-field-name-regexp to match on exactly
+	those email headers which are RFC-822 compliant.
 
-	* INSTALL: Updated to reflect new installation directory and
-	absolute requirement of `easymenu'.
+	* mailcrypt.el: Changed mc-field-name-regexp so that fields with
+	":" in their bodies work correctly.  This permits addresses like
+	"null:" and like "post: alt.test" when using mixmaster remailers.
+	Note however that the latter should also be generated seamlessly
+	by mailcrypt when posting in the usual way.
 
-	* mailcrypt.el (mc-process-region): Fix parenthesization error.
-	Again.
+	* mc-toplev.el: Updated Gnus support to look in
+	gnus-original-article-buffer rather than in gnus-article-buffer
+	for PGP stuff.  Gnus has been changed to actually delete PGP stuff
+	when using gnus-article-hide-pgp, and this patch permits
+	verification of signatures even when hidden.  Thanks to Dave Love.
 
-Wed Jul 26 12:48:50 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+1998-08-26  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-remail.el (mc-rewrite-for-remailer): Use `mc-encrypt-for-me'
-	instead of `mc-encrypt-to-me', since there the latter does not
-	exist.
+	* mc-pgp5.el: Changed mc-pgp50-always-sign back to
+	mc-pgp-always-sign.  As a result, encrypting for remailers does
+	not prompt repeatedly "Sign the message?"  As a side effect,
+	"always sign" really means always; for every coding scheme.
 
-Sun Jul 23 13:01:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: Fixed a stupid typo introduced in the previous
+	revision.
 
-	* mc-pgp.el (mc-pgp-decrypt-region): Clean up case where key is
-	missing and we offer to fetch it.
+1998-08-25  Leonard R. Budney  <lbudney@pobox.com>
 
-Thu Jul 20 11:51:06 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: Enabled signing and encrypting in one step.  Thanks
+	to Fabien Coelho.
 
-	* mc-pgp.el (mc-pgp-newkey-re): Incorporate fix from Mike Long to
-	only recognize key additions.
+	* mc-pgp5.el: Added public key insertion for PGP 5.0, and fixed
+	the annoying lack of newlines at the and of PGP messages.  Thanks
+	to Sergio Antoy.
 
-Wed Jul 19 10:50:55 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el: Added Mailcrypt comment to signed messages in PGP
+	5.0.
 
-	* mailcrypt.el: Deal with unbound buffer-substring-no-properties
- 	to work with Emacs 19.28 after all.
+1998-08-23  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-pgp.el (mc-pgp-verify-region): Return nil if signature fails
-	to verify.
+	* mc-pgp5.el, mc-setversion.el, mc-toplev.el, Makefile.in,
+	mailcrypt.el, mc-pgp.el, mc-pgp2.el, INSTALL: Completed a major
+	rewrite.  Basic elisp code is unchanged, and overall functionality
+	is unchanged.  However, I restored the original mailcrypt files to
+	their prior condition (almost), and implemented PGP 5 support
+	through the "scheme" mechanism originally provided by Pat and Jin.
+	Though there are pros and cons to both their approach and mine, I
+	would rather stick with theirs.  Now GPG support can be added
+	fairly simply!
 
-	* mc-toplev.el (mc-sign-generic): Make sure start and end are
-	markers before calling mc-pre-signature-hook.
-	(mc-encrypt-generic): Ditto, mc-pre-encryption-hook.
+1998-08-19  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-remail.el (mc-remailer-insert-response-block): Fix
- 	parenthesization error.
+	* INSTALL: Changed setup info for .emacs file to load
+	"mc-setversion" rather than autoloading it.  After all, it's silly
+	to "autoload" something and then immediately call it!  Thanks to
+	Aaron Gross and David Maslen.
 
-	* mc-toplev.el (mc-gnus-summary-decrypt-message): Incorporate Fran
-	Litterio's changes for (ding) GNUS.
-	Clean up MH-E stuff a bit.  Should really redo it entirely at some
-	point.
+	* configure: Generated updated configure script.
 
-	* texi2html.ext: New file.
+	* configure.in, INSTALL: Tweaked the EMACSFLAGS for Xemacs to work
+	for both Xemacs 19.x and 20.x.  Fixed up the INSTALL file to
+	document these slight differences.
 
-Tue Jul 18 14:26:00 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-08-18  Leonard R. Budney  <lbudney@pobox.com>
 
-	* Fix stuff all over to silence byte compilation warnings under
-	XEmacs.
+	* configure.in, configure, Makefile.in: Added "--vanilla" flag for
+	Xemacs compiling, and modified the "configure" script to abort if
+	emacs or Xemacs are not found.  Also, changed the override to use
+	the environment variable "EMACS" instead of the totally ridiculous
+	"EMACS19".  Thanks to Amir J. Katz.
 
-	* mailcrypt.el: (require 'easymenu) outright.  Starting now we
- 	demand at least FSF Emacs 19.28 or XEmacs 19.13.
+1998-07-29  Leonard R. Budney  <lbudney@pobox.com>
 
-Mon Jul 17 16:30:43 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* FSF-timer.el, Makefile.in, configure, configure.in, timer.el:
+	Moved "timer.el" to a file of another name, to prevent
+	inadvertantly including it when the timer package is already
+	installed.
 
-	* Makefile.in: Minor tweaks.  Use `.../share/emacs/site-lisp'.
+	* timer.el: Used a different version of timer.el which doesn't
+	BREAK mailcrypt for NON xemacs users.
 
-Sun Jul 16 13:48:06 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-07-26  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-pgp.el: Use "buffer-substring-no-properties" everywhere.  Feh.
-	mc-remail.el: Ditto.
-	
-Sat Jul 15 01:41:18 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* Makefile.in: Fixed "make dist" to include timer.el.  Oops!
 
-	* mc-pgp.el: Add "+language=en" to PGP command lines so that we
-	are sure to parse the output correctly.
+1998-07-24  Leonard R. Budney  <lbudney@pobox.com>
 
-Wed Jul 12 16:37:37 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* ANNOUNCE, NEWS: Updated announcement and news files.
 
-	* mc-toplev.el (mc-vm-verify-signature): Call vm-widen-page in
-	case vm-honor-page-delimiters is set.
-	(mc-vm-snarf-keys): Ditto.
-	('mail-utils): Required for mail-fetch-field on some Emacsen.
+	* ChangeLog, ChangeLog.old: Moved Jin and Pat's ChangeLog data
+	into ChangeLog.old for the sake of history.  The Changelog file
+	will be automatically generated from my sources from now on.
 
-Fri Jun 30 10:20:52 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* ONEWS, ChangeLog, NEWS: Updated news and changelog files for the
+	anticipated flurry of development and bug fixes.
 
-	* mc-remail.el (mc-rewrite-news-to-mail): Nuke "Newsgroups" field.
+1998-07-23  Leonard R. Budney  <lbudney@pobox.com>
 
-Fri Jun 23 11:04:54 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* NEWS, ANNOUNCE, INSTALL, LCD-entry, mailcrypt.el: *** empty log
+	message ***
 
-	* Version 3.2 released.
+	* INSTALL, README: Updated documentation for Xemacs users, and
+	deleted some (old, and apparently obsolete) pointers from the
+	README file.
 
-	* mc-pgp.el (mc-pgp-fetch-key): Add "+batchmode" to PGP arglist.
-	(mc-pgp-key-begin-line): Allow match only when delimiter string
-	is the entire line.
-	(mc-pgp-key-end-line): Likewise.
+	* configure.in, timer.el, Makefile.in, configure: Added timer.el
+	to the Mailcrypt distribution, so that Mailcrypt should work
+	correctly for Xemacs users.  The configure script simply checks
+	whether timer.el is in the user's load path, and includes timer.el
+	in the list of files to compile and install if it isn't.
 
-	* configure.in: New file.
-	configure: New file.
-	Makefile.in: New file.  Brought into conformance with GNU
-	standards.
-	INSTALL: Revised to reflect `autoconf'-generated configuration
-	scheme.
+1998-07-22  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mailcrypt.el (mc-deactivate-passwd, mc-activate-passwd): Do the
-	right thing if both `timer' and `itimer' are present.
+	* mc-pgp5.el: Modified mc-pgp5-sign-parser to behave correctly
+	when signing 8bit data.  In that case, the PGP delimiter reads
+	"END PGP MESSAGE" rather than "END PGP SIGNATURE".  Thanks to Greg
+	Steuck.
 
-Thu Jun 22 16:57:49 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+1998-07-21  Leonard R. Budney  <lbudney@pobox.com>
 
-	* mc-pgp.el (mc-pgp-generic-parser): Include '\n' from final
-	delimiter line.
+	* load-path.hack, Makefile.in: Made Makefile more conformant to
+	GNU standards, and eliminated annoying warning about Emacs
+	versions other than 19.*.  Thanks to Tony Silva.
 
-Wed Jun 21 18:13:10 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mailcrypt.el, mailcrypt.info: Updated version number in elisp
+	code.
 
-	* mc-pgp.el (mc-pgp-fetch-key): Give a diagnostic if the key was
-	not found.
+	* pgpv.sh, pgpe.sh, pgps.sh, mc-setversion.el, mc-pgp5.el,
+	mc-pgpk, mc-pgp.el, Makefile.in: Removed dependency on shell
+	scripts and perl scripts.  Added completion to mc-setversion.
+	Thanks to Brian Warner.
 
-Tue Jun 20 00:53:51 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+	* mc-pgp5.el, INSTALL: Corrected initialization instructions and
+	fixed regular expression to permit handling of emails in Svenska.
+	Thanks to Jonas Linde.
 
-	* mc-toplev.el (mc-rmail-view-quit): Mark buffer unmodified when
-	quitting.
+	* mailcrypt.dvi, mailcrypt.texi, mc-pgpk, mkinstalldirs, pgpe.sh,
+	pgps.sh, pgpv.sh, texi2html.ext: Initial revision.
 
-	* mailcrypt.el (mc-process-region): Don't rely on
-	accept-process-output returning immediately if process is dead
-	(for XEmacs' sake).
+	* mailcrypt.dvi, mailcrypt.texi, mc-pgpk, mkinstalldirs, pgpe.sh,
+	pgps.sh, pgpv.sh, texi2html.ext: New file.
 
-	* README: Revised (i.e., truncated) to reflect INSTALL file,
-        Texinfo docs, and Web pages.
+	* ANNOUNCE, ChangeLog, INSTALL, LCD-entry, Makefile.in, NEWS,
+	ONEWS, README, configure, configure.in, expect.el, install-sh,
+	load-path.hack, mailcrypt.el, mailcrypt.info, mc-pgp.el,
+	mc-pgp2.el, mc-pgp5.el, mc-remail.el, mc-setversion.el,
+	mc-toplev.el: Initial revision.
 
-	* INSTALL: New file.
-
-	* Makefile: New file.
-
-Mon Jun 19 16:55:39 1995  Patrick J. LoPresti  <patl@catfish.lcs.mit.edu>
-
-	* NEWS: New file.
-
-	* mailcrypt.texi: New file.  Spent last few days getting this
-	written and the Web pages up.
-
-Fri Jun 16 17:55:14 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
-
-	* mc-pgp.el (mc-pgp-comment): New variable.
-
-Thu Jun 15 00:33:44 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
-
-	* mc-pgp.el: New file.
-
-	* mc-toplev.el: New file.
-
-Wed Jun 14 16:51:00 1995  Patrick J. LoPresti  <patl@catfish.lcs.mit.edu>
-
-	* mailcrypt.el (mc-pgp-fetch-from-keyrings): New function.
-	(mc-pgp-fetch-keyring-list): New variable.
-	Forgot to document most of the changes in the past week, oh well.
-	(mc-scheme-pgp): New function to replace variable of same name in
-	preparation for putting PGP support into its own file.
-
-Thu Jun  8 13:16:50 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
-
-	* mailcrypt.el (mc-pgp-fetch-finger): New function.
-	(mc-pgp-fetch-http): New function.
-	(mc-pgp-fetch-key): New function.
-
-Thu Jun  1 20:09:21 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
-
-	* mailcrypt.el (mc-encrypt-generic): Only use Email addresses in
-	default-recipients.
-	(mc-pgp-generic-parser): Fix parenthesis error causing non-nil
-	return on bad passphrase.  Fix regular expression for bad
-	passphrase.
-
-Thu May 11 19:32:19 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
-
-	* mailcrypt.el (mc-pgp-display-snarf-output): New variable,
-	defaults to nil.  If t, pop up a window to display the output of
-	key snarfing.
-
-	* mc-remail.el (mc-nuke-field): Do not clobber markers.  (This is
-	the wrong place to do it anyway.)
-	(mc-rewrite-for-remailer): Eliminate "Comment" and "From" headers
-	after encryption.
-
-Tue May  9 15:58:53 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
-
-	* mailcrypt.el (mc-modes-alist): Fix typos for mh-folder-mode and
-	gnus-summary-mode.
-	(mc-sign-message): Fix parenthesization error in let.
-
-Mon May  8 22:27:20 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
-
-	* mailcrypt.el (mc-encrypt-region): New interactive function.
-        Encrypts the current region by calling the appropriate function as
-        determined by mc-modes-alist.
-	(mc-encrypt-generic): New function; bottom level of
-	scheme-independent encryption routines.
-	(mc-encrypt-message): Rewritten to call mc-encrypt-generic.
-	(mc-encrypt): Rewritten to just call mc-encrypt-region.
-	Upshot of all this is to allow encryption in arbitrary buffers,
-	not just message buffers.
-	(mc-sign-region): New interactive function.
-	(mc-sign-generic): New function; bottom level of
-	scheme-independent signing routines.
-	(mc-sign-message): Rewritten to call mc-sign-generic.
-	(mc-sign): Rewritten to just call mc-sign-region.
-	Upshot of all this is to allow signing in arbitrary buffers, not
-	just message buffers.
-
-Mon May  8 16:02:45 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
-
-	* mailcrypt.el (mc-always-replace): Add 'never option.
-	(mc-message): Remove "is-err" argument.
-	Only deactivate passphrase on "Bad passphrase" error.
+	* ANNOUNCE, ChangeLog, INSTALL, LCD-entry, Makefile.in, NEWS,
+	ONEWS, README, configure, configure.in, expect.el, install-sh,
+	load-path.hack, mailcrypt.el, mailcrypt.info, mc-pgp.el,
+	mc-pgp2.el, mc-pgp5.el, mc-remail.el, mc-setversion.el,
+	mc-toplev.el: New file.
+System Requirements
+===================
+
+Mailcrypt is designed for use with FSF Emacs 19.29 (and higher) or
+XEmacs 19.13 (and higher).  Mailcrypt absolutely requires at least FSF
+Emacs 19.28 or XEmacs 19.12.  With some effort, earlier versions might
+be made to work, but this is not supported.
+
+Mailcrypt is also designed for use with PGP version 2.6 or higher,
+with the exception of 2.6ui (which is really just 2.3a in disguise).
+It is trivial to make Mailcrypt work with earlier versions, however;
+see below.
+
+Basic Installation
+==================
+
+The simplest way to build and install Mailcrypt is:
+
+  1. `cd' to the Mailcrypt source directory and type `./configure' to
+     configure Mailcrypt for your system.
+
+  2. Look at the program names in mc-pgp.el and mc-pgp5.el to make
+     sure that they are correct.  On my system, for example, I call
+     PGP 2.6.3 as "pgp2".  If you call PGP 2.6.x as "pgp", then you
+     are probably OK.
+
+  3. Type `make' to build the byte-compiled Lisp files.
+
+  4. Type `make install' to install the Mailcrypt Lisp files and Info
+     manual.
+
+Load Path
+=========
+
+If you use VM, RMAIL, MH-E, or GNUS and the respective package is not
+in your default load-path, Mailcrypt may fail to byte compile
+correctly.  (Emacs does not load your `.emacs' file when run in batch
+mode.)  If this applies to you, edit Mailcrypt's `load-path.hack' file
+to add the appropriate directory to the load-path during byte
+compilation.
+
+In addition, PGP 5.0 support requires the file timer.el, which should
+be included in FSF Emacs, but is NOT included with Xemacs.  This file
+is included with Mailcrypt, and will be installed if the timer library
+isn't found in the load path.  If you already have timer.el, but it is
+in an unusual place, edit the file `load-path.hack' file accordingly.
+
+Installation Names
+==================
+
+By default, `make install' will install the package's files in
+`/usr/local/info' and `/usr/local/share/emacs/site-lisp'.  You can
+specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PATH'.
+
+If your installed copy of Emacs is named something other than `emacs'
+or `xemacs', you will need to tell `make' where to find it so that it
+can correctly byte-compile the Mailcrypt sources.
+
+For example, to force the use of XEmacs you might do this:
+
+	./configure
+	make EMACS=xemacs
+	make install
+
+or this (for users of the Bourne shell and derivatives):
+
+	EMACS=xemacs ./configure
+	make
+	make install
+
+or this (for users of *ugh* the C shell and derivatives):
+
+	setenv EMACS xemacs
+	./configure
+	make
+	make install
+
+Also, the `--prefix=PATH' option to `configure' may not be general
+enough to set the paths you want.  If not, you can pass variables to
+the `make' command to control the installation.  For a complete list
+of tweakable variables, look in the makefile.
+
+For example, to put the Lisp files in `$HOME/elisp' and the Info file
+in `$HOME/info', you would type:
+
+	./configure
+	make
+	make lispdir=$HOME/elisp infodir=$HOME/info install
+
+If you want to supply special flags to emacs for compiling the
+elisp files, you would type:
+
+	./configure
+	make EMACSFLAGS="-q -no-site-file"
+	make install
+
+FSF Emacs 19.28
+===============
+
+Mailcrypt's installation procedure assumes the directory structure
+used by FSF Emacs 19.29 (e.g., `/usr/local/share/emacs/site-lisp').
+If you are using 19.28, you will need to use an installation command
+like the following:
+
+	make datadir=/usr/local/lib install
+
+This is the *only* special action required to install Mailcrypt for
+FSF Emacs 19.28.
+
+FSF Emacs 20.3 or higher
+========================
+
+To use Mailcrypt with rmail, put the following in your .emacs:
+
+     (add-hook 'rmail-show-message-hook 'mc-install-read-mode)
+
+Don't use the following, which worked for older emacsen:
+
+     (add-hook 'rmail-mode-hook 'mc-install-read-mode)
+
+
+XEmacs 19.12
+============
+
+Mailcrypt requires the `easymenu' package, which is bundled with FSF
+Emacs 19.28 (and higher) and with XEmacs 19.13 (and higher).  If you
+are using XEmacs 19.12, you will need to obtain a copy of this package
+and install it somewhere in your load-path.  The easiest way is to go
+to
+
+	ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/
+
+and obtain the latest version of `auc-menu.el'.  Install it in your
+load path under the name `easymenu.el'.  (Don't ask why.)
+
+Obsolete PGP versions
+=====================
+
+Versions of PGP prior to 2.6 (including version 2.6ui, which is just a
+hacked 2.3a) do not support the "+comment" option, which Mailcrypt
+uses for gratuitous advertising.  To use Mailcrypt with such a version
+(or just to suppress the message), add the following line to your
+`.emacs' file:
+
+	(setq mc-pgp-comment nil)
+
+PGP 5.0 Support
+===============
+
+Starting with Mailcrypt 3.5b1, Mailcrypt can support both older (2.6.*)
+and newer (5.0) versions of PGP.  Support for PGP 5.0 is limited, and
+excludes key snarfing, among other things.  All of the same keymaps and
+functions are used as in Mailcrypt 3.4; nothing should have changed
+for the end user.  (Note: *please* send me suggestions and patches
+to <mailto:lbudney@pobox.com> if you have improvements or fixes you
+would make!)
+
+To use Mailcrypt 3.5b1 and higher, you must include two lines like the
+following in your .emacs file:
+
+	(load-library "mailcrypt")
+	(mc-setversion "5.0") ;; Alternately, "2.6" or "gpg"
+
+The function mc-setversion is interactive, and can be used at any time
+to toggle between PGP versions.  A nice future enhancement would be to
+add this option to the PGP menu.
+
+GPG (Gnu Privacy Guard) Support
+===============================
+
+Starting with Mailcrypt 3.5b7, there is alpha support for gnupg. Almost
+everything available to pgp2 is available, with the notable exception
+of automatic key fetching. There are some bugs and limitations in the
+current gpg support. See README.gpg for details.
+
+To use GPG by default, add this to your .emacs file:
+
+	(load-library "mailcrypt")
+	(mc-setversion "gpg")
+
+Most mailcrypt commands will let you set the encryption scheme on the
+fly: use a double prefix argument. For example, to sign a message,
+use C-u C-u C-c / s, and you will be asked for a scheme and a user id.
+
+The GPG home page is at
+<http://www.d.shuttle.de/isil/crypt/gnupg.html>. The source is available
+at <ftp://ftp.guug.de/pub/gcrypt/>.
+
+Suggestions/Bug Reports
+=======================
+
+Send all suggestions for fixes, etc to <mailto:lbudney@pobox.com>.
+mailcrypt|Len Budney and Jin Choi and Pat LoPresti|lbudney@pobox.com, jin@atype.com, patl@lcs.mit.edu|PGP 5.0 and 2.6.* interface (plus anonymous remailer support) for RMAIL, VM, mh-e, GNUS|31-Jan-98|3.5.3|~/interfaces/mailcrypt-3.5.3.tar.gz
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 1.07
-AUTHOR_VERSION = 3.4
+VERSION = 2.0
+AUTHOR_VERSION = 3.5.3
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = mailcrypt
 PKG_TYPE = regular
-REQUIRES = gnus vm mail-lib xemacs-base
+REQUIRES = mail-lib fsf-compat xemacs-base
 CATEGORY = comm
 
-ELCS = mailcrypt.elc mc-pgp.elc mc-remail.elc mc-toplev.elc
+ELCS = expect.elc mailcrypt.elc mc-gpg.elc mc-pgp.elc mc-pgp5.elc \
+	mc-remail.elc mc-setversion.elc mc-toplev.elc
+
+EXTRA_SOURCES = ANNOUNCE INSTALL LCD-entry NEWS ONEWS README README.gpg
 
 INFO_FILES = $(PACKAGE).info*
 MANUAL = $(PACKAGE)
+## This is a -*- makefile -*-
+
+# What the Emacs 19 binary is called on your system
+EMACS = @EMACS@
+EMACSFLAGS = @EMACSFLAGS@
+
+# Prefix for constructing installation directory paths
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+# Shared directory for read-only data files
+datadir = $(prefix)/share
+
+# Where to put the .el and .elc files
+lispdir=$(datadir)/emacs/site-lisp
+
+# Where to put the Info files
+infodir=$(prefix)/info
+INFOFILES  = mailcrypt.info mailcrypt.info-1 mailcrypt.info-2
+
+# Where to put the helper scripts
+bindir=$(prefix)/bin
+
+# Installation command
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_INFO = @INSTALL_INFO@
+
+# Various auxiliary programs
+MAKEINFO=makeinfo
+DVIPS=dvips
+TEXI2DVI=texi2dvi
+TEXI2HTML=texi2html
+TAR=tar
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SOURCES = @EXTRA_SRCS@ \
+	mailcrypt.el mc-toplev.el mc-pgp.el mc-remail.el \
+	mc-pgp5.el mc-gpg.el expect.el mc-setversion.el
+
+OBJECTS = @EXTRA_OBJS@ \
+	mailcrypt.elc mc-toplev.elc mc-pgp.elc mc-remail.elc \
+	mc-pgp5.elc mc-gpg.elc expect.elc mc-setversion.elc
+
+DISTFILES = $(SOURCES) ANNOUNCE ChangeLog INSTALL LCD-entry Makefile.in \
+	NEWS ONEWS README configure configure.in install-sh load-path.hack \
+	mailcrypt.texi mkinstalldirs texi2html.ext FSF-timer.el \
+	$(INFOFILES) mailcrypt.dvi README.gpg
+
+SHELL = /bin/sh
+#.PHONY: all clean dist distclean dvi html info install \
+#	installdirs ps uninstall
+.SUFFIXES:
+.SUFFIXES: .elc .el
+
+.el.elc:
+	$(EMACS) -batch $(EMACSFLAGS) -l $(srcdir)/load-path.hack \
+	  -f batch-byte-compile $<
+
+all: $(OBJECTS)
+
+install: all installdirs install-info $(bindir)
+	for f in $(SOURCES); do \
+	  $(INSTALL_DATA) $(srcdir)/$$f $(lispdir); \
+	done;
+	for f in $(OBJECTS); do \
+	  $(INSTALL_DATA) $$f $(lispdir); \
+	done;
+
+# Make sure all installation directories actually exist
+# by making them if necessary.
+installdirs: mkinstalldirs
+	$(srcdir)/mkinstalldirs $(lispdir) $(infodir) $(bindir)
+
+install-info: info
+	# There may be a newer info file in . than in srcdir.
+	-if test -f mailcrypt.info; then d=.; \
+	 else d=$(srcdir); fi; \
+	for file in $(INFOFILES); do\
+	  $(INSTALL_DATA) $$d/$$file $(infodir)/$$file; \
+	done;
+	$(INSTALL_INFO) --info-dir=$(infodir) \
+	--entry="* Mailcrypt: (mailcrypt).       An Emacs/PGP interface" \
+	mailcrypt.info 
+
+uninstall:
+	-cd $(lispdir) && rm -f $(SOURCES) $(OBJECTS)
+	-cd $(infodir) && rm -f $(INFOFILES)
+	$(INSTALL_INFO) --remove --info-dir=$(infodir) mailcrypt.info
+
+info: $(INFOFILES)
+
+$(INFOFILES): mailcrypt.texi
+	$(MAKEINFO) $(srcdir)/mailcrypt.texi
+
+timer.el: FSF-timer.el
+	cp FSF-timer.el timer.el
+
+dvi: mailcrypt.dvi
+
+mailcrypt.dvi: mailcrypt.texi
+	$(TEXI2DVI) $(srcdir)/mailcrypt.texi
+
+ps: mailcrypt.ps
+
+mailcrypt.ps: mailcrypt.dvi
+	$(DVIPS) $(srcdir)/mailcrypt.dvi
+
+html: mailcrypt_toc.html
+
+mailcrypt_toc.html: mailcrypt.texi
+	$(TEXI2HTML) -split_chapter $(srcdir)/mailcrypt.texi
+
+TAGS: $(SOURCES)
+	cd $(srcdir) && etags $(SOURCES)
+
+clean:
+	rm -f $(OBJECTS)
+	-rm -f *.aux *.cp *.cps *.fn *.ky *.log *.pg *.toc *.tp *.vr
+	-rm -f *.html
+	rm -f TAGS
+
+distclean: clean
+	-rm -f *~ *.tar.gz
+	-rm -f Makefile config.status config.cache config.log timer.el
+
+${srcdir}/configure: configure.in
+	cd ${srcdir} && autoconf
+
+Makefile: Makefile.in config.status
+	./config.status
+
+config.status: ${srcdir}/configure
+	./config.status --recheck
+
+dist: $(DISTFILES)
+	version=`perl -ne 'print $$1 if /defconst mc-version \"(.*)\"/' \
+		 mailcrypt.el`; \
+	distname=mailcrypt-$$version; \
+	rm -rf $$distname; \
+	mkdir $$distname; \
+	for file in $(DISTFILES); do \
+	  ln $$file $$distname/$$file; \
+	done; \
+	$(TAR) -chz -f $$distname.tar.gz $$distname; \
+	rm -rf $$distname
-Noteworthy changes in Mailcrypt version 3.4:
+Noteworthy changes in Mailcrypt version 3.5.3:
 
-Several bug fixes, mostly in the remailer functions.
+ * Added support for the Horowitz Key Protocol. PGP5 key fetching is
+   feature-complete.
 
-`C-c / d' can now decode armor-only messages.
+ * Fixed a minor compatibility bug between GPG 0.9.3 and Mailcrypt.
 
-`C-c / e' with an empty recipient list now generates an armor-only
-message.
+Noteworthy changes in Mailcrypt version 3.5.2:
 
-Better support for Gnus 5 (formerly "(ding) Gnus"), including
-decryption of messages in read-only groups.  Requires Gnus 5.0.4 or
-higher.
+ * Added key fetching for PGP 5.0. Uses finger or HTTP, but not hkp yet.
 
-Better support for recent versions (5.95+) of VM.
+ * Fixed a bug which dumped GNUS users into the wrong buffer after
+   verifying a signature.
 
-New option for remailer list entries: Positive integer N represents a
-random permutation of the N "best" remailers as ordered in
-`~/.remailers'.
+ * Fixed a compatibility bug between XEmacs and FSF Emacs in
+   mc-setversion.
 
-New configuration variable `mc-pgp-always-fetch' to control attempts
-to fetch PGP keys.  Legal values are t, 'never, and nil (the default).
+ * Fixed a bug in mh-e support so that users can view decrypted
+   messages without saving them.
+
+ * Several minor bugfixes.
 
 
-Noteworthy changes in Mailcrypt version 3.3:
 
-Numerous minor bugs have been fixed.
+Noteworthy changes in Mailcrypt version 3.5b4:
 
-Mailcrypt now requires at least FSF Emacs version 19.28 or XEmacs
-version 19.12.  Sorry, but anything else is too annoying.
+ * Fixed a bug which broke encryption to multiple recipients (PGP 5).
 
-Support has been added for reading mail under (ding) Gnus.
+ * Fixed a bug which broke encryption of 8-bit data and files (PGP 5).
+
+ * Fixed the missing "timer.el" problem.  Now Mailcrypt should run
+   properly for Xemacs users.
+
+ * Eliminated some silly shell and perl scripts.
+
+ * Updated the README to reduce installation difficulties (I hope).
 
 
-Noteworthy changes in Mailcrypt version 3.2:
 
-Mailcrypt now uses "start-process" instead of "call-process-region" to
-run PGP; this uses a pipe instead of a temp file for various inputs,
-including your passphrase.  Ahem.
+Noteworthy changes in Mailcrypt version 3.5b1:
 
-All Mailcrypt commands now start with the prefix `C-c /' to bring
-Mailcrypt into line with documented GNU standards.
+ * No bug fixes; in fact there are probably fresh new bugs.
 
-`mc-insert-public-key' is now bound to `C-c / x' (an in "extract")
-instead of `C-c a'.
-
-`mc-deactivate-passwd' is bound to `C-c / f' (as in "forget").
-
-`mc-read-mode' and `mc-write-mode' are now full-blown minor modes.  So
-you can do, for example, `M-x mc-install-write-mode' from a Text mode
-buffer and have the normal encryption and signing commands available.
-The keymaps for the modes are configurable variables.
-
-Interactive commands `mc-encrypt-region', `mc-sign-region', etc. are
-now defined.
-
-If you use RMAIL and you say no to "Replace encrypted message with
-decrypted?", you will be dropped into RMAIL mode for viewing.
-
-RMAIL summary mode is now supported.
-
-Documentation in the form of a Texinfo file is now part of the
-distribution.
-
-Mailcrypt can now fetch a needed key from finger, HTTP, or any of a
-list of locally stored keyrings.  `C-c / k' initiates a fetch
-manually; Mailcrypt will offer to initiate one automatically as
-appropriate during encryption or signature verification.
-
-The remailer functions now support Mixmaster.
-
-`C-c / d' can handle conventionally encrypted messages.
+ * Mailcrypt now supports PGP version 5.0 as well as version 2.6.*, and
+   can be toggled between "active versions" at will.  Every effort has
+   been made to ensure that what used to work, still works.
 ;;{{{ Change Log
+;;{{{ Noteworthy changes in Mailcrypt version 3.5b1:
+;; * No bug fixes; in fact there are probably fresh new bugs.
+;; * Mailcrypt now supports PGP version 5.0 as well as version 2.6.*, and
+;;   can be toggled between "active versions" at will.  Every effort has
+;;   been made to ensure that what used to work, still works.
+;;}}}
+;;{{{ Noteworthy changes in Mailcrypt version 3.4:
+;; * Several bug fixes, mostly in the remailer functions.
+;; * `C-c / d' can now decode armor-only messages.
+;; * `C-c / e' with an empty recipient list now generates an armor-only
+;;   message.
+;; * Better support for Gnus 5 (formerly "(ding) Gnus"), including
+;;   decryption of messages in read-only groups.  Requires Gnus 5.0.4 or
+;;   higher.
+;; * Better support for recent versions (5.95+) of VM.
+;; * New option for remailer list entries: Positive integer N represents a
+;;   random permutation of the N "best" remailers as ordered in
+;;   `~/.remailers'.
+;; * New configuration variable `mc-pgp-always-fetch' to control attempts
+;;   to fetch PGP keys.  Legal values are t, 'never, and nil (the default).
+;;}}}
+;;{{{ Noteworthy changes in Mailcrypt version 3.3:
+;; * Numerous minor bugs have been fixed.
+;; * Mailcrypt now requires at least FSF Emacs version 19.28 or XEmacs
+;;   version 19.12.  Sorry, but anything else is too annoying.
+;; * Support has been added for reading mail under (ding) Gnus.
+;;}}}
+;;{{{ Noteworthy changes in Mailcrypt version 3.2:
+;; * Mailcrypt now uses "start-process" instead of "call-process-region" to
+;;   run PGP; this uses a pipe instead of a temp file for various inputs,
+;;   including your passphrase.  Ahem.
+;; * All Mailcrypt commands now start with the prefix `C-c /' to bring
+;;   Mailcrypt into line with documented GNU standards.
+;; * `mc-insert-public-key' is now bound to `C-c / x' (an in "extract")
+;;   instead of `C-c a'.
+;; * `mc-deactivate-passwd' is bound to `C-c / f' (as in "forget").
+;; * `mc-read-mode' and `mc-write-mode' are now full-blown minor modes.  So
+;;   you can do, for example, `M-x mc-install-write-mode' from a Text mode
+;;   buffer and have the normal encryption and signing commands available.
+;;   The keymaps for the modes are configurable variables.
+;; * Interactive commands `mc-encrypt-region', `mc-sign-region', etc. are
+;;   now defined.
+;; * If you use RMAIL and you say no to "Replace encrypted message with
+;;   decrypted?", you will be dropped into RMAIL mode for viewing.
+;; * RMAIL summary mode is now supported.
+;; * Documentation in the form of a Texinfo file is now part of the
+;;   distribution.
+;; * Mailcrypt can now fetch a needed key from finger, HTTP, or any of a
+;;   list of locally stored keyrings.  `C-c / k' initiates a fetch
+;;   manually; Mailcrypt will offer to initiate one automatically as
+;;   appropriate during encryption or signature verification.
+;; * The remailer functions now support Mixmaster.
+;; * `C-c / d' can handle conventionally encrypted messages.
+;;}}}
 ;;{{{ Changes from 3.0:
 ;; * Generate a warning if some public keys are found while others
 ;;   are not during encryption.
 Mailcrypt is an Emacs lisp package which provides a simple interface
 to cryptographic functions with PGP.  It was written by Patrick
-LoPresti (patl@lcs.mit.edu) and Jin Choi (jin@atype.com).
+LoPresti (patl@lcs.mit.edu) and Jin Choi (jin@atype.com) and updated
+with some support for PGP 5.0 by Len Budney (lbudney@pobox.com).
 
-The latest version of Mailcrypt is always (?) available through the
-Mailcrypt home page at `http://cag-www.lcs.mit.edu/mailcrypt/'.  An
-FTP mirror is at `ftp://cag.lcs.mit.edu/pub/patl/'.
+The original Mailcrypt is available through the Mailcrypt home page
+at `http://cag-www.lcs.mit.edu/mailcrypt/'.  An FTP mirror is at
+`ftp://cag.lcs.mit.edu/pub/patl/'.  The latest Mailcrypt may be found at
+`http://www.pobox.com/~lbudney/linux/software/mailcrypt.html' or at any
+sunsite mirror.
 
 To install the Mailcrypt package on your system, follow the directions
 in the file `INSTALL'.
 type `C-h i' and poke around.  You can read the Info version of the
 Mailcrypt manual by doing `C-u C-h i' on the file `mailcrypt.info'.
 
-Or read the HTML version of the manual which is directly accessible
-from the Mailcrypt home page.
-
 To automatically be informed of improvements to Mailcrypt, add
 yourself to the (very low volume) Mailcrypt announcement list.  Send
 Email to mc-announce-request@cag.lcs.mit.edu with a request to be
 
  - Patrick LoPresti (patl@lcs.mit.edu) and Jin Choi (jin@atype.com)
    Thu Jun 22 19:58:35 1995
+
+ - Len Budney (lbudney@pobox.com)
+   Sat Jan 31 20:05:30 1998
+MailCrypt for the Gnu Privacy Guard (GPG)
+ -Brian Warner <warner@lothar.com>
+
+The GPG support in mailcrypt is at an alpha level and is at least ready for
+adventurous users to try out. There are a number of known problems, listed
+below. Please send any and all comments, bug reports, patches, enhancements,
+etc, to me at <warner@lothar.com>.
+
+First off, what is GPG? GnuPG (formerly known as "g10") is a GPL'ed
+replacement for PGP that implements the OpenPGP standard that is slowly making
+its way through the IETF OpenPGP working group (it may well be a Proposed
+Standard by now.. check your local RFC mirror). It does not implement any
+algorithms that cannot be provided under the GPL; that means no RSA
+(patented/licensed) or IDEA, so in general it does not interoperate with pgp
+2.6 . However it should work with pgp 5.0, pgp 6.0 (theoretically), and of
+course itself, and it has a shared-object-loading plugin mechanism whereby new
+algorithms can be loaded, so of all the pgpgpgish programs out there it has
+the best chance of being compatible. GPG is being developed entirely outside
+the USA because of that silly ITAR nonsense.
+
+The GPG home page is at <http://www.d.shuttle.de/isil/gnupg/>. The
+mailcrypt support for it (contained mostly in mc-gpg.el) is tested against
+GPG version 0.4.3, so you should use that version or a later one.
+
+KNOWN PROBLEMS:
+
+ key fetching:
+  There is no key fetching. I don't know of any GPG keyservers yet. When some
+  become available, I'll add support for them. If you try to verify the
+  signature on a message when you don't have the signator's key, the code will
+  offer to fetch the key for you. If you answer "yes, please fetch that key",
+  you'll just get an error message.
+
+ the --throw-keyid encryption option is not yet supported (a.k.a. "stealth
+ mode", where the recipients' keyids are not included in the message, and the
+ potential receiver must simply try all of their secret keys to see if any of
+ them works).
+
+ multiple recipients:
+  not a problem with gpg 0.4.3 or later. In --batch mode, older versions did
+  not properly decrypt messages that were encrypted to multiple recipients,
+  including messages encrypted with the "mc-encrypt-for-me" option. If you
+  can't use a newer version of gpg for decryption, you need to have your
+  correspondents to send you messages that are only encrypted to you.
+
+ wrapper script
+  not a problem with gpg 0.4.1 or later. Older versions don't handle the
+  "--passphrase-fd 0" option correctly, and need a wrapper script called
+  "gpgwrap.pl". If you can't run a newer version of gpg, get the wrapper
+  script from mailcrypt-3.5b7.
+
+SMALLER PROBLEMS:
+
+ trust:
+  You want to be confident that the keys you encrypt messages to are actually
+  owned by the person named in the key, and not just some random goofball who
+  likes to create and distribute keys with other people's names on them. Think
+  about how you obtained someone's key: did they give it to you in person?
+  Then it's probably the right one. Did they mail it to you? Did you get it
+  by fingering their account? Chances are good that it's valid. Did it come
+  from a keyserver? Anyone could have put it there. Suppose it's signed by
+  someone that you trust to check the key's validity. Should you trust it
+  then?
+
+  This is the PGP (and GPG) "web of trust", and for more details you should
+  check the pgp 2.6 documentation. Here's what mailcrypt-gpg does with trust:
+
+   encryption: pass --always-trust in, forcing all keys to be trusted even
+               if you don't have a trust path. This is necessary because
+               without it, untrusted keys are just dropped, and your message
+               won't be readable by all the folks you addressed it to.
+   decryption: report the trust value in the echo area when checking a 
+               signature. TRUST_ULTIMATE means the message is signed by one of
+               your own keys. TRUST_FULLY and TRUST_MARGINAL are for keys that
+               you trust via some path that starts with a key that you have
+               signed with one of your private keys. For each public key in
+               your keyring, you can specify (with --edit-key) how much you
+               trust that key to sign other keys. The sum of these trust
+               values along the path from your private key to the signator's
+               key determines the amount of "owner trust" you have in that key
+               and determines the TRUST_ value displayed when checking a
+               signature. TRUST_UNDEFINED means that you do not have a trust
+               path to that key.
+   verify:     same as decryption
+
+  Ideally, if you try to encrypt to an untrusted key, mailcrypt should give
+  you a warning. A future version may do this.
+
+
+ key names are passed through the shell enclosed in ""s. If the names have any
+ quotes in them or seriously weird characters ("!" comes to mind) then the
+ shell may have problems. I think the GPG key-generation process may restrict
+ the key names to something reasonable, but other programs (pgp5.0?) might
+ not.
+
+ there is some debugging code left around. Some temporary buffers may get
+ created but not deleted (names generally start with " *mailcrypt"). Some
+ temporary files (/tmp/mailcrypt-gpg-*) may get left around.
+
+ mc-gpg.el depends upon /bin/sh to run GPG while redirecting several file
+ descriptors to temp files (to collect three different output streams). If you
+ don't have /bin/sh, it probably won't work.
+
+ I probably don't have enough (save-excursion ) and (unwind-protect ) clauses.
+ If you run into an error halfway through an operation, or if you hit C-g and
+ abort an operation, you might not be put back in the buffer you started with.
+ Just find your original buffer and hit "undo" if necessary. All mailcrypt
+ operations can be undone with "undo".
+
+ I've tested a number of cases, but I haven't been able to create test
+ messages for some of them, like signed messages that have been tampered with.
+ (clearsigned messages with tampering are caught, but I don't know how to
+ modify an unclear signed message to invalidate the signature without also
+ damaging the CRC added by the ascii armor). If you know how to create such a
+ message, please send it to me so I can test those cases too. The same goes
+ for the (probably much more difficult) case of encrypted+signed messages that
+ decrypt OK but have bad signatures.
+
+REALLY TINY PROBLEMS:
+
+ mc-gpg-comment works fine, I just disabled it to let GPG insert it's own
+ advertisement.
+
+ mc-gpg-alternate-keyring might work. It should probably be split up so you
+ can add public and private rings separately.
+
+ mailcrypt is designed to handle multiple encryption schemes. Decryption is
+ supposed to work by trying each one in order, stopping after one of them
+ succeeds. mc-gpg.el will have two problems with this. One is that my code
+ will probably error out upon failure instead of returning a failure and
+ allowing the top-level scheme loop to try another scheme. The second is that
+ pgp2.6, pgp5.0, and gpg all use the same packet format, so it isn't generally
+ obvious what scheme should be used (unless you look for a version or comment
+ header in the armored message). This is complicated by the fact that they can
+ use each other's keys, to a certain extent. I don't have a good answer for
+ this yet. One is to keep all your keyrings separate. One is to figure out how
+ to use GPG for everything and merge all your keyrings into your GPG
+ keyring. If you manage that one, let me know about it.
+
+WILD ENHANCEMENT IDEAS:
+
+ it would be cool to incorporate some trust status reporting into this code.
+ you give it a keyid and it shows you the best trust path to that key.
+
+ key management from within emacs: sign keys, edit trust.
+
+ set algorithm preferences or extra options (--rfc1991) by recipient ID. this
+ might help pgp compatibility
+
+ tab-completion on keyids, using --list-keys or --list-secret-keys.
+
+ rfc2015 operation (MIME multipart/encrypted). see SEMI for the pgp version.
+
+ create a detached signature from the current buffer
+
+
+
+Share and Enjoy,
+ -Brian Warner
+ <warner@lothar.com>
+
+;;; expect.el --- support for external process communication
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <[22]lmi@gnus.org>
+;; Keywords: extensions, processes
+
+;; This file is soon to be part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'cl)
+(require 'timer)
+
+(defvar expect-message nil
+  "*If non-nil, report how much data has arrived in the process buffer.
+This variable is buffer-local to all Expect buffers, and should be set
+inside @code{with-expect} forms.")
+
+(defvar expect-start nil
+  "If a number, start the Expect searches from that point.
+If not, start searches from `(point-min)'.
+This variable is typically `let' to t before calling `with-expect'
+when waiting for output from a process that is already started and may
+have output data.")
+
+(defvar expect-timeout 10
+  "The number of seconds to wait before an Expect timeout element is triggered.
+")
+
+;;; Internal variables.
+
+(defvar expect-processes nil)
+(defvar expect-asynchronous nil)
+(defvar expect-process nil)             ; Dynamic variable
+(defvar expect-current-info nil)        ; Dynamic variable
+
+;;; Utility macros.
+
+(defun expect-make-info (process message point)
+  (list process message point nil nil))
+
+(defmacro expect-info-process (info)
+  `(nth 0 ,info))
+
+(defmacro expect-info-message (info)
+  `(nth 1 ,info))
+
+(defmacro expect-info-point (info)
+  `(nth 2 ,info))
+(defmacro expect-info-set-point (info point)
+  `(setcar (nthcdr 2 ,info) ,point))
+
+(defmacro expect-info-sentinels (info)
+  `(nth 3 ,info))
+(defmacro expect-info-set-sentinels (info sentinels)
+  `(setcar (nthcdr 3 ,info) ,sentinels))
+
+(defmacro expect-info-timer (info)
+  `(nth 4 ,info))
+(defmacro expect-info-set-timer (info timer)
+  `(setcar (nthcdr 4 ,info) ,timer))
+
+(defmacro expect-info-queries (info)
+  `(nthcdr 5 ,info))
+(defmacro expect-info-set-queries (info queries)
+  `(setcdr (nthcdr 4 ,info) ,queries))
+
+(defmacro expect-find-info (process)
+  `(assoc ,process expect-processes))
+
+;;; Interface macros.
+
+;;;###autoload
+(defmacro with-expect (program &rest forms)
+  "Set things up for communication with PROGRAM.
+FORMS will be evaluated in the normal manner.  To talk to the process,
+use `expect' and `expect-send'.  See the manual for full documentation.
+This macro returns nil.
+
+If PROGRAM is a string, start that program.  If PROGRAM is a list, use
+the first element of that list as the program and the remainder as the
+parameters.  If PROGRAM is a process, talk to that process.
+
+PROGRAM will be started up in a new, fresh temporary buffer.  The
+buffer will be killed upon completion.  If PROGRAM is a process,
+a new buffer won't be created, and the buffer won't be killed upon
+completion."
+  (let ((buf (make-symbol "buf"))
+        (point (make-symbol "point")))
+    `(save-excursion
+       (let ((,buf (generate-new-buffer " *expect*"))
+             (,point (point))
+             expect-process expect-current-info)
+         (set-buffer ,buf)
+         (unless (setq expect-process
+                       (expect-start-process ,program))
+           (error "Can't start program"))
+         (expect-setup ,point)
+         ,@forms
+         (unless (expect-info-sentinels expect-current-info)
+           (expect t))
+         nil))))
+
+(defun expect-start-process (program)
+  (cond
+   ((stringp program)
+    (start-process "expect" (current-buffer) program))
+   ((consp program)
+    (apply 'start-process
+           "expect" (current-buffer) (car program) (cdr program)))
+   ((processp program)
+    program)
+   (t
+    (error "Illegal process spec"))))
+
+(defmacro with-expect-asynchronous (program &rest forms)
+  "Set things up for asynchronous communication with PROGRAM.
+This macro behaves like `with-expect', only that `expect' calls
+contained in FORMS will be evaluated asyncronously.
+
+See the documentation of the `with-expect' macro for documentation."
+  `(let ((expect-asynchronous t))
+     (with-expect ,program ,@forms)))
+
+(defmacro expect (regexp &rest forms)
+  "Execute FORMS when REGEXP  has arrived in the buffer."
+  `(expect-1 ,regexp #'(lambda () ,@forms)))
+
+(defmacro expect-cond (&rest clauses)
+  "Try each clause until one succeeds.
+Each clause looks like (CONDITION BODY).  CONDITION should be
+a regular expression to wait for, or a process status symbol.
+If CONDITION is satisfied (i. e., the data has arrived or
+the process has entered the specified status), BODY will be executed."
+  (let (result)
+    (while clauses
+      (push (if (stringp (caar clauses)) (caar clauses)
+              (list 'quote (caar clauses)))
+            result)
+      (push (car `(#'(lambda () ,@(cdar clauses)))) result)
+      (pop clauses))
+    `(expect-1 ,@(nreverse result))))
+
+(defmacro expect-exit (&rest forms)
+  "Execute FORMS when the process has exited."
+  `(expect-exit-1 #'(lambda () ,@forms)))
+
+;;; User utility functions.
+
+(defmacro expect-send (string)
+  "Send STRING to the current buffer's process."
+  `(process-send-string expect-process ,string))
+
+;;; Internal functions.
+
+(defun expect-setup (&optional point)
+  "Initialize Expect data, filter and sentinel."
+  (setq expect-current-info
+        (expect-make-info expect-process expect-message
+                          (or point expect-start (point-min))))
+  (push expect-current-info expect-processes)
+  (set-process-filter expect-process 'expect-filter)
+  (set-process-sentinel expect-process 'expect-sentinel)
+  (set-buffer (process-buffer expect-process)))
+
+(defun expect-shutdown (process)
+  "Remove Expect infestation of PROCESS."
+  (setq expect-processes (delq (expect-find-info process) expect-processes))
+  (set-process-filter process nil)
+  (set-process-sentinel process nil))
+
+(defun expect-kill (process)
+  "Kill PROCESS and its buffer."
+  (let ((buffer (process-buffer process)))
+    (when (buffer-name buffer)
+      (kill-buffer buffer))
+    (expect-shutdown process)
+    (delete-process process)))
+
+(defun expect-wait ()
+  "Wait until the current outstanding command has been performed."
+  (let ((info (expect-find-info expect-process)))
+    (expect-setup-timer info)
+    (while (and (car (expect-info-queries (expect-find-info expect-process)))
+                (memq (process-status expect-process) '(open run)))
+      (accept-process-output expect-process 1))
+    (expect-cancel-timer info))
+  ;; We return nil.
+  nil)
+
+(defun expect-1 (&rest clauses)
+  (let (entry entries timeout)
+    (unless expect-process
+      (error "No expect in this buffer"))
+    ;; Add this clause to the list of things to be executed.
+    (while clauses
+      (if (eq (car clauses) 'timeout)
+          (setq timeout (cadr clauses)
+                clauses (cddr clauses))
+        (push (list (pop clauses) (pop clauses))
+              entries)))
+    (when timeout
+      (expect-info-set-timer expect-current-info
+                             (list nil expect-timeout timeout)))
+    (nconc expect-current-info (list (nreverse entries)))
+    ;; We see whether we have to wait for the command to complete
+    ;; or not.
+    (if expect-asynchronous
+        nil
+      (expect-wait))))
+
+(defun expect-exit-1 (function)
+  (unless expect-process
+    (error "No expect in this buffer"))
+  (let ((info (expect-find-info expect-process)))
+    (expect-info-set-sentinels
+     info
+     (nconc (expect-info-sentinels info)
+            (list function))))
+  ;; We return nil.
+  nil)
+
+(defun expect-filter (process string)
+  "Controlling Expect function run as a process filter."
+  (let ((old-buffer (current-buffer))
+        (expect-process process))
+    (unwind-protect
+        (let (moving)
+          (set-buffer (process-buffer process))
+          (setq moving (= (point) (process-mark process)))
+          (save-excursion
+            ;; Insert the text, moving the process-marker.
+            (goto-char (process-mark process))
+            (insert string)
+            (set-marker (process-mark process) (point))
+            ;; Do Expect things.
+            (expect-find-event process))
+          (when (memq (process-status process) '(open run))
+            (if moving (goto-char (process-mark process)))))
+      (when (buffer-name old-buffer)
+        (set-buffer old-buffer)))))
+
+(defun expect-sentinel (process status)
+  "Controlling Expect sentinel."
+  ;; Perhaps we're waiting for one of the process events?
+  (when (memq (process-status process) '(open run))
+    (expect-find-event process))
+  ;; We do `expect-exit' calls.
+  (when (eq 'exit (process-status process))
+    (save-excursion
+      (let ((expect-process process))
+        (when (and (process-buffer process)
+                   (buffer-name (process-buffer process)))
+          (set-buffer (process-buffer process))
+          (let ((sentinels (expect-info-sentinels (expect-find-info process))))
+            (while sentinels
+              (save-excursion
+                (funcall (pop sentinels))))
+            (expect-shutdown process)))))))
+
+(defun expect-find-event (process)
+  "Find (and execute) the next event."
+  (let* ((info (expect-find-info process))
+         (point (expect-info-point info))
+         (queries (expect-info-queries info))
+         (clause (car queries))
+         cond)
+    (expect-setup-timer info)
+    (when (expect-info-message info)
+      (message "Expect received %d bytes" (point-max)))
+    (when clause
+      (if (eq (caar clause) t)
+          ;; We have handled all queries and want to die.
+          (expect-kill process)
+        (when (> (point-max) point)
+          (goto-char point)
+          (while clause
+            (setq cond (caar clause))
+            (when (cond
+                   ;; Regexp
+                   ((stringp cond)
+                    (re-search-forward (caar clause) nil t))
+                   ;; Fall-through
+                   ((eq t cond)
+                    t)
+                   ;; Process state
+                   ((memq cond '(exit run stop signal open closed))
+                    (eq cond (process-status process)))
+                   (t
+                    (error "Illegal condition: %s" cond)))
+              (expect-cancel-timer info)
+              (expect-info-set-point info (point))
+              (expect-info-set-queries info (cdr queries))
+              (save-excursion
+                (funcall (cadar clause)))
+              (setq clause nil)
+              ;; More than one event may have arrived, so we try again.
+              (when (memq (process-status process) '(open run))
+                (expect-find-event process)))
+            (setq clause (cdr clause))))))))
+
+(defun expect-setup-timer (info)
+  (let ((timer (expect-info-timer info)))
+    (when timer
+      (expect-cancel-timer info)
+      (setcar timer (run-at-time (cadr timer) nil (caddr timer))))))
+
+(defun expect-cancel-timer (info)
+  (when (car (expect-info-timer info))
+    (ignore-errors (cancel-timer (car (expect-info-timer info))))))
+
+;;; Indentation and edebug specs.
+
+(put 'expect 'lisp-indent-function 1)
+(put 'expect 'edebug-form-spec '(form body))
+(put 'expect-exit 'lisp-indent-function 0)
+(put 'expect-exit 'edebug-form-spec '(body))
+(put 'with-expect 'lisp-indent-function 1)
+(put 'with-expect 'edebug-form-spec '(form body))
+(put 'with-expect-asynchronous 'lisp-indent-function 1)
+(put 'with-expect-asynchronous 'edebug-form-spec '(form body))
+
+(provide 'expect)
+
+;;; expect.el ends here
-;; mailcrypt.el v3.4, mail encryption with PGP
+;; mailcrypt.el v3.5.3, mail encryption with PGP
 ;; Copyright (C) 1995  Jin Choi <jin@atype.com>
 ;;                     Patrick LoPresti <patl@lcs.mit.edu>
+;;           (C) 1998  Len Budney <lbudney@pobox.com>
 ;; Any comments or suggestions welcome.
 ;; Inspired by pgp.el, by Gray Watson <gray@antaire.com>.
 
 
 (defconst mc-xemacs-p (string-match "XEmacs" emacs-version))
 
-(if (not mc-xemacs-p)
-    (progn
-      (autoload 'mc-decrypt "mc-toplev" nil t)
-      (autoload 'mc-verify "mc-toplev" nil t)
-      (autoload 'mc-snarf "mc-toplev" nil t)
-      (autoload 'mc-pgp-fetch-key "mc-pgp" nil t)
-      (autoload 'mc-encrypt "mc-toplev" nil t)
-      (autoload 'mc-sign "mc-toplev" nil t)
-      (autoload 'mc-insert-public-key "mc-toplev" nil t)
-      (autoload 'mc-remailer-encrypt-for-chain "mc-remail" nil t)
-      (autoload 'mc-remailer-insert-response-block "mc-remail" nil t)
-      (autoload 'mc-remailer-insert-pseudonym "mc-remail" nil t)))
+(autoload 'mc-decrypt "mc-toplev" nil t)
+(autoload 'mc-verify "mc-toplev" nil t)
+(autoload 'mc-snarf "mc-toplev" nil t)
+(autoload 'mc-pgp-fetch-key "mc-pgp" nil t)
+(autoload 'mc-encrypt "mc-toplev" nil t)
+(autoload 'mc-sign "mc-toplev" nil t)
+(autoload 'mc-insert-public-key "mc-toplev" nil t)
+(autoload 'mc-remailer-encrypt-for-chain "mc-remail" nil t)
+(autoload 'mc-remailer-insert-response-block "mc-remail" nil t)
+(autoload 'mc-remailer-insert-pseudonym "mc-remail" nil t)
+(autoload 'mc-setversion "mc-setversion" nil t)
 
 ;;}}}
 
 ;;{{{ Minor mode variables and functions
 
+(defvar mc-pgp-always-sign nil 
+  "*If t, always sign encrypted PGP messages, or never sign if 'never.")
+
 (defvar mc-read-mode nil
   "Non-nil means Mailcrypt read mode key bindings are available.")
 
       (easy-menu-add mc-write-mode-menu)
     (easy-menu-remove mc-write-mode-menu)))
 
-;;;###autoload
 (defun mc-install-read-mode ()
   (interactive)
   (mc-read-mode 1))
 
-;;;###autoload
 (defun mc-install-write-mode ()
   (interactive)
   (mc-write-mode 1))
 ;;}}}
 
 ;;{{{ User variables.
-(defconst mc-version "3.4")
+(defconst mc-version "3.5.3")
+(defvar mc-temp-directory "/tmp"
+  "*Default temp directory to be used by Mailcrypt.")
 (defvar mc-default-scheme 'mc-scheme-pgp "*Default encryption scheme to use.")
 (defvar mc-passwd-timeout 60
   "*Time to deactivate password in seconds after a use.
     (mh-folder-mode (decrypt . mc-mh-decrypt-message)
 		    (verify . mc-mh-verify-signature)
 		    (snarf . mc-mh-snarf-keys))
-    ;; September Gnus (5.2) has a new message editing mode
     (message-mode (encrypt . mc-encrypt-message)
-		  (sign . mc-sign-message))
+                  (sign . mc-sign-message))
     (gnus-summary-mode (decrypt . mc-gnus-decrypt-message)
 		       (verify . mc-gnus-verify-signature)
 		       (snarf . mc-gnus-snarf-keys))
 
 (defvar mc-passwd-cache nil "Cache for passphrases.")
 
-(defvar mc-schemes '(("pgp" . mc-scheme-pgp)))
+(defvar mc-schemes '(("pgp50" . mc-scheme-pgp50)
+		     ("pgp" . mc-scheme-pgp)
+		     ("gpg" . mc-scheme-gpg)
+		     ))
 
 ;;}}}
 
 ;	  (princ tmp))))))
 
 ;; In case I ever decide to do this right.
-(defconst mc-field-name-regexp "^\\(.+\\)")
+;; LRB - Thanks Pat! This helped a lot in updating mixmaster support.
+;; mc-field-name-regexp now catches precisely those email headers 
+;; which are RFC-822 compliant.
+(defconst mc-field-name-regexp 
+  (concat 
+   "^\\([" 
+   (char-to-string 33) "-" (char-to-string 57)
+   (char-to-string 59) "-" (char-to-string 126)
+   "]*\\)"))
 (defconst mc-field-body-regexp "\\(.*\\(\n[ \t].*\\)*\n\\)")
 
 (defun mc-get-fields (&optional matching bounds nuke)
 		     (match-beginning 0) (match-end 0))
 		  (setq retval nil)
 		  default))))
-    (if msg (message "%s" msg))
+    (if msg (if window-system
+		(progn (message nil) (message-box "%s" msg))
+	      (message "%s" msg)))
     retval))
 
 (defun mc-process-region (beg end passwd program args parser &optional buffer)
       (setq mc-passwd-cache (cons (cons id passwd) mc-passwd-cache)))
     passwd))
 
-;;;###autoload
 (defun mc-deactivate-passwd (&optional inhibit-message)
   "*Deactivate the passphrase cache."
   (interactive)
 @c @singlespace
 
 @c %**start of header
-@setfilename ../info/mailcrypt.info
+@setfilename mailcrypt.info
 @settitle @value{TITLE}
 @setchapternewpage off
 @c %**end of header
 @syncodeindex fn cp
 
 @set TITLE Mailcrypt
-@set VERSION 3.4
-@set UPDATED October 10, 1995
-
-@direntry
-* Mailcrypt::               Emacs interface interface to cryptographic
-                            functions for mail and news.
-@end direntry
+@set VERSION 3.5.3
+@set UPDATED August 29, 1998
 
 @ifinfo
 
 documentation was last updated on @value{UPDATED}.
 
 Copyright 1995 Patrick J. LoPresti
+Copyright 1998 Leonard R. Budney
 
 The Mailcrypt program and this manual are published as free software.
 You may redistribute and/or modify them under the terms of the GNU
 @subtitle Version @value{VERSION}
 @subtitle @value{UPDATED}
 @author Patrick J. LoPresti <patl@@lcs.mit.edu>
+@author Leonard R. Budney <lbudney@@pobox.com>
 
 @c Copyright page
 @page
 @vskip 0pt plus 1filll
 Copyright @copyright{} 1995 Patrick J. LoPresti
 
+Copyright @copyright{} 1998 Leonard R. Budney
+
 The Mailcrypt program and this documentation are published as free
 software.  You may redistribute and/or modify them under the terms of
 the GNU General Public License as published by the Free Software
 @node Prerequisites, Installation, Introduction, Introduction
 @section Prerequisites
 
-Mailcrypt requires version 19 of GNU Emacs.  Mailcrypt has been tested
-on a variety of systems under both FSF Emacs and XEmacs.
+Mailcrypt requires version 19 or higher of GNU Emacs.  Mailcrypt has
+been tested on a variety of systems under both FSF Emacs and XEmacs.
 
 Mailcrypt requires Pretty Good (tm) Privacy, usually known as PGP.  This
 document assumes that you have already obtained and installed PGP and
 
 If Mailcrypt is not installed on your system, obtain the latest version
 from the Mailcrypt home page at
-@file{http://cag-www.lcs.mit.edu/mailcrypt/} and follow the instructions
-in the file @file{INSTALL}.
+@file{http://www.pobox.com/~lbudney/linux/software/mailcrypt.html} and
+follow the instructions in the file @file{INSTALL}.
+
+Next, decide what version of PGP you are using.  Versions 3.5 and higher
+of Mailcrypt support multiple versions of PGP.  To choose a version,
+add the following lines to your @file{.emacs} file:
+
+@lisp
+(load-library "mailcrypt") ; provides "mc-setversion"
+(mc-setversion "2.6")    ; for PGP 2.6 (default); also "5.0" and "gpg"
+@end lisp
 
 Next, teach your Emacs how and when to load the Mailcrypt functions and
 install the Mailcrypt key bindings.  Almost all Emacs major modes
 (add-hook 'rmail-summary-mode-hook 'mc-install-read-mode)
 @end lisp
 
+Using Emacs version 20.3 or higher, you should use the following
+lines instead:
+
+@lisp
+(add-hook 'rmail-show-message-hook 'mc-install-read-mode)
+(add-hook 'rmail-summary-mode-hook 'mc-install-read-mode)
+@end lisp
+
 @node Hooking into VM, Hooking into MH-E, Hooking into Rmail, Installation
 @subsection Hooking into VM
 
 
 @lisp
 (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
+(add-hook 'message-mode-hook 'mc-install-write-mode)
 (add-hook 'news-reply-mode-hook 'mc-install-write-mode)
 @end lisp
 
 @section Command Overview
 
 All Mailcrypt commands are (by default) activated by three-character key
-sequences which begin with @kbd{C-c /}.  The four most common operations
-are:
+sequences which begin with @kbd{C-c /}.  The most common operations are:
 
 @table @emph
 
 @node  General Use, Remailer Support, Introduction, Top
 @chapter General Use
 
+@findex mc-setversion
+By default, Mailcrypt assumes you are using one of the PGP 2.6.x
+versions.  This permits backward compatibility for the millions of
+satisfied users of Mailcrypt 3.4 worldwide.  If you wish to specify a
+different version of PGP, use this function. Its action is the same as
+setting the variable @code{mc-default-scheme}. For a list of supported
+versions, press the tab key. "2.6" means 2.6.x, the original (and default). 
+"5.0" is pgp 5.0. "gpg" is GnuPG.
+
 @findex mc-read-mode
 @findex mc-write-mode
 Mailcrypt works by providing two minor modes for interfacing with
 which matches the string @code{mc-pgp-user-id}; this defaults to
 @code{(user-login-name)}.  Note that this differs from PGP's normal
 default, which is to use the first of @emph{all} of the secret keys.  To
-mimic PGP's behavior, set this variable to @code{""}.
+mimic PGP's behavior, set this variable to @code{""}. This variable is
+specific to pgp 2.6.x; @code{mc-pgp50-user-id} and @code{mc-gpg-user-id} are
+the corresponding variables for pgp 5.0 and GnuPG.
 
 If you want to use a secret key other than your default for signing the
 message, pass a prefix argument to @code{mc-encrypt}.  (That is, type
 @enumerate
 
 @item
-Do @samp{finger remailer-list@@kiwi.cs.berkeley.edu > ~/.remailers}.
+Do @samp{finger rlist@@publius.net > ~/.remailers}.
 This will create a Levien-format list of remailers in the file
 @file{.remailers} in your home directory.  Mailcrypt will parse this the
 first time you access a remailer function.
 @end example
 
 @vindex mc-pgp-comment
+@vindex mc-pgp50-comment
+@vindex mc-gpg-comment
 To change the comment to one of your own, set the variable
-@code{mc-pgp-comment}.  Set it to @code{nil} to use PGP's default, which
+@code{mc-pgp-comment}. Set it to @code{nil} to use PGP's default, which
 is probably either no comment or something defined in @file{config.txt}.
+@code{mc-pgp50-comment} and @code{mc-gpg-comment} are the corresponding
+variables for the other versions.
 
 @node Mode Line, Key Bindings, Comment Field, Miscellaneous Configuration
 @section Mode Line
 under the name @file{pgp}.  To use a different name (or to provide a
 complete path), set the variable @code{mc-pgp-path}.
 
+@vindex mc-pgp50-pgpe-path
+@vindex mc-pgp50-pgps-path
+@vindex mc-pgp50-pgpv-path
+@vindex mc-pgp50-pgpk-path
+PGP 5.0 includes four separate executables, usually installed as "pgpe",
+"pgps", "pgpv", and "pgpk". The variables @code{mc-pgp50-pgpe-path},
+@code{mc-pgp50-pgps-path}, @code{mc-pgp50-pgpv-path}, and
+@code{mc-pgp50-pgpk-path} tell Mailcrypt where to find them if they are
+not on your search path.
+
+@vindex mc-gpg-path
+GnuPG is normally installed as "gpg". @code{mc-gpg-path} tells Mailcrypt
+where to find the executable if it is not on your path.
+
 In order to keep your identities straight, Mailcrypt needs to know where
 your secret keyring resides.
 
 
 @table @file
 
+@item http://cag-www.lcs.mit.edu/mailcrypt/
+"Mailcrypt: An Emacs/PGP Interface", by Pat LoPresti. This page has
+been the Mailcrypt homepage since October 10, 1995.  It is still
+the distribution site for version 3.4 of Mailcrypt--a rock-solid
+version still to be recommended if you use only PGP 2.6.x.
+
 @item http://world.std.com/~franl/crypto.html
 "Cryptography, PGP, and Your Privacy", by Fran Litterio.  This page is
 simply excellent.  It makes all the other References in this chapter
+;; mc-gpg.el, GPG support for Mailcrypt
+;; Copyright (C) 1995  Jin Choi <jin@atype.com>
+;;                     Patrick LoPresti <patl@lcs.mit.edu>
+;;               1998  Brian Warner <warner@lothar.com>
+
+;; $Id$
+
+;;{{{ Licensing
+;; This file is intended to be used with GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;}}}
+(require 'mailcrypt)
+
+; pieces to do:
+
+; #key lookup?
+; #mc-gpg-encrypt-region
+;  need to deal with untrusted keys, missing keys (offer to fetch), --throw
+; #mc-gpg-decrypt-region [anything not clearsigned] (a,as,ae,ase)
+;  need to implement signature-key fetch, ponder --throw-keyid case
+; #mc-gpg-sign-region (clearsign/notclearsign)
+; #mc-gpg-verify-region [clearsigned only] (ok/badsig/missingkey/corruptmsg)
+; #mc-gpg-insert-public-key (comment, altkeyring)
+; #mc-gpg-snarf-keys (one, multiple, old, corrupt)
+; key fetching (is there a GPG key server yet?)
+; clean up use of buffers, #kill off old tmp buffers
+; in verify-region, print date of signature too
+;  ~maybe have bad-signature message print keyid/date? (no, sig is invalid,
+;  ~ anything other than its invalidity is misleading)
+; make messages shorter (get it all to fit in echo area)
+
+; enhancements I'd like to add
+;  trustdb status reporting during encryption/decryption: show the best trust
+;   path to the recipient/signer?
+;  completion on local id when signing (--list-secret-keys should know them)
+;  algorithm preferences, possibly by destination user
+;   (this is embedded in gpg)
+;  extra options, possibly by destination user. Maybe for pgp5.0/pgp2.6 compat?
+;  rfc2015 operation (MIME: application/pgp-signature, etc)
+
+; mc-gpg-alternate-keyring seems dubious.. have two options, public/private?
+
+; using a shell introduces concerns about quoting and such. If the name of a
+; key used as a recipient or as a mc-gpg-user-id (a key to sign with) has a
+; double quote or ! or weird stuff, things could break.
+
+; encrypting to a nontrusted key is problematic: when not in --batch mode,
+; gpg warns the user and asks if they want to use the key anyway. In --batch
+; mode, it fails, even if we give --yes. Worse yet, if we encrypt to multiple
+; recipients, the untrusted ones get dropped withou flagging an error (stderr
+; does get a message, but it doesn't indicate which keys had a problem)
+
+(defvar mc-gpg-user-id (user-login-name)
+  "*GPG ID of your default identity.")
+(defvar mc-gpg-path "gpg" "*The GPG executable.")
+(defvar mc-gpg-display-snarf-output nil
+  "*If t, pop up the GPG output window when snarfing keys.")
+(defvar mc-gpg-alternate-keyring nil
+  "*Public keyring to use instead of default.")
+(defvar mc-gpg-comment
+;  (format "Processed by Mailcrypt %s, an Emacs/GPG interface" mc-version)
+  nil
+  "*Comment field to appear in ASCII armor output.  If nil, let GPG use its 
+default.")
+(defconst mc-gpg-msg-begin-line "-----BEGIN PGP MESSAGE-----"
+  "Text for start of GPG message delimiter.")
+(defconst mc-gpg-msg-end-line "-----END PGP MESSAGE-----\n?"
+  "Text for end of GPG message delimiter.")
+(defconst mc-gpg-signed-begin-line "-----BEGIN PGP SIGNED MESSAGE-----"
+  "Text for start of GPG signed messages.")
+(defconst mc-gpg-signed-end-line "-----END PGP SIGNATURE-----\n?"
+  "Text for end of GPG signed messages.")
+(defconst mc-gpg-key-begin-line "^-----BEGIN PGP PUBLIC KEY BLOCK-----\r?$"
+  "Text for start of GPG public key.")
+(defconst mc-gpg-key-end-line "^-----END PGP PUBLIC KEY BLOCK-----\r?$"
+  "Text for end of GPG public key.")
+(defconst mc-gpg-error-re "^\\(ERROR:\\|WARNING:\\).*"
+  "Regular expression matching an error from GPG")
+(defconst mc-gpg-sigok-re "^gpg: Good signature.*"
+  "Regular expression matching a GPG signature validation message")
+(defconst mc-gpg-newkey-re 
+  "^[^:]+:[^:]+: \\(key [0-9A-F]+\\): \\(.*\\)$"
+  "Regular expression matching a GPG key snarf message")
+(defconst mc-gpg-nokey-re
+  "Cannot find the public key matching userid '\\(.+\\)'$"
+  "Regular expression matching a GPG missing-key messsage")
+(defconst mc-gpg-key-expected-re
+  "gpg: Signature made .+ using .+ key ID \\(\\S +\\)\ngpg: Can't check signature: Public key not found")
+(defconst mc-gpg-extra-args nil
+  "Extra arguments to pass to all invocations of gpg. Used during debugging to
+set --homedir, to use special test keys instead of the developer's normal
+keyring.")
+(defconst mc-gpg-debug-buffer nil
+  "A buffer for debugging messages. If nil, no debugging messages are logged.")
+
+; we use with-current-buffer for clarity. emacs19 doesn't have it. This
+; code is cribbed from lazy-lock.el which does the same thing
+(eval-when-compile
+  ;; We use this for clarity and speed.  Borrowed from a future Emacs.
+  (or (fboundp 'with-current-buffer)
+      (defmacro with-current-buffer (buffer &rest body)
+	"Execute the forms in BODY with BUFFER as the current buffer.
+The value returned is the value of the last form in BODY."
+	(` (save-excursion (set-buffer (, buffer)) (,@ body)))))
+  )