X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_keyd.c;h=597507e5e78d3ecb41b8043c9be162dfe65a9d62;hb=5cb163e87c7f0717aa94ca281a56e572c2a6c8f3;hp=7d3754a837693d26e610b3e2150471c9ce06aeae;hpb=0e9ae75e964c98041e5d8279efacd96282c703ac;p=onak.git diff --git a/keydb_keyd.c b/keydb_keyd.c index 7d3754a..597507e 100644 --- a/keydb_keyd.c +++ b/keydb_keyd.c @@ -13,12 +13,13 @@ * 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 #include +#include +#include #include #include #include @@ -34,6 +35,7 @@ #include "keystructs.h" #include "log.h" #include "mem.h" +#include "onak.h" #include "onak-conf.h" #include "parsekey.h" @@ -185,19 +187,19 @@ static int keyd_fetch_key_fp(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 keyd_delete_key(struct onak_dbctx *dbctx, - uint64_t keyid, bool intrans) + struct openpgp_fingerprint *fp, bool intrans) { int keyd_fd = (intptr_t) dbctx->priv; if (keyd_send_cmd(keyd_fd, KEYD_CMD_DELETE)) { - write(keyd_fd, &keyid, sizeof(keyid)); + write(keyd_fd, fp, sizeof(*fp)); } return 0;