Home GnuPG
Diffusion GPGME 60dc499abd89

js: update getDefaultKey to more precise logic

Description

js: update getDefaultKey to more precise logic

  • src/Keyring.js: Adapted Keyring.getDefaultKey() to my current understanding of a default signing key: either the default key set in the gpg config, or 'the first usable private key' - usability meaning 'not invalid, expired, revoked, and can be used for signing'. It should be the same key used as in command line when doing a --sign operation. In case the user has a smartcard plugged in, we currently won't know of this here, so our choice may differ. But as we do all javascript-binding sign operations with the key fingerprint explicitly set, this should not be a real problem. This method is seen more as a convenience to tell using librarys which key represents the main user.

Details

Provenance
mkrambachAuthored on Aug 23 2018, 11:28 AM
Parents
rM24a000586522: js: add decrypt result options
Branches
Unknown
Tags
Unknown