diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 10 | ||||
-rw-r--r-- | g10/app-common.h | 7 | ||||
-rw-r--r-- | g10/app-openpgp.c | 7 | ||||
-rw-r--r-- | g10/card-util.c | 6 |
4 files changed, 26 insertions, 4 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 4b040b3a8..72604ae62 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,13 @@ +2004-10-21 Werner Koch <[email protected]> + + * app-common.h (app_openpgp_storekey: Add prototype. + + * app-openpgp.c (do_sign): Replace asprintf by direct allocation. + This avoids problems with missing vasprintf implementations. + + * card-util.c (generate_card_keys): Add a #warning for gnupg 1.9 + and use the same string there. + 2004-10-20 David Shaw <[email protected]> * g10.c (parse_list_options): Fix non-constant initializer so we diff --git a/g10/app-common.h b/g10/app-common.h index f54f6da92..48bd349f4 100644 --- a/g10/app-common.h +++ b/g10/app-common.h @@ -88,6 +88,13 @@ struct app_ctx_s { #if GNUPG_MAJOR_VERSION == 1 int app_select_openpgp (app_t app); int app_get_serial_and_stamp (app_t app, char **serial, time_t *stamp); +int app_openpgp_storekey (app_t app, int keyno, + unsigned char *template, size_t template_len, + time_t created_at, + const unsigned char *m, size_t mlen, + const unsigned char *e, size_t elen, + int (*pincb)(void*, const char *, char **), + void *pincb_arg); #else /*-- app-help.c --*/ gpg_error_t app_help_get_keygrip_string (ksba_cert_t cert, char *hexkeygrip); diff --git a/g10/app-openpgp.c b/g10/app-openpgp.c index d6cbe88a6..11be93e28 100644 --- a/g10/app-openpgp.c +++ b/g10/app-openpgp.c @@ -1298,10 +1298,15 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, { char *prompt; - if (asprintf (&prompt, _("PIN [sigs done: %lu]"), sigcount) < 0) +#define PROMPTSTRING _("PIN [sigs done: %lu]") + + prompt = malloc (strlen (PROMPTSTRING) + 50); + if (!prompt) return gpg_error_from_errno (errno); + sprintf (prompt, PROMPTSTRING, sigcount); rc = pincb (pincb_arg, prompt, &pinvalue); free (prompt); +#undef PROMPTSTRING } if (rc) { diff --git a/g10/card-util.c b/g10/card-util.c index 1d2e47ea2..8cae1dab6 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -895,10 +895,10 @@ generate_card_keys (const char *serialno) m_free(answer); } #else - /* Does 1.9 have answer_is_yes_no_default() ? */ - want_backup = !(cpr_get_answer_is_yes + want_backup = cpr_get_answer_is_yes ( "cardedit.genkeys.backup_enc", - _("Inhibit off-card backup of encryption key? (y/N) "))); + _("Make off-card backup of encryption key? (Y/n) ")); +#warning we need answer_is_yes_no_default() #endif if ( (info.fpr1valid && !fpr_is_zero (info.fpr1)) |