mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02:00
* trustdb.h, trustdb.c (read_trust_options): New. Returns items from the
trustdb version record. * keylist.c (public_key_list): Use it here for the new "tru" record.
This commit is contained in:
parent
9f839ac937
commit
828abe6483
@ -1,11 +1,17 @@
|
|||||||
2003-07-21 David Shaw <dshaw@jabberwocky.com>
|
2003-07-21 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* trustdb.h, trustdb.c (read_trust_options): New. Returns items
|
||||||
|
from the trustdb version record.
|
||||||
|
|
||||||
|
* keylist.c (public_key_list): Use it here for the new "tru"
|
||||||
|
record.
|
||||||
|
|
||||||
* sig-check.c (signature_check, signature_check2,
|
* sig-check.c (signature_check, signature_check2,
|
||||||
check_key_signature, check_key_signature2): Allow passing NULLs
|
check_key_signature, check_key_signature2): Allow passing NULLs
|
||||||
for unused parameters in the x2 form of each function to avoid the
|
for unused parameters in the x2 form of each function to avoid the
|
||||||
need for dummy variables. getkey.c, mainproc.c: Change all
|
need for dummy variables. getkey.c, mainproc.c: Change all
|
||||||
callers.
|
callers.
|
||||||
|
|
||||||
2003-07-15 David Shaw <dshaw@jabberwocky.com>
|
2003-07-15 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* keygen.c (do_add_key_flags): Don't set the certify flag for
|
* keygen.c (do_add_key_flags): Don't set the certify flag for
|
||||||
|
@ -57,10 +57,31 @@ static FILE *attrib_fp=NULL;
|
|||||||
void
|
void
|
||||||
public_key_list( STRLIST list )
|
public_key_list( STRLIST list )
|
||||||
{
|
{
|
||||||
if( !list )
|
if(opt.with_colons)
|
||||||
list_all(0);
|
{
|
||||||
else
|
byte trust_model;
|
||||||
list_one( list, 0 );
|
ulong created,nextcheck;
|
||||||
|
|
||||||
|
read_trust_options(&trust_model,&created,&nextcheck);
|
||||||
|
|
||||||
|
printf("tru:");
|
||||||
|
|
||||||
|
if(nextcheck && nextcheck <= make_timestamp())
|
||||||
|
printf("o");
|
||||||
|
if(trust_model!=0)
|
||||||
|
printf("t");
|
||||||
|
|
||||||
|
/* We don't show marginals, completes, or cert_depth since
|
||||||
|
they are not accurate in 1.2.x - they are not updated when
|
||||||
|
the trustdb is rebuilt with different options. */
|
||||||
|
|
||||||
|
printf(":%d:%lu:%lu\n",trust_model,created,nextcheck);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !list )
|
||||||
|
list_all(0);
|
||||||
|
else
|
||||||
|
list_one( list, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -440,7 +440,6 @@ trust_letter (unsigned int value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************
|
/****************
|
||||||
* Recreate the WoT but do not ask for new ownertrusts. Special
|
* Recreate the WoT but do not ask for new ownertrusts. Special
|
||||||
* feature: In batch mode and without a forced yes, this is only done
|
* feature: In batch mode and without a forced yes, this is only done
|
||||||
@ -494,7 +493,24 @@ revalidation_mark (void)
|
|||||||
pending_check_trustdb = 1;
|
pending_check_trustdb = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
read_trust_options(byte *trust_model,ulong *created,ulong *nextcheck)
|
||||||
|
{
|
||||||
|
TRUSTREC opts;
|
||||||
|
|
||||||
|
init_trustdb();
|
||||||
|
|
||||||
|
read_record(0,&opts,RECTYPE_VER);
|
||||||
|
|
||||||
|
if(trust_model)
|
||||||
|
*trust_model=opts.r.ver.trust_model;
|
||||||
|
if(created)
|
||||||
|
*created=opts.r.ver.created;
|
||||||
|
if(nextcheck)
|
||||||
|
*nextcheck=opts.r.ver.nextcheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************
|
/***********************************************
|
||||||
*********** Ownertrust et al. ****************
|
*********** Ownertrust et al. ****************
|
||||||
***********************************************/
|
***********************************************/
|
||||||
|
@ -59,6 +59,8 @@ int enum_cert_paths( void **context, ulong *lid,
|
|||||||
void enum_cert_paths_print( void **context, FILE *fp,
|
void enum_cert_paths_print( void **context, FILE *fp,
|
||||||
int refresh, ulong selected_lid );
|
int refresh, ulong selected_lid );
|
||||||
|
|
||||||
|
void read_trust_options(byte *trust_model,ulong *created,ulong *nextcheck);
|
||||||
|
|
||||||
unsigned int get_ownertrust (PKT_public_key *pk);
|
unsigned int get_ownertrust (PKT_public_key *pk);
|
||||||
int get_ownertrust_info (PKT_public_key *pk);
|
int get_ownertrust_info (PKT_public_key *pk);
|
||||||
void update_ownertrust (PKT_public_key *pk, unsigned int new_trust );
|
void update_ownertrust (PKT_public_key *pk, unsigned int new_trust );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user