diff options
author | Robin Jarry <robin@jarry.cc> | 2024-03-06 13:16:45 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-03-10 17:29:53 +0100 |
commit | 46ab2976848d4cce77522d796f68493da5859ed3 (patch) | |
tree | 23a7eb73dd038cd2ea5aba05fae807d1f1568718 /lib | |
parent | 7b8fbe2a3d7c454c030cabdf5de65b84c3383a7f (diff) | |
download | aerc-46ab2976848d4cce77522d796f68493da5859ed3.tar.gz |
gpg: use export-minimal when attaching public key
Depending on how many signatures the public key has, it may be very
large. The key signatures are not required to verify the authenticity of
an email.
Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CCZKDO3ETIOAI.1DDOYI8Z8LY5O%40cepl.eu%3E
Reported-by: Matěj Cepl <mcepl@cepl.eu>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Matěj Cepl <mcepl@cepl.eu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crypto/gpg/gpgbin/keys.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/crypto/gpg/gpgbin/keys.go b/lib/crypto/gpg/gpgbin/keys.go index ca166e9d..93f48210 100644 --- a/lib/crypto/gpg/gpgbin/keys.go +++ b/lib/crypto/gpg/gpgbin/keys.go @@ -30,7 +30,8 @@ func GetKeyId(s string) (string, error) { // ExportPublicKey exports the public key identified by k in armor format func ExportPublicKey(k string) (io.Reader, error) { - cmd := exec.Command("gpg", "--export", "--armor", k) + cmd := exec.Command("gpg", "--armor", + "--export-options", "export-minimal", "--export", k) var outbuf bytes.Buffer var stderr strings.Builder |