mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Pass CTRL to many more functions.
-- For proper operations as a server we need to avoid global variables. Thus we need to pass the session state CTRL to most functions. Quite a lot of changes but fortunately straightforward to do. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
5e89144cbc
commit
8f2671d2cc
38 changed files with 885 additions and 751 deletions
|
@ -77,7 +77,7 @@ is_in_klist (struct key_item *k, PKT_signature *sig)
|
|||
|
||||
|
||||
/*-- trust.c --*/
|
||||
int cache_disabled_value (PKT_public_key *pk);
|
||||
int cache_disabled_value (ctrl_t ctrl, PKT_public_key *pk);
|
||||
void register_trusted_keyid (u32 *keyid);
|
||||
void register_trusted_key (const char *string);
|
||||
|
||||
|
@ -86,11 +86,12 @@ int string_to_trust_value (const char *str);
|
|||
const char *uid_trust_string_fixed (ctrl_t ctrl,
|
||||
PKT_public_key *key, PKT_user_id *uid);
|
||||
|
||||
unsigned int get_ownertrust (PKT_public_key *pk);
|
||||
void update_ownertrust (PKT_public_key *pk, unsigned int new_trust);
|
||||
int clear_ownertrusts (PKT_public_key *pk);
|
||||
unsigned int get_ownertrust (ctrl_t ctrl, PKT_public_key *pk);
|
||||
void update_ownertrust (ctrl_t ctrl,
|
||||
PKT_public_key *pk, unsigned int new_trust);
|
||||
int clear_ownertrusts (ctrl_t ctrl, PKT_public_key *pk);
|
||||
|
||||
void revalidation_mark (void);
|
||||
void revalidation_mark (ctrl_t ctrl);
|
||||
void check_trustdb_stale (ctrl_t ctrl);
|
||||
void check_or_update_trustdb (ctrl_t ctrl);
|
||||
|
||||
|
@ -102,14 +103,14 @@ int get_validity_info (ctrl_t ctrl, kbnode_t kb, PKT_public_key *pk,
|
|||
const char *get_validity_string (ctrl_t ctrl,
|
||||
PKT_public_key *pk, PKT_user_id *uid);
|
||||
|
||||
void mark_usable_uid_certs (kbnode_t keyblock, kbnode_t uidnode,
|
||||
void mark_usable_uid_certs (ctrl_t ctrl, kbnode_t keyblock, kbnode_t uidnode,
|
||||
u32 *main_kid, struct key_item *klist,
|
||||
u32 curtime, u32 *next_expire);
|
||||
|
||||
void clean_one_uid (kbnode_t keyblock, kbnode_t uidnode,
|
||||
void clean_one_uid (ctrl_t ctrl, kbnode_t keyblock, kbnode_t uidnode,
|
||||
int noisy, int self_only,
|
||||
int *uids_cleaned, int *sigs_cleaned);
|
||||
void clean_key (kbnode_t keyblock, int noisy, int self_only,
|
||||
void clean_key (ctrl_t ctrl, kbnode_t keyblock, int noisy, int self_only,
|
||||
int *uids_cleaned,int *sigs_cleaned);
|
||||
|
||||
|
||||
|
@ -127,16 +128,14 @@ void update_trustdb (ctrl_t ctrl);
|
|||
int setup_trustdb( int level, const char *dbname );
|
||||
void how_to_fix_the_trustdb (void);
|
||||
const char *trust_model_string (int model);
|
||||
gpg_error_t init_trustdb (int no_create);
|
||||
int have_trustdb (void);
|
||||
gpg_error_t init_trustdb (ctrl_t ctrl, int no_create);
|
||||
int have_trustdb (ctrl_t ctrl);
|
||||
void tdb_check_trustdb_stale (ctrl_t ctrl);
|
||||
void sync_trustdb( void );
|
||||
|
||||
void tdb_revalidation_mark (void);
|
||||
void tdb_revalidation_mark (ctrl_t ctrl);
|
||||
int trustdb_pending_check(void);
|
||||
void tdb_check_or_update (ctrl_t ctrl);
|
||||
|
||||
int tdb_cache_disabled_value (PKT_public_key *pk);
|
||||
int tdb_cache_disabled_value (ctrl_t ctrl, PKT_public_key *pk);
|
||||
|
||||
unsigned int tdb_get_validity_core (ctrl_t ctrl, kbnode_t kb,
|
||||
PKT_public_key *pk, PKT_user_id *uid,
|
||||
|
@ -149,22 +148,27 @@ int enum_cert_paths( void **context, ulong *lid,
|
|||
void enum_cert_paths_print( void **context, FILE *fp,
|
||||
int refresh, ulong selected_lid );
|
||||
|
||||
void read_trust_options(byte *trust_model,ulong *created,ulong *nextcheck,
|
||||
byte *marginals,byte *completes,byte *cert_depth,
|
||||
byte *min_cert_level);
|
||||
void read_trust_options (ctrl_t ctrl, byte *trust_model,
|
||||
ulong *created, ulong *nextcheck,
|
||||
byte *marginals, byte *completes, byte *cert_depth,
|
||||
byte *min_cert_level);
|
||||
|
||||
unsigned int tdb_get_ownertrust (PKT_public_key *pk, int no_create);
|
||||
unsigned int tdb_get_min_ownertrust (PKT_public_key *pk, int no_create);
|
||||
int get_ownertrust_info (PKT_public_key *pk, int no_create);
|
||||
const char *get_ownertrust_string (PKT_public_key *pk, int no_create);
|
||||
unsigned int tdb_get_ownertrust (ctrl_t ctrl, PKT_public_key *pk,
|
||||
int no_create);
|
||||
unsigned int tdb_get_min_ownertrust (ctrl_t ctrl, PKT_public_key *pk,
|
||||
int no_create);
|
||||
int get_ownertrust_info (ctrl_t ctrl, PKT_public_key *pk, int no_create);
|
||||
const char *get_ownertrust_string (ctrl_t ctrl,
|
||||
PKT_public_key *pk, int no_create);
|
||||
|
||||
void tdb_update_ownertrust (PKT_public_key *pk, unsigned int new_trust);
|
||||
int tdb_clear_ownertrusts (PKT_public_key *pk);
|
||||
void tdb_update_ownertrust (ctrl_t ctrl, PKT_public_key *pk,
|
||||
unsigned int new_trust);
|
||||
int tdb_clear_ownertrusts (ctrl_t ctrl, PKT_public_key *pk);
|
||||
|
||||
/*-- tdbdump.c --*/
|
||||
void list_trustdb (estream_t fp, const char *username);
|
||||
void export_ownertrust(void);
|
||||
void import_ownertrust(const char *fname);
|
||||
void list_trustdb (ctrl_t ctrl, estream_t fp, const char *username);
|
||||
void export_ownertrust (ctrl_t ctrl);
|
||||
void import_ownertrust (ctrl_t ctrl, const char *fname);
|
||||
|
||||
/*-- pkclist.c --*/
|
||||
int edit_ownertrust (ctrl_t ctrl, PKT_public_key *pk, int mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue