summaryrefslogtreecommitdiffstats
path: root/sm/keydb.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2004-02-02 18:09:35 +0100
committerWerner Koch <wk@gnupg.org>2004-02-02 18:09:35 +0100
commit5bda9a8e74753da5d7ee912c32a0137ebce2abd8 (patch)
tree17d077c8da8a9cba7a1d9919f8021424fcbd9ece /sm/keydb.h
parentFix copyright line. (diff)
downloadgnupg2-5bda9a8e74753da5d7ee912c32a0137ebce2abd8.tar.xz
gnupg2-5bda9a8e74753da5d7ee912c32a0137ebce2abd8.zip
* keybox.h (keybox_flag_t): New.
* keybox-search.c (get_flag_from_image, keybox_get_flags): New. (_keybox_get_flag_location): New. * certchain.c (gpgsm_validate_chain): Mark revoked certs in the keybox. * keylist.c (list_cert_colon): New arg VALIDITY; use it to print a revoked flag. (list_internal_keys): Retrieve validity flag. (list_external_cb): Pass 0 as validity flag. * keydb.c (keydb_get_flags, keydb_set_flags): New. (keydb_set_cert_flags): New. (lock_all): Return a proper error code. (keydb_lock): New. (keydb_delete): Don't lock but check that it has been locked. (keydb_update_keyblock): Ditto. * delete.c (delete_one): Take a lock.
Diffstat (limited to 'sm/keydb.h')
-rw-r--r--sm/keydb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sm/keydb.h b/sm/keydb.h
index 0133d0ccd..2e9ed1573 100644
--- a/sm/keydb.h
+++ b/sm/keydb.h
@@ -27,6 +27,9 @@
typedef struct keydb_handle *KEYDB_HANDLE;
+/* Flag value used with KEYBOX_FLAG_VALIDITY. */
+#define VALIDITY_REVOKED (1<<5)
+
/*-- keydb.c --*/
int keydb_add_resource (const char *url, int force, int secret);
@@ -34,6 +37,7 @@ KEYDB_HANDLE keydb_new (int secret);
void keydb_release (KEYDB_HANDLE hd);
int keydb_set_ephemeral (KEYDB_HANDLE hd, int yes);
const char *keydb_get_resource_name (KEYDB_HANDLE hd);
+gpg_error_t keydb_lock (KEYDB_HANDLE hd);
#if 0 /* pgp stuff */
int keydb_get_keyblock (KEYDB_HANDLE hd, KBNODE *ret_kb);
@@ -41,6 +45,10 @@ int keydb_update_keyblock (KEYDB_HANDLE hd, KBNODE kb);
int keydb_insert_keyblock (KEYDB_HANDLE hd, KBNODE kb);
#endif
+gpg_error_t keydb_get_flags (KEYDB_HANDLE hd, int which, int idx,
+ unsigned int *value);
+gpg_error_t keydb_set_flags (KEYDB_HANDLE hd, int which, int idx,
+ unsigned int value);
int keydb_get_cert (KEYDB_HANDLE hd, ksba_cert_t *r_cert);
int keydb_insert_cert (KEYDB_HANDLE hd, ksba_cert_t cert);
int keydb_update_cert (KEYDB_HANDLE hd, ksba_cert_t cert);
@@ -64,6 +72,8 @@ int keydb_search_subject (KEYDB_HANDLE hd, const char *issuer);
int keydb_classify_name (const char *name, KEYDB_SEARCH_DESC *desc);
int keydb_store_cert (ksba_cert_t cert, int ephemeral, int *existed);
+gpg_error_t keydb_set_cert_flags (ksba_cert_t cert, int which, int idx,
+ unsigned int value);
#endif /*GNUPG_KEYDB_H*/