assistant: When generating a gpg secret key, avoid hardcoding the key algorithm and...
authorJoey Hess <joeyh@joeyh.name>
Tue, 9 Jan 2024 19:31:53 +0000 (15:31 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 9 Jan 2024 19:31:53 +0000 (15:31 -0400)
commitde6a297d3643b7085c2166ec5eef296bd0fa4692
tree5fefbb05f1ab5b3c94c58628453fbb13e291d235
parentd37dbd62b8864141adfbc514b1fdb4c530ed6af3
assistant: When generating a gpg secret key, avoid hardcoding the key algorithm and size

This aims to future-proof gpg key generation. OpenPGP is in flux with a
conflict over standards ongoing. It seems not unlikely that different
systems will have different gpg commands that support different algorithms.

This also simplifies the code by using the --quick-gen-key interface rather
than the experimental batch interface. It seems less likely that
--quick-gen-key will break than an experimental interface (whose
documentation I can no longer find).

--quick-gen-key is supported since gpg 2.1.0 (2014).

Sponsored-by: Graham Spencer on Patreon
Assistant/WebApp/Gpg.hs
CHANGELOG
Utility/Gpg.hs
templates/configurators/genkeymodal.hamlet