1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

Fix bug#1138.

This commit is contained in:
Werner Koch 2009-09-28 17:11:10 +00:00
parent 011a15ecf0
commit cc88b024f6
2 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2009-09-28 Werner Koch <wk@g10code.com>
* trustdb.c (get_validity_info): Take care of a NULL PK. Fixes
bug#1138.
(get_validity_string): Ditto.
2009-09-25 Werner Koch <wk@g10code.com>
* pkglue.c (pk_sign, pk_verify, pk_encrypt, pk_decrypt)

View File

@ -1178,8 +1178,11 @@ get_validity_info (PKT_public_key *pk, PKT_user_id *uid)
{
int trustlevel;
if (!pk)
return '?'; /* Just in case a NULL PK is passed. */
trustlevel = get_validity (pk, uid);
if( trustlevel & TRUST_FLAG_REVOKED )
if ( (trustlevel & TRUST_FLAG_REVOKED) )
return 'r';
return trust_letter (trustlevel);
}
@ -1189,6 +1192,9 @@ get_validity_string (PKT_public_key *pk, PKT_user_id *uid)
{
int trustlevel;
if (!pk)
return "err"; /* Just in case a NULL PK is passed. */
trustlevel = get_validity (pk, uid);
if( trustlevel & TRUST_FLAG_REVOKED )
return _("revoked");