summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1044f25)
Author: noodles
Date: 2003/06/08 19:04:31
Further compile warning (under gcc 3.3 anyway) cleanups.
*
* Copyright 2001-2002 Project Purple.
*
*
* Copyright 2001-2002 Project Purple.
*
- * $Id: gpgwww.c,v 1.10 2003/06/04 20:57:08 noodles Exp $
+ * $Id: gpgwww.c,v 1.11 2003/06/08 19:04:31 noodles Exp $
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include "getcgi.h"
#include "hash.h"
#include "getcgi.h"
#include "hash.h"
*
* Copyright 2002 Project Purple
*
*
* Copyright 2002 Project Purple
*
- * $Id: keyindex.c,v 1.10 2003/06/04 22:11:40 noodles Exp $
+ * $Id: keyindex.c,v 1.11 2003/06/08 19:04:32 noodles Exp $
keys->publickey->data[0]);
}
keys->publickey->data[0]);
}
- printf(":%d:%d:%d::\n",
+ printf(":%d:%d:%ld::\n",
type,
length,
created_time);
type,
length,
created_time);
*
* Copyright 2002 Project Purple
*
*
* Copyright 2002 Project Purple
*
- * $Id: keyindex.h,v 1.5 2003/06/04 20:57:09 noodles Exp $
+ * $Id: keyindex.h,v 1.6 2003/06/08 19:04:32 noodles Exp $
*/
#ifndef __KEYINDEX_H__
*/
#ifndef __KEYINDEX_H__
int key_index(struct openpgp_publickey *keys, bool verbose,
bool fingerprint, bool html);
int key_index(struct openpgp_publickey *keys, bool verbose,
bool fingerprint, bool html);
+/**
+ * mrkey_index - List a set of OpenPGP keys in the MRHKP format.
+ * @keys: The keys to display.
+ *
+ * This function takes a list of OpenPGP public keys and displays a
+ * machine readable list of them.
+ */
+int mrkey_index(struct openpgp_publickey *keys);
int main(int argc, char *argv[])
{
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 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);
+*/
*
* Copyright 2002 Project Purple
*
*
* Copyright 2002 Project Purple
*
- * $Id: parsekey.c,v 1.7 2003/06/04 20:57:12 noodles Exp $
+ * $Id: parsekey.c,v 1.8 2003/06/08 19:04:32 noodles Exp $
curpacket->packet->newformat = (curchar & 0x40);
curpacket->packet->newformat = (curchar & 0x40);
- // TODO: Better error checking on getchar_func.
+ /*
+ * TODO: Better error checking on getchar_func.
+ */
if (curpacket->packet->newformat) {
curpacket->packet->tag = (curchar & 0x3F);
rc = getchar_func(ctx, 1, &curchar);
if (curpacket->packet->newformat) {
curpacket->packet->tag = (curchar & 0x3F);
rc = getchar_func(ctx, 1, &curchar);
- putchar_func(ctx, packets->packet->length, packets->packet->data);
-// for (i = 0; i < packets->packet->length; i++) {
-// putchar_func(ctx, packets->packet->data[i]);
-// }
+ putchar_func(ctx, packets->packet->length,
+ packets->packet->data);
packets = packets->next;
}
return 0;
packets = packets->next;
}
return 0;