1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#include <stdio.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include "armor.h"
#include "charfuncs.h"
#include "keydb.h"
#include "keyid.h"
#include "keyindex.h"
#include "keystructs.h"
#include "parsekey.h"
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, 0);
*/
fputs("Doing dearmor_openpgp_stream():\n", stderr);
dearmor_openpgp_stream(stdin_getchar, NULL, &packets);
fputs("Doing armor_openpgp_stream():\n", stderr);
armor_openpgp_stream(stdout_putchar, NULL, packets);
/*
fputs("Doing parse_keys():\n", stderr);
parse_keys(packets, &keys);
printf("Key id is 0x%llX\n", get_keyid(keys));
key_index(keys, true, false, false);
initdb(true);
fetch_key(get_keyid(keys), &newkeys);
cleanupdb();
printf("New key id is 0x%llX\n", get_keyid(newkeys));
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;
}
|