#include "charfuncs.h"
#include "cleankey.h"
#include "cleanup.h"
-#include "config.h"
#include "getcgi.h"
#include "keydb.h"
#include "keyindex.h"
#include "onak-conf.h"
#include "parsekey.h"
#include "photoid.h"
+#include "version.h"
#define OP_UNKNOWN 0
#define OP_GET 1
readconfig(NULL);
initlogthing("lookup", config.logfile);
catchsignals();
- config.dbbackend->initdb(true);
+ config.dbbackend->initdb(false);
switch (op) {
case OP_GET:
if (ishex) {
logthing(LOGTHING_NOTICE,
- "Getting keyid 0x%llX",
+ "Getting keyid 0x%" PRIX64,
keyid);
result = config.dbbackend->fetch_key(keyid,
&publickey, false);
unsigned char *photo = NULL;
size_t length = 0;
- if (getphoto(publickey, 0, &photo, &length)) {
+ if (getphoto(publickey, indx, &photo,
+ &length)) {
fwrite(photo,
1,
length,
}
if (!mrhkp) {
puts("<hr>");
- puts("Produced by onak " PACKAGE_VERSION
+ puts("Produced by onak " ONAK_VERSION
" by Jonathan McDowell");
end_html();
}