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#37230: EasyPG selects revoked key, rather than the obvious current one as recipient on file save Date: Fri, 30 Aug 2019 15:16:23 +1000 Message-ID: <8677bd68-7838-ce01-84df-ff998e0e4874@zepherin.com> References: 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="126026"; 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: 37230@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-000WbG-Op for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 08:06:18 +0200 Original-Received: from localhost ([::1]:56458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3a37-0006OL-18 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 02:06:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58983) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3a2w-0006Ml-Hf for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3a2u-0003lt-QB for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44357) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3a2u-0003lO-K0 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3a2t-0001Xv-Be for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 02:06:03 -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:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37230 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.15671451265862 (code B ref -1); Fri, 30 Aug 2019 06:06:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2019 06:05:26 +0000 Original-Received: from localhost ([127.0.0.1]:53175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3a2I-0001WT-77 for submit@debbugs.gnu.org; Fri, 30 Aug 2019 02:05:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3ZH0-0008QH-6l for submit@debbugs.gnu.org; Fri, 30 Aug 2019 01:16:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45490) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3ZGy-00080J-JX for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 01:16:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3ZGw-0008Ff-Tq for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 01:16:32 -0400 Original-Received: from ppp215-215.static.internode.on.net ([59.167.215.215]:43924 helo=zepherin.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3ZGw-0008Bl-9u for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 01:16:30 -0400 Original-Received: from [10.137.0.18] (unknown [192.168.3.104]) by zepherin.com (Postfix) with ESMTPS id 245C2D406B0 for ; Fri, 30 Aug 2019 15:16:24 +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 In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Mailman-Approved-At: Fri, 30 Aug 2019 02:05:24 -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:166066 Archived-At: Hi.=C2=A0 Actually, I had a closer look at the key, and all I had was the revoked public key, not the private bit. So I deleted it. I still maintain that EasyPG should act the same as gpg when it comes to specifying recipients. On 8/30/19 3:10 PM, Beto HydroxyButyrate wrote: > > 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" "Encryp= t > 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/lib6= 4 > --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-p= ng > --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-= gnu > '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-n= s > 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 tim= e > 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 ehel= p > 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 fring= e > 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-readabl= e > 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)) > >