Re: epg-encrypt-string in Emacs seems to be incompatible with GnuPG 2.4.1 on macOS, 2.4.0 works
Hello, I'm sorry that I didn't have time yesterday. "Herbert J. Skuhra" wrote: > This issue (bug id: T6481) is obviously fixed on master (commit > 2f872fa68c6576724b9dabee9fb0844266f55d0d): > > https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2f872fa68c6576724b9dabee9fb0844266f55d0d > > Will this be merged to STABLE-BRANCH-2-4 and part of the next release > (2.4.4?)? Yes. It's pushed now. If you see any regressions due to this patch, please let us know. -- ___ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: epg-encrypt-string in Emacs seems to be incompatible with GnuPG 2.4.1 on macOS, 2.4.0 works
On Sat, 20 May 2023 02:38:15 +0200, Robert Irelan wrote: > > I'm not sure what info will be most useful for debugging this, but the > `epg-encrypt-string` function seems not to work with GnuPG 2.4.1 on > macOS, while GnuPG 2.4.0 works (both on x86_64, macOS 13.3.1, Macports > used to install both). > > This is the command line that seems to hang with 2.4.1: > > ``` > /opt/local/bin/gpg2 --no-tty --status-fd 1 --yes > --enable-progress-filter --command-fd 0 --output > /var/folders/gc/73c5zcp918z9dssx8k1sybh0gn/T/epg-output2zVC4K > --pinentry-mode ask --decrypt -- > /var/folders/gc/73c5zcp918z9dssx8k1sybh0gn/T/epg-inputMnF1UG > ``` > > No settings in common.conf, gpg-agent.conf, or gpg.conf seem to affect > this hanging command. Let me know what info I can provide to help > debug this further This issue (bug id: T6481) is obviously fixed on master (commit 2f872fa68c6576724b9dabee9fb0844266f55d0d): https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2f872fa68c6576724b9dabee9fb0844266f55d0d Will this be merged to STABLE-BRANCH-2-4 and part of the next release (2.4.4?)? Thanks. -- Herbert ___ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: epg-encrypt-string in Emacs seems to be incompatible with GnuPG 2.4.1 on macOS, 2.4.0 works
Hi! On Fri, 19 May 2023 17:38, Robert Irelan said: > This is the command line that seems to hang with 2.4.1: > > ``` > /opt/local/bin/gpg2 --no-tty --status-fd 1 --yes > --enable-progress-filter --command-fd 0 --output > /var/folders/gc/73c5zcp918z9dssx8k1sybh0gn/T/epg-output2zVC4K > --pinentry-mode ask --decrypt -- > /var/folders/gc/73c5zcp918z9dssx8k1sybh0gn/T/epg-inputMnF1UG > ``` Here are two places which do not look correct: (defun epg-wait-for-completion (context) "Wait until the `epg-gpg-program' process completes." (while (eq (process-status (epg-context-process context)) 'run) (accept-process-output (epg-context-process context) 1)) ;; This line is needed to run the process-filter right now. (sleep-for 0.1) Sleeping for 100ms looks like an error prone hack. (defun epg-start-decrypt (context cipher) [...] ;; `gpgsm' does not read passphrase from stdin, so waiting is not needed. (unless (eq (epg-context-protocol context) 'CMS) (epg-wait-for-status context '("BEGIN_DECRYPTION" It is quite possible that BEGIN_DECRYPTION is emitted after the request for a pinentry. It does not look right to wait for it. I have not looked into the EasyPG code for many years despite that I am using it every day. The use of --command-fd w/o a state machine (or is there one for decrypt?) to handle the requests is not a good idea;; using --batch would be better. Please also see https://dev.gnupg.org/T6481 which is about a very similar problem. Salam-Shalom, Werner -- The pioneers of a warless world are the youth that refuse military service. - A. Einstein openpgp-digital-signature.asc Description: PGP signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users