mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01: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:
parent
eb02f5b46a
commit
8c72ff9543
@ -1,3 +1,14 @@
|
|||||||
|
2004-10-05 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2004-10-03 Timo Schulz <twoaday@g10code.de>
|
2004-10-03 Timo Schulz <twoaday@g10code.de>
|
||||||
|
|
||||||
* apdu.c (apdu_open_remote_reader) [_WIN32]: Do not set ENOSYS.
|
* apdu.c (apdu_open_remote_reader) [_WIN32]: Do not set ENOSYS.
|
||||||
|
@ -2170,7 +2170,7 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
|
|||||||
{
|
{
|
||||||
KBNODE node;
|
KBNODE node;
|
||||||
int i;
|
int i;
|
||||||
int do_warn = 0, indent=0;
|
int do_warn = 0;
|
||||||
byte pk_version=0;
|
byte pk_version=0;
|
||||||
PKT_public_key *primary=NULL;
|
PKT_public_key *primary=NULL;
|
||||||
|
|
||||||
@ -2324,17 +2324,6 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
|
|||||||
|
|
||||||
/* the user ids */
|
/* the user ids */
|
||||||
|
|
||||||
for( node = keyblock; node; node = node->next )
|
|
||||||
{
|
|
||||||
if(node->pkt->pkttype == PKT_USER_ID
|
|
||||||
&& (node->pkt->pkt.user_id->is_revoked
|
|
||||||
|| node->pkt->pkt.user_id->is_expired))
|
|
||||||
{
|
|
||||||
indent=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
for( node = keyblock; node; node = node->next ) {
|
for( node = keyblock; node; node = node->next ) {
|
||||||
if( node->pkt->pkttype == PKT_USER_ID ) {
|
if( node->pkt->pkttype == PKT_USER_ID ) {
|
||||||
@ -2345,11 +2334,9 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
|
|||||||
tty_printf("[%8.8s] ",_("revoked"));
|
tty_printf("[%8.8s] ",_("revoked"));
|
||||||
else if(uid->is_expired)
|
else if(uid->is_expired)
|
||||||
tty_printf("[%8.8s] ",_("expired"));
|
tty_printf("[%8.8s] ",_("expired"));
|
||||||
else if(opt.list_options&LIST_SHOW_UID_VALIDITY && primary)
|
else if(primary)
|
||||||
tty_printf("[%8.8s] ",
|
tty_printf("[%8.8s] ",
|
||||||
trust_value_to_string(get_validity(primary,uid)));
|
trust_value_to_string(get_validity(primary,uid)));
|
||||||
else if(indent)
|
|
||||||
tty_printf(" ");
|
|
||||||
if( only_marked )
|
if( only_marked )
|
||||||
tty_printf(" ");
|
tty_printf(" ");
|
||||||
else if( node->flag & NODFLG_SELUID )
|
else if( node->flag & NODFLG_SELUID )
|
||||||
|
@ -884,6 +884,10 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
|
|||||||
else if(desc[i].mode==KEYDB_SEARCH_MODE_SHORT_KID)
|
else if(desc[i].mode==KEYDB_SEARCH_MODE_SHORT_KID)
|
||||||
fprintf(spawn->tochild,"0x%08lX\n",
|
fprintf(spawn->tochild,"0x%08lX\n",
|
||||||
(ulong)desc[i].u.kid[1]);
|
(ulong)desc[i].u.kid[1]);
|
||||||
|
else if(desc[i].mode==KEYDB_SEARCH_MODE_NONE)
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
BUG();
|
||||||
|
|
||||||
log_info(_("requesting key %s from %s server %s\n"),
|
log_info(_("requesting key %s from %s server %s\n"),
|
||||||
keystr_from_desc(&desc[i]),
|
keystr_from_desc(&desc[i]),
|
||||||
|
@ -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 *algo_name = pubkey_algo_to_string ( pk->pubkey_algo );
|
||||||
const char *timestr;
|
const char *timestr;
|
||||||
char *maink;
|
char *maink;
|
||||||
const char *fmtstr;
|
|
||||||
|
|
||||||
if ( !algo_name )
|
if ( !algo_name )
|
||||||
algo_name = "?";
|
algo_name = "?";
|
||||||
|
|
||||||
fmtstr = _(" (main key ID %08lX)");
|
#define KEYIDSTRING _(" (main key ID %s)")
|
||||||
maink = m_alloc ( strlen (fmtstr) + 20 );
|
|
||||||
|
maink = m_alloc ( strlen (KEYIDSTRING) + keystrlen() + 20 );
|
||||||
if( keyid[2] && keyid[3] && keyid[0] != keyid[2]
|
if( keyid[2] && keyid[3] && keyid[0] != keyid[2]
|
||||||
&& keyid[1] != keyid[3] )
|
&& keyid[1] != keyid[3] )
|
||||||
sprintf( maink, fmtstr, (ulong)keyid[3] );
|
sprintf( maink, KEYIDSTRING, keystr(&keyid[2]) );
|
||||||
else
|
else
|
||||||
*maink = 0;
|
*maink = 0;
|
||||||
|
|
||||||
uid = get_user_id ( keyid, &uidlen );
|
uid = get_user_id ( keyid, &uidlen );
|
||||||
timestr = strtimestamp (pk->timestamp);
|
timestr = strtimestamp (pk->timestamp);
|
||||||
fmtstr = _("You need a passphrase to unlock the"
|
|
||||||
" secret key for user:\n"
|
#undef KEYIDSTRING
|
||||||
"\"%.*s\"\n"
|
|
||||||
"%u-bit %s key, ID %08lX, created %s%s\n" );
|
#define PROMPTSTRING _("You need a passphrase to unlock the secret" \
|
||||||
atext = m_alloc ( 100 + strlen (fmtstr)
|
" key for user:\n" \
|
||||||
+ uidlen + 15 + strlen(algo_name) + 8
|
"\"%.*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) );
|
+ strlen (timestr) + strlen (maink) );
|
||||||
sprintf (atext, fmtstr,
|
sprintf (atext, PROMPTSTRING,
|
||||||
uidlen, uid,
|
uidlen, uid,
|
||||||
nbits_from_pk (pk), algo_name, (ulong)keyid[1], timestr,
|
nbits_from_pk (pk), algo_name, keystr(&keyid[0]), timestr,
|
||||||
maink );
|
maink );
|
||||||
m_free (uid);
|
m_free (uid);
|
||||||
m_free (maink);
|
m_free (maink);
|
||||||
|
|
||||||
|
#undef PROMPTSTRING
|
||||||
|
|
||||||
{
|
{
|
||||||
size_t dummy;
|
size_t dummy;
|
||||||
fingerprint_from_pk( pk, fpr, &dummy );
|
fingerprint_from_pk( pk, fpr, &dummy );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user