projects
/
onak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix db4 backend - we weren't actually providing a suitable dbfuncs struct.
[onak.git]
/
main.c
diff --git
a/main.c
b/main.c
index 33b193d7a458fd8afe500298548360771f0916d5..f9c7c8ec87967152fa44d9af5214d31028b9c145 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-4,57
+4,50
@@
#include <unistd.h>
#include "armor.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"
#include "keydb.h"
#include "keyid.h"
#include "keyindex.h"
#include "keystructs.h"
#include "parsekey.h"
-int getnextchar(void *ctx, size_t count, unsigned char *c)
-{
- return (!read(0, c, count));
-}
-
-int putnextchar(void *ctx, unsigned char c)
-{
- return (!write(1, &c, 1));
-}
-
-
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- struct openpgp_packet_list *packets = NULL, *newpackets = NULL;
+ 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;
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 read_openpgp_stream():\n", stderr);
+
read_openpgp_stream(getnextchar, ctx, &packets, 0
);
+*/
fputs("Doing dearmor_openpgp_stream():\n", stderr);
fputs("Doing dearmor_openpgp_stream():\n", stderr);
- dearmor_openpgp_stream(
getnex
tchar, NULL, &packets);
+ dearmor_openpgp_stream(
stdin_ge
tchar, NULL, &packets);
fputs("Doing armor_openpgp_stream():\n", stderr);
fputs("Doing armor_openpgp_stream():\n", stderr);
- armor_openpgp_stream(putnextchar, NULL, packets);
-
-// fputs("Doing parse_keys():\n", stderr);
-// parse_keys(packets, &keys);
+ armor_openpgp_stream(stdout_putchar, NULL, packets);
-// 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(true);
+ 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;
}
return 0;
}