X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/4e6e01880ca7595d84ae87c169756a2c308a9946..981bf1273304e1bc6604ea22b6ab4bd9ae07974b:/key.h diff --git a/key.h b/key.h index 8629a57..05ba9a3 100644 --- a/key.h +++ b/key.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: key.h,v 1.9 2001/06/22 19:37:59 mdw Exp $ + * $Id: key.h,v 1.10 2004/04/08 01:02:49 mdw Exp $ * * Simple key management * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: key.h,v $ + * Revision 1.10 2004/04/08 01:02:49 mdw + * key-binary.c + * * Revision 1.9 2001/06/22 19:37:59 mdw * New interface to enquire whether a key has expired. * @@ -81,6 +84,10 @@ # include "key-data.h" #endif +#ifndef CATACOMB_GHASH_H +# include "ghash.h" +#endif + #ifndef CATACOMB_MP_H # include "mp.h" #endif @@ -200,6 +207,7 @@ enum { KERR_BADPASS = -10, /* Error decrypting locked key */ KERR_WRONGTYPE = -11, /* Key has incorrect type */ KERR_NOTFOUND = -12, /* Key couldn't be found */ + KERR_BADATTR = -13, /* Malformed attribute name */ KERR_MAX /* Largest possible error */ }; @@ -420,6 +428,20 @@ extern int key_expire(key_file */*f*/, key */*k*/); extern int key_used(key_file */*f*/, key */*k*/, time_t /*t*/); +/* --- @key_fingerprint@ --- * + * + * Arguments: @key *k@ = the key to fingerprint + * @ghash *h@ = the hash to use + * @const key_filter *kf@ = filter to apply + * + * Returns: Nonzero if the key slightly matched the filter. + * + * Use: Updates the hash context with the key contents. + */ + +extern int key_fingerprint(key */*k*/, ghash */*h*/, + const key_filter */*kf*/); + /*----- Setting and reading attributes ------------------------------------*/ /* --- @key_chkident@ --- *