#include "charfuncs.h"
#include "keystructs.h"
-#include "log.h"
#include "mem.h"
-#include "onak-conf.h"
#include "openpgp.h"
#include "parsekey.h"
struct openpgp_packet_list *packets = NULL;
struct openpgp_packet_list *list_end = NULL;
struct openpgp_packet_list *tmp = NULL;
- int result = 0;
int maxkeys = 10000;
int outfd = -1;
int count = 0;
}
}
- readconfig(NULL);
- initlogthing("splitkeys", config.logfile);
-
do {
- result = read_openpgp_stream(stdin_getchar, NULL,
+ read_openpgp_stream(stdin_getchar, NULL,
&packets, maxkeys);
if (packets != NULL) {
list_end = packets;
tmp->next = NULL;
}
}
- if (tmp->next != NULL) {
+ if (tmp != NULL && tmp->next != NULL) {
list_end = NULL;
}
}
} while (packets != NULL);
- cleanuplogthing();
- cleanupconfig();
-
return 0;
}