#1040306 emacs: MML fails to list any keys thus signing fails

#1040306#5
Date:
2023-07-04 09:42:49 UTC
From:
To:
Hi,

Signing emails in emacs isn't working at all; I have I think set
things up in a conventional manner -

I have mml-smime-use set to epg (it's the default, I think)

I have a GPG agent running.

epa-list-secret-keys lists the key I'd expect:

  u 12F4D21C8F6A63C8 Matthew Vernon <matthew@debian.org>

[cf gpg --list-secret-keys:

sec   rsa4096 2009-12-14 [SC]
      BA4EF9C84DF96D37D8A1E2D412F4D21C8F6A63C8
uid           [ultimate] Matthew Vernon <matthew@debian.org>
uid           [ultimate] Matthew Vernon <matthewv@chiark.greenend.org.uk>
ssb   rsa4096 2009-12-14 [E]

]

But if I try and sign a message using MML (i.e. C-c C-m s which adds
--<<smime-signed>>-{
--}-<<smime-signed>>
round the mail as expected) then when I attempt to send, I get the
expected key selection buffer with the text
"Select keys for signing.
If no one is selected, default secret key is used.
"

...but there are no keys available to select, and if I hit OK, then I
just get the error

GPG error: "Signing failed (unknown reason)"

...which I think is an artifact of MML having failed to find a
suitable key. But epa knows about my secret key, so this _ought_ to
work...

Thanks,

Matthew