* sig-check.c (do_check_messages, do_check): Show keyid in error messages.

* keyserver.c (print_keyinfo): More readable key listings for
--search-keys responses.
This commit is contained in:
David Shaw 2002-08-28 19:34:58 +00:00
parent 43ba6d43d7
commit a119391e26
3 changed files with 27 additions and 16 deletions

View File

@ -1,3 +1,11 @@
2002-08-28 David Shaw <dshaw@jabberwocky.com>
* sig-check.c (do_check_messages, do_check): Show keyid in error
messages.
* keyserver.c (print_keyinfo): More readable key listings for
--search-keys responses.
2002-08-26 David Shaw <dshaw@jabberwocky.com>
* hkp.c (parse_hkp_index, dehtmlize): Move HTML functionality into

View File

@ -304,18 +304,20 @@ print_keyinfo(int count,char *keystring,KEYDB_SEARCH_DESC *desc)
if(flags&2)
printf(" (disabled)");
if(keytype[0])
printf(" %s",keytype);
printf("\n\t ");
if(keysize>0)
printf(" %d",keysize);
printf("%d bit ",keysize);
printf("\n\t created %s,",strtimestamp(createtime));
if(keytype[0])
printf("%s ",keytype);
printf("key %s, created %s",certid,strtimestamp(createtime));
if(expiretime>0)
printf(" expires %s,",strtimestamp(expiretime));
printf(", expires %s",strtimestamp(expiretime));
printf(" key %s\n",certid);
printf("\n");
return 0;
}
@ -347,7 +349,6 @@ keyserver_spawn(int action,STRLIST list,
set_exec_path(GNUPG_LIBEXECDIR,opt.exec_path_set);
#endif
/* Build the filename for the helper to execute */
command=m_alloc(strlen("gpgkeys_")+strlen(opt.keyserver_scheme)+1);
strcpy(command,"gpgkeys_");

View File

@ -212,17 +212,18 @@ do_check_messages( PKT_public_key *pk, PKT_signature *sig, int *r_expired )
*r_expired = 0;
if( pk->version == 4 && pk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) {
log_info(_("this is a PGP generated "
"ElGamal key which is NOT secure for signatures!\n"));
log_info(_("key %08lX: this is a PGP generated "
"ElGamal key which is NOT secure for signatures!\n"),
(ulong)keyid_from_pk(pk,NULL));
return G10ERR_PUBKEY_ALGO;
}
if( pk->timestamp > sig->timestamp ) {
ulong d = pk->timestamp - sig->timestamp;
log_info( d==1
? _("public key is %lu second newer than the signature\n")
: _("public key is %lu seconds newer than the signature\n"),
d );
? _("public key %08lX is %lu second newer than the signature\n")
: _("public key %08lX is %lu seconds newer than the signature\n"),
(ulong)keyid_from_pk(pk,NULL),d );
if( !opt.ignore_time_conflict )
return G10ERR_TIME_CONFLICT; /* pubkey newer than signature */
}
@ -230,10 +231,11 @@ do_check_messages( PKT_public_key *pk, PKT_signature *sig, int *r_expired )
cur_time = make_timestamp();
if( pk->timestamp > cur_time ) {
ulong d = pk->timestamp - cur_time;
log_info( d==1 ? _("key has been created %lu second "
log_info( d==1 ? _("key %08lX has been created %lu second "
"in future (time warp or clock problem)\n")
: _("key has been created %lu seconds "
"in future (time warp or clock problem)\n"), d );
: _("key %08lX has been created %lu seconds "
"in future (time warp or clock problem)\n"),
(ulong)keyid_from_pk(pk,NULL),d );
if( !opt.ignore_time_conflict )
return G10ERR_TIME_CONFLICT;
}
@ -343,7 +345,7 @@ do_check( PKT_public_key *pk, PKT_signature *sig, MD_HANDLE digest,
}
if( !rc && sig->flags.unknown_critical ) {
log_info(_("assuming bad signature due to an unknown critical bit\n"));
log_info(_("assuming bad signature from key %08lX due to an unknown critical bit\n"),(ulong)keyid_from_pk(pk,NULL));
rc = G10ERR_BAD_SIGN;
}