1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* passphrase.c (agent_get_passphrase): Use keystrs for agent strings, and

fix sprintf warnings.

* keyserver.c (keyserver_spawn): Fix BUG() with certain sets of mixed
regular and preferred keyserver refreshes.  Noted by Sebastian Wiesinger.

* keyedit.c (show_key_with_all_names): Show uid validity in menu.
This commit is contained in:
David Shaw 2004-10-05 14:33:02 +00:00
parent eb02f5b46a
commit 8c72ff9543
4 changed files with 37 additions and 29 deletions

View file

@ -673,35 +673,41 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text,
const char *algo_name = pubkey_algo_to_string ( pk->pubkey_algo );
const char *timestr;
char *maink;
const char *fmtstr;
if ( !algo_name )
algo_name = "?";
fmtstr = _(" (main key ID %08lX)");
maink = m_alloc ( strlen (fmtstr) + 20 );
#define KEYIDSTRING _(" (main key ID %s)")
maink = m_alloc ( strlen (KEYIDSTRING) + keystrlen() + 20 );
if( keyid[2] && keyid[3] && keyid[0] != keyid[2]
&& keyid[1] != keyid[3] )
sprintf( maink, fmtstr, (ulong)keyid[3] );
sprintf( maink, KEYIDSTRING, keystr(&keyid[2]) );
else
*maink = 0;
uid = get_user_id ( keyid, &uidlen );
timestr = strtimestamp (pk->timestamp);
fmtstr = _("You need a passphrase to unlock the"
" secret key for user:\n"
"\"%.*s\"\n"
"%u-bit %s key, ID %08lX, created %s%s\n" );
atext = m_alloc ( 100 + strlen (fmtstr)
+ uidlen + 15 + strlen(algo_name) + 8
#undef KEYIDSTRING
#define PROMPTSTRING _("You need a passphrase to unlock the secret" \
" key for user:\n" \
"\"%.*s\"\n" \
"%u-bit %s key, ID %s, created %s%s\n" )
atext = m_alloc ( 100 + strlen (PROMPTSTRING)
+ uidlen + 15 + strlen(algo_name) + keystrlen()
+ strlen (timestr) + strlen (maink) );
sprintf (atext, fmtstr,
sprintf (atext, PROMPTSTRING,
uidlen, uid,
nbits_from_pk (pk), algo_name, (ulong)keyid[1], timestr,
nbits_from_pk (pk), algo_name, keystr(&keyid[0]), timestr,
maink );
m_free (uid);
m_free (maink);
#undef PROMPTSTRING
{
size_t dummy;
fingerprint_from_pk( pk, fpr, &dummy );