diff options
author | Werner Koch <[email protected]> | 2013-11-18 13:09:47 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-11-18 13:09:47 +0000 |
commit | cc9a0b69b698ba436eaf777e5020532845b56236 (patch) | |
tree | cb2274c3d97fffa7020cb1e5a56373935ee094b2 /agent/command.c | |
parent | Add strusage macro replacement feature. (diff) | |
download | gnupg-cc9a0b69b698ba436eaf777e5020532845b56236.tar.gz gnupg-cc9a0b69b698ba436eaf777e5020532845b56236.zip |
Make use of the *_NAME etc macros.
Replace hardwired strings at many places with new macros from config.h
and use the new strusage macro replacement feature.
* common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
sentinels.
* agent/command.c (cmd_import_key): Use asprintf to create the prompt.
Diffstat (limited to 'agent/command.c')
-rw-r--r-- | agent/command.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/agent/command.c b/agent/command.c index 938778ac4..4fa40d9f9 100644 --- a/agent/command.c +++ b/agent/command.c @@ -2065,10 +2065,16 @@ cmd_import_key (assuan_context_t ctx, char *line) if (!agent_key_available (grip)) err = gpg_error (GPG_ERR_EEXIST); else - err = agent_ask_new_passphrase - (ctrl, _("Please enter the passphrase to protect the " - "imported object within the GnuPG system."), - &passphrase); + { + char *prompt = xtryasprintf + (_("Please enter the passphrase to protect the " + "imported object within the %s system."), GNUPG_NAME); + if (!prompt) + err = gpg_error_from_syserror (); + else + err = agent_ask_new_passphrase (ctrl, prompt, &passphrase); + xfree (prompt); + } if (err) goto leave; } |