X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_keyd.c;h=d05c7f8998e2008455ce20fa6d27eb717936a075;hb=5cb3cfdb9d8caa6d7a4a1979c50c46896957b934;hp=1d10928fdec80146304ec50299329bb4d99662ae;hpb=ec3fd8971e87c82b2768b5b9dcbcd569edc3259b;p=onak.git diff --git a/keydb_keyd.c b/keydb_keyd.c index 1d10928..d05c7f8 100644 --- a/keydb_keyd.c +++ b/keydb_keyd.c @@ -116,7 +116,7 @@ static int keyd_fetch_key_id(struct onak_dbctx *dbctx, } static int keyd_fetch_key_fp(struct onak_dbctx *dbctx, - uint8_t *fp, size_t fpsize, + struct openpgp_fingerprint *fingerprint, struct openpgp_publickey **publickey, bool intrans) { @@ -128,16 +128,16 @@ static int keyd_fetch_key_fp(struct onak_dbctx *dbctx, ssize_t count = 0; uint8_t size; - if (fpsize > MAX_FINGERPRINT_LEN) { + if (fingerprint->length > MAX_FINGERPRINT_LEN) { return 0; } write(keyd_fd, &cmd, sizeof(cmd)); read(keyd_fd, &cmd, sizeof(cmd)); if (cmd == KEYD_REPLY_OK) { - size = fpsize; + size = fingerprint->length; write(keyd_fd, &size, sizeof(size)); - write(keyd_fd, fp, size); + write(keyd_fd, fingerprint->fp, size); keybuf.offset = 0; read(keyd_fd, &keybuf.size, sizeof(keybuf.size)); if (keybuf.size > 0) {