mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
* pkclist.c (build_pk_list): Keystrify.
* mainproc.c (check_sig_and_print), pkclist.c (do_edit_ownertrust): Improve translatability of user ID prompts.
This commit is contained in:
parent
b1e2c5398f
commit
4737923d56
@ -1,3 +1,10 @@
|
|||||||
|
2004-10-07 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* pkclist.c (build_pk_list): Keystrify.
|
||||||
|
|
||||||
|
* mainproc.c (check_sig_and_print), pkclist.c
|
||||||
|
(do_edit_ownertrust): Improve translatability of user ID prompts.
|
||||||
|
|
||||||
2004-10-06 David Shaw <dshaw@jabberwocky.com>
|
2004-10-06 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* helptext.c, pkclist.c (do_we_trust): It is not possible to get
|
* helptext.c, pkclist.c (do_we_trust): It is not possible to get
|
||||||
|
@ -1442,6 +1442,7 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
|
|
||||||
/* find and print the primary user ID */
|
/* find and print the primary user ID */
|
||||||
for( un=keyblock; un; un = un->next ) {
|
for( un=keyblock; un; un = un->next ) {
|
||||||
|
char *p;
|
||||||
int valid;
|
int valid;
|
||||||
if(un->pkt->pkttype==PKT_PUBLIC_KEY)
|
if(un->pkt->pkttype==PKT_PUBLIC_KEY)
|
||||||
{
|
{
|
||||||
@ -1475,19 +1476,28 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
un->pkt->pkt.user_id->len,
|
un->pkt->pkt.user_id->len,
|
||||||
-1 );
|
-1 );
|
||||||
|
|
||||||
log_info(rc? _("BAD signature from \"")
|
p=utf8_to_native(un->pkt->pkt.user_id->name,
|
||||||
: sig->flags.expired ? _("Expired signature from \"")
|
un->pkt->pkt.user_id->len,0);
|
||||||
: _("Good signature from \""));
|
|
||||||
print_utf8_string( log_stream(), un->pkt->pkt.user_id->name,
|
if(rc)
|
||||||
un->pkt->pkt.user_id->len );
|
log_info(_("BAD signature from \"%s\""),p);
|
||||||
if(opt.verify_options&VERIFY_SHOW_VALIDITY)
|
else if(sig->flags.expired)
|
||||||
fprintf(log_stream(),"\" [%s]\n",trust_value_to_string(valid));
|
log_info(_("Expired signature from \"%s\""),p);
|
||||||
else
|
else
|
||||||
fputs("\"\n", log_stream() );
|
log_info(_("Good signature from \"%s\""),p);
|
||||||
|
|
||||||
|
m_free(p);
|
||||||
|
|
||||||
|
if(opt.verify_options&VERIFY_SHOW_VALIDITY)
|
||||||
|
fprintf(log_stream()," [%s]\n",trust_value_to_string(valid));
|
||||||
|
else
|
||||||
|
fputs("\n", log_stream() );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if( !count ) { /* just in case that we have no valid textual
|
if( !count ) { /* just in case that we have no valid textual
|
||||||
userid */
|
userid */
|
||||||
|
char *p;
|
||||||
|
|
||||||
/* Try for an invalid textual userid */
|
/* Try for an invalid textual userid */
|
||||||
for( un=keyblock; un; un = un->next ) {
|
for( un=keyblock; un; un = un->next ) {
|
||||||
if( un->pkt->pkttype == PKT_USER_ID &&
|
if( un->pkt->pkttype == PKT_USER_ID &&
|
||||||
@ -1511,22 +1521,30 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
un? un->pkt->pkt.user_id->len:3,
|
un? un->pkt->pkt.user_id->len:3,
|
||||||
-1 );
|
-1 );
|
||||||
|
|
||||||
log_info(rc? _("BAD signature from \"")
|
if(un)
|
||||||
: sig->flags.expired ? _("Expired signature from \"")
|
p=utf8_to_native(un->pkt->pkt.user_id->name,
|
||||||
: _("Good signature from \""));
|
un->pkt->pkt.user_id->len,0);
|
||||||
if (opt.trust_model!=TM_ALWAYS && un) {
|
else
|
||||||
fputs(_("[uncertain]"), log_stream() );
|
p=m_strdup("[?]");
|
||||||
|
|
||||||
|
if(rc)
|
||||||
|
log_info(_("BAD signature from \"%s\""),p);
|
||||||
|
else if(sig->flags.expired)
|
||||||
|
log_info(_("Expired signature from \"%s\""),p);
|
||||||
|
else
|
||||||
|
log_info(_("Good signature from \"%s\""),p);
|
||||||
|
if (opt.trust_model!=TM_ALWAYS && un)
|
||||||
|
{
|
||||||
putc(' ', log_stream() );
|
putc(' ', log_stream() );
|
||||||
}
|
fputs(_("[uncertain]"), log_stream() );
|
||||||
print_utf8_string( log_stream(),
|
}
|
||||||
un? un->pkt->pkt.user_id->name:"[?]",
|
fputs("\n", log_stream() );
|
||||||
un? un->pkt->pkt.user_id->len:3 );
|
|
||||||
fputs("\"\n", log_stream() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we have a good signature and already printed
|
/* If we have a good signature and already printed
|
||||||
* the primary user ID, print all the other user IDs */
|
* the primary user ID, print all the other user IDs */
|
||||||
if ( count && !rc ) {
|
if ( count && !rc ) {
|
||||||
|
char *p;
|
||||||
for( un=keyblock; un; un = un->next ) {
|
for( un=keyblock; un; un = un->next ) {
|
||||||
if( un->pkt->pkttype != PKT_USER_ID )
|
if( un->pkt->pkttype != PKT_USER_ID )
|
||||||
continue;
|
continue;
|
||||||
@ -1548,9 +1566,10 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
un->pkt->pkt.user_id->numattribs,pk,NULL);
|
un->pkt->pkt.user_id->numattribs,pk,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_info( _(" aka \""));
|
p=utf8_to_native(un->pkt->pkt.user_id->name,
|
||||||
print_utf8_string( log_stream(), un->pkt->pkt.user_id->name,
|
un->pkt->pkt.user_id->len,0);
|
||||||
un->pkt->pkt.user_id->len );
|
log_info(_(" aka \"%s\""),p);
|
||||||
|
m_free(p);
|
||||||
|
|
||||||
if(opt.verify_options&VERIFY_SHOW_VALIDITY)
|
if(opt.verify_options&VERIFY_SHOW_VALIDITY)
|
||||||
{
|
{
|
||||||
@ -1563,10 +1582,10 @@ check_sig_and_print( CTX c, KBNODE node )
|
|||||||
valid=trust_value_to_string(get_validity(pk,
|
valid=trust_value_to_string(get_validity(pk,
|
||||||
un->pkt->
|
un->pkt->
|
||||||
pkt.user_id));
|
pkt.user_id));
|
||||||
fprintf(log_stream(),"\" [%s]\n",valid);
|
fprintf(log_stream()," [%s]\n",valid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fputs("\"\n", log_stream() );
|
fputs("\n", log_stream() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
release_kbnode( keyblock );
|
release_kbnode( keyblock );
|
||||||
|
@ -171,7 +171,6 @@ do_edit_ownertrust (PKT_public_key *pk, int mode,
|
|||||||
unsigned *new_trust, int defer_help )
|
unsigned *new_trust, int defer_help )
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
size_t n;
|
|
||||||
u32 keyid[2];
|
u32 keyid[2];
|
||||||
int changed=0;
|
int changed=0;
|
||||||
int quit=0;
|
int quit=0;
|
||||||
@ -204,11 +203,9 @@ do_edit_ownertrust (PKT_public_key *pk, int mode,
|
|||||||
tty_printf("%4u%c/%s %s\n",nbits_from_pk( pk ),
|
tty_printf("%4u%c/%s %s\n",nbits_from_pk( pk ),
|
||||||
pubkey_letter( pk->pubkey_algo ),
|
pubkey_letter( pk->pubkey_algo ),
|
||||||
keystr(keyid), datestr_from_pk( pk ) );
|
keystr(keyid), datestr_from_pk( pk ) );
|
||||||
tty_printf(_(" \""));
|
p=get_user_id_native(keyid);
|
||||||
p = get_user_id( keyid, &n );
|
tty_printf(_(" \"%s\"\n"),p);
|
||||||
tty_print_utf8_string( p, n );
|
|
||||||
m_free(p);
|
m_free(p);
|
||||||
tty_printf("\"\n");
|
|
||||||
|
|
||||||
keyblock = get_pubkeyblock (keyid);
|
keyblock = get_pubkeyblock (keyid);
|
||||||
if (!keyblock)
|
if (!keyblock)
|
||||||
@ -231,10 +228,10 @@ do_edit_ownertrust (PKT_public_key *pk, int mode,
|
|||||||
show_photos(un->pkt->pkt.user_id->attribs,
|
show_photos(un->pkt->pkt.user_id->attribs,
|
||||||
un->pkt->pkt.user_id->numattribs,pk,NULL);
|
un->pkt->pkt.user_id->numattribs,pk,NULL);
|
||||||
|
|
||||||
tty_printf(_(" aka \""));
|
p=utf8_to_native(un->pkt->pkt.user_id->name,
|
||||||
tty_print_utf8_string (un->pkt->pkt.user_id->name,
|
un->pkt->pkt.user_id->len,0);
|
||||||
un->pkt->pkt.user_id->len );
|
|
||||||
tty_printf("\"\n");
|
tty_printf(_(" aka \"%s\"\n"),p);
|
||||||
}
|
}
|
||||||
|
|
||||||
print_fingerprint (pk, NULL, 2);
|
print_fingerprint (pk, NULL, 2);
|
||||||
@ -785,10 +782,10 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
|
|||||||
u32 keyid[2];
|
u32 keyid[2];
|
||||||
|
|
||||||
keyid_from_pk(iter->pk,keyid);
|
keyid_from_pk(iter->pk,keyid);
|
||||||
tty_printf("%4u%c/%08lX %s \"",
|
tty_printf("%4u%c/%s %s \"",
|
||||||
nbits_from_pk(iter->pk),
|
nbits_from_pk(iter->pk),
|
||||||
pubkey_letter(iter->pk->pubkey_algo),
|
pubkey_letter(iter->pk->pubkey_algo),
|
||||||
(ulong)keyid[1],
|
keystr(keyid),
|
||||||
datestr_from_pk(iter->pk));
|
datestr_from_pk(iter->pk));
|
||||||
|
|
||||||
if(iter->pk->user_id)
|
if(iter->pk->user_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user