X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_file.c;h=c5d3ece2cae2a17aebcb3774968302d264f0159c;hb=5cb163e87c7f0717aa94ca281a56e572c2a6c8f3;hp=69c2b99051b24b199dfcbef0d8e0d252fa8f2a9b;hpb=2458360e75aa46091f60c16e041c07bffe2edefb;p=onak.git diff --git a/keydb_file.c b/keydb_file.c index 69c2b99..c5d3ece 100644 --- a/keydb_file.c +++ b/keydb_file.c @@ -13,8 +13,7 @@ * more details. * * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * this program. If not, see . */ #include @@ -22,6 +21,8 @@ #include #include #include +#include +#include #include #include #include @@ -31,9 +32,9 @@ #include "keydb.h" #include "keyid.h" #include "keystructs.h" -#include "ll.h" #include "log.h" #include "mem.h" +#include "onak.h" #include "onak-conf.h" #include "parsekey.h" @@ -142,20 +143,20 @@ static int file_store_key(struct onak_dbctx *dbctx, /** * delete_key - Given a keyid delete the key from storage. - * @keyid: The keyid to delete. + * @fp: The fingerprint of the key to delete. * @intrans: If we're already in a transaction. * * This function deletes a public key from whatever storage mechanism we * are using. Returns 0 if the key existed. */ static int file_delete_key(struct onak_dbctx *dbctx, - uint64_t keyid, bool intrans) + struct openpgp_fingerprint *fp, bool intrans) { char *db_dir = (char *) dbctx->priv; char keyfile[1024]; snprintf(keyfile, 1023, "%s/0x%" PRIX64, db_dir, - keyid & 0xFFFFFFFF); + fingerprint2keyid(fp) & 0xFFFFFFFF); return unlink(keyfile); }