Subject: bug#70688: 29.3; epa-file-encrypt-to does not allow selecting subkeys by id using <subkey>! syntax supported by gpg itself

From: Eli Zaretskii <[email-masked]>
Date: Wed, 01 May 2024 15:10:24 +0300

severity 70688 wishlist
thanks

> Date: Tue, 30 Apr 2024 22:14:14 -0400
> From:  "Collin J. Doering" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> I was attempting to encrypt a file using multiple gpg subkeys, using the <subkey>! syntax supported by gpg. To do this, I had a file local variable in the 'file.gpg' I was editing that looked something like this:
> 
> --8<---------------cut here---------------start------------->8---
> # -*- epa-file-encrypt-to: ("subkey0!" "subkey1!" "subkey2!") -*-
> --8<---------------cut here---------------end--------------->8---
> 
> However, I found that this failed to select the subkeys, and would fall back to symmetric encryption. If I specify the subkeys without the '!' suffix, it ends up using the most recent subkey on the corresponding master.
> 
> This all to say, looking at the source, it appears this is expected behavior. It would be nice if explicitly specifying subkeys to use was supported.

Patches to add this missing feature are welcome.

(However, my reading of the documentation is that epa-file-encrypt-to
is about recipients of the file, not about gpg keys.)