mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-28 15:57:03 +01:00
* 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:
parent
43ba6d43d7
commit
a119391e26
@ -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>
|
2002-08-26 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* hkp.c (parse_hkp_index, dehtmlize): Move HTML functionality into
|
* hkp.c (parse_hkp_index, dehtmlize): Move HTML functionality into
|
||||||
|
@ -304,18 +304,20 @@ print_keyinfo(int count,char *keystring,KEYDB_SEARCH_DESC *desc)
|
|||||||
if(flags&2)
|
if(flags&2)
|
||||||
printf(" (disabled)");
|
printf(" (disabled)");
|
||||||
|
|
||||||
if(keytype[0])
|
printf("\n\t ");
|
||||||
printf(" %s",keytype);
|
|
||||||
|
|
||||||
if(keysize>0)
|
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)
|
if(expiretime>0)
|
||||||
printf(" expires %s,",strtimestamp(expiretime));
|
printf(", expires %s",strtimestamp(expiretime));
|
||||||
|
|
||||||
printf(" key %s\n",certid);
|
printf("\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -347,7 +349,6 @@ keyserver_spawn(int action,STRLIST list,
|
|||||||
set_exec_path(GNUPG_LIBEXECDIR,opt.exec_path_set);
|
set_exec_path(GNUPG_LIBEXECDIR,opt.exec_path_set);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Build the filename for the helper to execute */
|
/* Build the filename for the helper to execute */
|
||||||
command=m_alloc(strlen("gpgkeys_")+strlen(opt.keyserver_scheme)+1);
|
command=m_alloc(strlen("gpgkeys_")+strlen(opt.keyserver_scheme)+1);
|
||||||
strcpy(command,"gpgkeys_");
|
strcpy(command,"gpgkeys_");
|
||||||
|
@ -212,17 +212,18 @@ do_check_messages( PKT_public_key *pk, PKT_signature *sig, int *r_expired )
|
|||||||
|
|
||||||
*r_expired = 0;
|
*r_expired = 0;
|
||||||
if( pk->version == 4 && pk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) {
|
if( pk->version == 4 && pk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) {
|
||||||
log_info(_("this is a PGP generated "
|
log_info(_("key %08lX: this is a PGP generated "
|
||||||
"ElGamal key which is NOT secure for signatures!\n"));
|
"ElGamal key which is NOT secure for signatures!\n"),
|
||||||
|
(ulong)keyid_from_pk(pk,NULL));
|
||||||
return G10ERR_PUBKEY_ALGO;
|
return G10ERR_PUBKEY_ALGO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pk->timestamp > sig->timestamp ) {
|
if( pk->timestamp > sig->timestamp ) {
|
||||||
ulong d = pk->timestamp - sig->timestamp;
|
ulong d = pk->timestamp - sig->timestamp;
|
||||||
log_info( d==1
|
log_info( d==1
|
||||||
? _("public key is %lu second newer than the signature\n")
|
? _("public key %08lX is %lu second newer than the signature\n")
|
||||||
: _("public key is %lu seconds newer than the signature\n"),
|
: _("public key %08lX is %lu seconds newer than the signature\n"),
|
||||||
d );
|
(ulong)keyid_from_pk(pk,NULL),d );
|
||||||
if( !opt.ignore_time_conflict )
|
if( !opt.ignore_time_conflict )
|
||||||
return G10ERR_TIME_CONFLICT; /* pubkey newer than signature */
|
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();
|
cur_time = make_timestamp();
|
||||||
if( pk->timestamp > cur_time ) {
|
if( pk->timestamp > cur_time ) {
|
||||||
ulong d = 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")
|
"in future (time warp or clock problem)\n")
|
||||||
: _("key has been created %lu seconds "
|
: _("key %08lX has been created %lu seconds "
|
||||||
"in future (time warp or clock problem)\n"), d );
|
"in future (time warp or clock problem)\n"),
|
||||||
|
(ulong)keyid_from_pk(pk,NULL),d );
|
||||||
if( !opt.ignore_time_conflict )
|
if( !opt.ignore_time_conflict )
|
||||||
return G10ERR_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 ) {
|
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;
|
rc = G10ERR_BAD_SIGN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user