Fix for key generation: signing subkey was processed as a decryption subkey by mistake (this broke generation of 25519 keys)

This commit is contained in:
Heiko Schaefer 2022-02-04 14:47:42 +01:00
parent 5e0007c7fd
commit 9cdc699745
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -519,7 +519,7 @@ fn gen_subkeys(
// We begin by generating the signing subkey, which is mandatory.
println!(" Generate subkey for Signing");
let (pkm, ts) = admin.generate_key_simple(KeyType::Signing, algo)?;
let key_sig = public_key_material_to_key(&pkm, KeyType::Decryption, ts)?;
let key_sig = public_key_material_to_key(&pkm, KeyType::Signing, ts)?;
// make decryption subkey (unless disabled), with the same algorithm as
// the sig key