Home GnuPG

cpp: Update key with --with-secret instead of updating it twice

Description

cpp: Update key with --with-secret instead of updating it twice

* lang/cpp/src/key.cpp (Key::update): Call Context::key() only once
with KeyListMode::WithSecret.

With gpg >= 2.1, get the key with --with-secret instead of first trying
to get the secret key and, if that fails, getting the public key.

  • GnuPG-bug-id: T4794

Details

Provenance
ikloeckerAuthored on Sep 8 2020, 2:55 PM
Parents
rGPGMEPP37e19790efc8: cpp: Add keylist mode WithSecret
Branches
Unknown
Tags
Unknown
Tasks
Unknown Object (Maniphest Task)