X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=main.c;h=b140c8edc9b7ac3740a50a834329f98aa003b5da;hb=576754568dc383e78065e88e05eeb2d078524f9c;hp=c7bfe28d5fc0b70357e7c257b8f685eb1da0e6fe;hpb=1044f25379a43ce9cc5cd3b780abfdbcf49b06d5;p=onak.git diff --git a/main.c b/main.c index c7bfe28..b140c8e 100644 --- a/main.c +++ b/main.c @@ -23,38 +23,41 @@ int putnextchar(void *ctx, size_t count, unsigned char *c) int main(int argc, char *argv[]) { - struct openpgp_packet_list *packets = NULL; //, *newpackets = NULL; -// struct openpgp_packet_list *list_end = NULL; -// struct openpgp_publickey *keys = NULL; -// struct openpgp_publickey *newkeys = NULL; -// void *ctx = NULL; - -// fputs("Doing read_openpgp_stream():\n", stderr); -// read_openpgp_stream(getnextchar, ctx, &packets); - + struct openpgp_packet_list *packets = NULL; +/* + , *newpackets = NULL; + struct openpgp_packet_list *list_end = NULL; + struct openpgp_publickey *keys = NULL; + struct openpgp_publickey *newkeys = NULL; + void *ctx = NULL; + + fputs("Doing read_openpgp_stream():\n", stderr); + read_openpgp_stream(getnextchar, ctx, &packets); +*/ fputs("Doing dearmor_openpgp_stream():\n", stderr); dearmor_openpgp_stream(getnextchar, NULL, &packets); fputs("Doing armor_openpgp_stream():\n", stderr); armor_openpgp_stream(putnextchar, NULL, packets); -// fputs("Doing parse_keys():\n", stderr); -// parse_keys(packets, &keys); - -// printf("Key id is 0x%llX\n", get_keyid(keys)); +/* + fputs("Doing parse_keys():\n", stderr); + parse_keys(packets, &keys); -// key_index(keys, true, false, false); + printf("Key id is 0x%llX\n", get_keyid(keys)); -// initdb(); -// fetch_key(get_keyid(keys), &newkeys); -// cleanupdb(); + key_index(keys, true, false, false); -// printf("New key id is 0x%llX\n", get_keyid(newkeys)); + initdb(); + fetch_key(get_keyid(keys), &newkeys); + cleanupdb(); -// fputs("Doing flatten_publickey():\n", stderr); -// flatten_publickey(keys, &newpackets, &list_end); + printf("New key id is 0x%llX\n", get_keyid(newkeys)); -// fputs("Doing write_openpgp_stream():\n", stderr); -// write_openpgp_stream(putnextchar, ctx, newpackets); + fputs("Doing flatten_publickey():\n", stderr); + flatten_publickey(keys, &newpackets, &list_end); + fputs("Doing write_openpgp_stream():\n", stderr); + write_openpgp_stream(putnextchar, ctx, newpackets); +*/ return 0; }