mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* app-openpgp.c (do_sign): Replace asprintf by direct allocation.
This avoids problems with missing vasprintf implementations in gnupg 1.4. * app-common.h (app_openpgp_storekey: Add prototype.
This commit is contained in:
parent
23d73cdeb8
commit
9aa7d0bc35
@ -1,3 +1,11 @@
|
||||
2004-10-21 Werner Koch <wk@g10code.com>
|
||||
|
||||
* app-openpgp.c (do_sign): Replace asprintf by direct allocation.
|
||||
This avoids problems with missing vasprintf implementations in
|
||||
gnupg 1.4.
|
||||
|
||||
* app-common.h (app_openpgp_storekey: Add prototype.
|
||||
|
||||
2004-10-20 Werner Koch <wk@g10code.com>
|
||||
|
||||
* sc-investigate: Removed.
|
||||
|
@ -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);
|
||||
|
@ -824,7 +824,7 @@ verify_chv3 (app_t app,
|
||||
|
||||
if (strlen (pinvalue) < 6)
|
||||
{
|
||||
log_error (_("prassphrase (CHV%d) is too short;"
|
||||
log_error (_("passphrase (CHV%d) is too short;"
|
||||
" minimum length is %d\n"), 3, 6);
|
||||
xfree (pinvalue);
|
||||
return gpg_error (GPG_ERR_BAD_PIN);
|
||||
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user