Use with MailCrypt

To use GnuPG with MailCrypt you should

(mc-setversion "gpg")
(setq mc-gpg-user-id "user@foo.dom")

This is all the customization I’ve done to MailCrypt to make it work with GnuPG.

I have been having trouble getting MailCrypt to work on windows, and I didn’t want to depend on cygwin’s sh.exe, so I wrote an independent gpg mode that only requires a working gpg setup: Lisp:dgpg.elDavidElentok

Updating ELPA Certs on Windows

I’ve added the following to my startup scripts to support PGP under Windows 10 (for more information on GnuPG, see GPG4WIN or the GnuPG Offical Site):

;; windows/dos GNUPG setup
(if (memq system-type '(windows-nt ms-dos))
     '(epg-gpg-home-directory "C:/GnuPG")
     '(epg-gpg-program (concat epg-gpg-home-directory "/bin/gpg.exe"))
     '(epg-gpgconf-program  (concat epg-gpg-home-directory "/bin/gpgconf.exe"))))

This is especially handy for getting use-package :ensure to behave when updating the ELPA PGP signatures on a machine with expired ELPA PGP signatures:

(let ((my/old package-check-signature))
  (use-package gnu-elpa-keyring-update
    :ensure t
    :init   (setq package-check-signature nil)
    :config (setq package-check-signature my/old)))

Note, the let here allows us to update signatures when our present ones are expired already. ~ Corwin Brust

See also