1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-01 02:42:44 +02:00

2002-06-14 Timo Schulz <ts@winpt.org>

* skclist.c (is_insecure): Implemented.
This commit is contained in:
Timo Schulz 2002-06-14 11:14:41 +00:00
parent 26f00196b3
commit 08ad6bc159
2 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2002-06-14 Timo Schulz <ts@winpt.org>
* skclist.c (is_insecure): Implemented.
2002-06-12 David Shaw <dshaw@jabberwocky.com>
* keyserver.c (keyserver_spawn): Properly handle PROGRAM responses

View File

@ -55,11 +55,30 @@ release_sk_list( SK_LIST sk_list )
static int
is_insecure( PKT_secret_key *sk )
{
u32 keyid[2];
KBNODE node = NULL, u;
int insecure = 0;
return 0; /* FIXME!! */
keyid_from_sk( sk, keyid );
node = get_pubkeyblock( keyid );
for ( u = node; u; u = u->next ) {
if ( u->pkt->pkttype == PKT_USER_ID ) {
PKT_user_id *id = u->pkt->pkt.user_id;
if ( id->attrib_data )
continue; /* skip attribute packets */
if ( strstr( id->name, "(insecure!)" )
|| strstr( id->name, "not secure" )
|| strstr( id->name, "do not use" ) ) {
insecure = 1;
break;
}
}
}
release_kbnode( node );
return insecure;
}
static int
key_present_in_sk_list(SK_LIST sk_list, PKT_secret_key *sk)
{