gpg: Improve generation of keys stored on card (brainpool,cv25519).
* g10/keygen.c (ask_key_flags_with_mask): Allow more than ECDH for legacy curves. (ask_algo): Tweak mapping of ECC to OpenPGP algos (parse_key_parameter_part): Ditto. (generate_subkeypair): Create the subkey with the time stored on the card.
This fixes two problems with generating keys from a card:
- The key usage is now set correctly for brainpool curves.
- The add-key and --quick-add-key commands now also take the creation time from the time stored on the card. Without that we would need to update the creation time and fingerprint already stored on the card which is a no-go if another key has already been created using that on-card key.
Note: To create a key on a card without an OpenPGP keyblock use
gpg-card.
- Signed-off-by: Werner Koch <wk@gnupg.org>