#include "mem.h"
#include "merge.h"
#include "onak-conf.h"
+#include "openpgp.h"
#include "parsekey.h"
#include "sendsync.h"
return -1;
}
+static int dynamic_fetch_key_skshash(const struct skshash *hash,
+ struct openpgp_publickey **publickey)
+{
+ if (loaded_backend == NULL) {
+ load_backend();
+ }
+
+ if (loaded_backend != NULL) {
+ if (loaded_backend->fetch_key_skshash != NULL) {
+ return loaded_backend->fetch_key_skshash(hash,
+ publickey);
+ }
+ }
+
+ return -1;
+}
+
static int dynamic_iterate_keys(void (*iterfunc)(void *ctx,
struct openpgp_publickey *key), void *ctx)
{
if (dynamic_fetch_key(keyid, &publickey, false) && publickey != NULL) {
curuid = publickey->uids;
while (curuid != NULL && buf[0] == 0) {
- if (curuid->packet->tag == 13) {
+ if (curuid->packet->tag == OPENPGP_PACKET_UID) {
snprintf(buf, 1023, "%.*s",
(int) curuid->packet->length,
curuid->packet->data);
.endtrans = dynamic_endtrans,
.fetch_key = dynamic_fetch_key,
.fetch_key_text = dynamic_fetch_key_text,
+ .fetch_key_skshash = dynamic_fetch_key_skshash,
.store_key = dynamic_store_key,
.update_keys = dynamic_update_keys,
.delete_key = dynamic_delete_key,