Commit 8f87d82e authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Use primary algo also for encryption subkey if not specified otherwise

Example: If the default-new-key-algo option is set to "brainpoolp256r1",
then use this curve for the primary key and the encryption subkey
(instead of using cv25519 for the subkey). Just specifying a curve name
may not be the correct syntax for the default-new-key-algo option, but,
in my opinion, the user's intention is pretty obvious.

GnuPG-bug-id: 5717
parent a310e16f
......@@ -1807,8 +1807,8 @@ void AdvancedSettingsDialog::loadDefaultGnuPGKeyType()
setKeyCurve(curve);
}
if (split.size() == 2) {
auto algoString = split[1];
{
auto algoString = (split.size() == 2) ? split[1] : split[0];
// If it has no usage we assume encrypt subkey
if (!algoString.contains(QLatin1Char('/'))) {
algoString += QStringLiteral("/enc");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment