Closed rrrooommmaaa closed 4 years ago
@rrrooommmaaa actually kr-def-key is not a command line parameter, but some internal variable which is set based on keyring configuration. In most cases it would pick up the first key in the keyring, however may also parse GnuPG config via conffile()
function.
@ni4 Anyway, it is set in rnp_cfg_set_defkey
and never read afterwards. Where is it supposed to be read?
@rrrooommmaaa Okay, now it's an issue :) Probably it was lost somewhere during the CLI->FFI transition.
@ni4 I have re-worded the issue.
@rrrooommmaaa Did you start working on this issue? I plan to introduce some changes which may have impact on it (make rnp_cfg_t
field of rnp_cli_t
structure, so we'll not pass two structures as parameters). Then it would be logical to replace rnp->defkey with rnp_cfg_getstr(rnp_cli_get_cfg(rnp), CFG_KR_DEF_KEY))
.
I haven't yet. Feel free to re-assign. @ni4
Ok, thanks!
Description
I would expect to sign (or do some other operation) with default key if the key is not specified for the operation. However,
kr-def-key
configuration value never gets tocli_rnp_t.defkey
field.Steps to Reproduce
???
Expected Behavior
Value from
CFG_KR_DEF_KEY
should go tocli_rnp_t.defkey
Actual Behavior
Value from
CFG_KR_DEF_KEY
is never used. Always trying to use the first key in the keystore.