From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Beto HydroxyButyrate Newsgroups: gmane.emacs.bugs Subject: bug#37229: EasyPG selects revoked key, rather than the obvious current one as recipient on file save Date: Fri, 30 Aug 2019 15:10:33 +1000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="125949"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 To: 37229@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 30 08:06:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i3a38-000WbS-Q5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 08:06:19 +0200 Original-Received: from localhost ([::1]:56454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3a36-0006Mr-6u for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 02:06:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58912) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3a2v-0006Mk-EP for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3a2t-0003hz-0n for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44354) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3a2s-0003h6-Po for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3a2s-0001Xh-G3 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Beto HydroxyButyrate Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2019 06:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37229 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15671451235848 (code B ref -1); Fri, 30 Aug 2019 06:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2019 06:05:23 +0000 Original-Received: from localhost ([127.0.0.1]:53173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3a2D-0001WE-VN for submit@debbugs.gnu.org; Fri, 30 Aug 2019 02:05:22 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3ZBP-0008Gv-LL for submit@debbugs.gnu.org; Fri, 30 Aug 2019 01:10:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46782) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3ZBO-0007Xl-02 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 01:10:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3ZBM-00010R-9t for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 01:10:45 -0400 Original-Received: from 2001-44b8-211a-1b96-aa20-66ff-fe1e-2a06.static.ipv6.internode.on.net ([2001:44b8:211a:1b96:aa20:66ff:fe1e:2a06]:35736 helo=zepherin.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3ZBL-0000mk-Ij for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 01:10:44 -0400 Original-Received: from [10.137.0.18] (unknown [192.168.3.104]) by zepherin.com (Postfix) with ESMTPS id C6301D406B0 for ; Fri, 30 Aug 2019 15:10:33 +1000 (AEST) Openpgp: preference=signencrypt Autocrypt: addr=beto@zepherin.com; keydata= mQINBFoPyoYBEAD0+bM6Z3UnYgRwPS5u9d4KKVWBUccos0wgwKkS9sdITB/HZ2eQu5o/L868 luoAWkdsZSRBkGEiEaZs2FK1LRYR7nbmvO5NOIIWmd/rZKdEX9/LhejZrKo13tAzR0oZB7VQ hxd8033vPwZ8aXoYHlGLh4ujYteBH8vZx7rZe5M/eNLwAOc1SIS3Plw8vs5SFZp86jaMrcSE VavAwfGuuf/ToBpAx50vL1jOZzy7pzFHI7Ux3//1gfDbImSDeJBF56a9U5jKBMz1E9xgMPAO ZtcY2WQ2y6JWodEQ1y4ctvCGP5lVrRGP3g7/rWMo7jMSJ4Zy2R4fVP0MYl8/JqcdnBH0ULBB AIXbwWbDetRV0zlKavJxPBrqwcSwmhe+iOjElqadxl4K9+Rf4+m782xkOrzkEzkKPVhYQeql C6KLqJX50iuhzT6Ks1uC9F9GalT480i4JTTArDN2pQ92iTqVaiNYaQKxgL65Z1RjKPSoqfpk KCNJN4YmuufkUgWJX+u5TIGc/hEH8Wp+eqRQ0P61P8Ichpy+SDCSilu/K8Qrxz3KAa5S15id w9Xi7fN951EwCX2mof0TofUiNjJTgVbNbMDDCjLkUYLfuaeTN9ZeLEW6epyuoVYIco5ZNyAI auVi8JISz7D8Hh3eydham9P6YU0NEn2j+Lo6k5KkiwIqNPtv3QARAQABtDxCZXRvIEh5ZHJv eHkgQnV0eXJhdGUgKHplcGhlcmluIHB0eSBsdGQpIDxiZXRvQHplcGhlcmluLmNvbT6JAlQE EwEKAD4CGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Fri, 30 Aug 2019 02:05:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166065 Archived-At: I have a test file named Test1.gpg with the following at the top: ;; -*- epa-file-encrypt-to: ("beto@zepherin.com") -*- I write out the file. It throws this error: Debugger entered--Lisp error: (file-error "Opening output file" "Encrypt failed" "Unusable public key: 4253BDD3FF52DC13; Exit") signal(file-error ("Opening output file" "Encrypt failed" "Unusable public key: 4253BDD3FF52DC13; Exit")) epa-file-write-region(nil nil "/home/user/Documents/Auth/Test1.gpg" nil t "~/Documents/Auth/Test1.gpg" nil) apply(epa-file-write-region (nil nil "/home/user/Documents/Auth/Test1.gpg" nil t "~/Documents/Auth/Test1.gpg" nil)) epa-file-handler(write-region nil nil "/home/user/Documents/Auth/Test1.gpg" nil t "~/Documents/Auth/Test1.gpg" nil) write-region(nil nil "/home/user/Documents/Auth/Test1.gpg" nil t "~/Documents/Auth/Test1.gpg") basic-save-buffer-2() basic-save-buffer-1() basic-save-buffer(t) save-buffer(1) funcall-interactively(save-buffer 1) call-interactively(save-buffer nil nil) command-execute(save-buffer) The problem is that EasyPG selects the revoked key. The solution is *not* to delete the revoked key from my keyring. I need the revoked key to be able to decode email previously sent encrypted using this revoked key. I did some googling and saw that there have been at least two other reports of this issue, but someone hacked up a kluge specifically for email, rather than fixing the general case. In GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)= of 2018-08-13 built on buildvm-13.phx2.fedoraproject.org Windowing system distributor 'Fedora Project', version 11.0.12004000 System Description: Fedora release 29 (Twenty Nine) Recent messages: <<< Type SPC or RET to bury the buffer list >>> Saving file /home/user/Documents/Auth/Test1.gpg... epa-file-write-region: Opening output file: Encrypt failed, Unusable public key: 4253BDD3FF52DC13; Exit <<< Type SPC or RET to bury the buffer list >>> Mark set t [2 times] <<< Type SPC or RET to bury the buffer list >>> Saving file /home/user/Documents/Auth/Test1.gpg... Entering debugger... <<< Type SPC or RET to bury the buffer list >>> Configured using: 'configure --build=3Dx86_64-redhat-linux-gnu --host=3Dx86_64-redhat-linux-gnu --program-prefix=3D --disable-dependency-tracking --prefix=3D/usr --exec-prefix=3D/usr --bindir=3D/usr/bin --sbindir=3D/usr/sbin --sysconfdir=3D/etc --datadir=3D/usr/share --includedir=3D/usr/include --libdir=3D/usr/lib64 --libexecdir=3D/usr/libexec --localstatedir=3D/var --sharedstatedir=3D/var/lib --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-dbus --with-gif --with-jpeg --with-png= --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=3Dgtk3 --with-gpm=3Dno --with-xwidgets --with-modules build_alias=3Dx86_64-redhat-linux-gnu host_alias=3Dx86_64-redhat-linux-gn= u 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' LDFLAGS=3D-Wl,-z,relro PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LCMS2 Important settings: value of $LANG: C.UTF-8 locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: shell-dirtrack-mode: t show-paren-mode: t display-time-mode: t minibuffer-electric-default-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml mml-sec password-cache gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-print debug cl-extra help-fns radix-tree help-mode misearch multi-isearch shell pcomplete epa-file epa derived epg epg-config image-mode rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode seq byte-opt gv bytecomp byte-compile cconv dom nxml-util nxml-enc xmltok view dired dired-loaddefs elec-pair cus-edit cus-start cus-load wid-edit paren time minibuf-eldef ruby-mode smie cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs compile info easymenu ehelp echistory chistory ebuff-menu hippie-exp comint ansi-color ring edmacro kmacro cl-loaddefs cl-lib ls-lisp time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 174725 10251) (symbols 48 27705 1) (miscs 40 367 292) (strings 32 50902 1271) (string-bytes 1 1474559) (vectors 16 22946) (vector-slots 8 584471 13322) (floats 8 112 656) (intervals 56 1481 164) (buffers 992 27))