diff -r -c ./Makefile.in ../current/Makefile.in *** ./Makefile.in Wed Jun 2 06:31:19 1999 --- ../current/Makefile.in Mon Oct 4 22:18:15 1999 *************** *** 119,125 **** pgpsplit: pgpsplit.o $(PGPOBJS) $(UTILOBJS) ! kvcv: kvcv.o pgpfile.o $(PGPOBJS) $(UTILOBJS) kxa: kxa.o pgpfile.o $(PGPOBJS) $(UTILOBJS) --- 119,125 ---- pgpsplit: pgpsplit.o $(PGPOBJS) $(UTILOBJS) ! kvcv: kvcv.o pgpfile.o logging.o $(PGPOBJS) $(UTILOBJS) kxa: kxa.o pgpfile.o $(PGPOBJS) $(UTILOBJS) diff -r -c ./kd_generic.c ../current/kd_generic.c *** ./kd_generic.c Mon Oct 4 18:54:19 1999 --- ../current/kd_generic.c Mon Oct 4 22:40:47 1999 *************** *** 235,240 **** --- 235,241 ---- int kd_txn_commit(kd_txn tid, error *err) { int ret; + static int txn_count = 0; if (! tid) return(1); *************** *** 244,252 **** err->str = "Failed committing transaction"; return(0); } ! ! return(1); ! } int kd_txn_abort(kd_txn tid, error *err) { --- 245,268 ---- err->str = "Failed committing transaction"; return(0); } ! ! txn_count++; ! if (txn_count > KD_MAX_TXN_WO_CKPT) { ! int count; ! for (count=0; count<10; count++) { ! if ((ret = txn_checkpoint(dbenv.tx_info, 0, 0)) == DB_INCOMPLETE) { ! sleep(1); ! continue; ! } ! /* Only reset if successful */ ! txn_count = 0; ! break; ! } ! } ! ! return(1); ! } ! int kd_txn_abort(kd_txn tid, error *err) { diff -r -c ./kd_index.c ../current/kd_index.c *** ./kd_index.c Mon Oct 4 18:54:22 1999 --- ../current/kd_index.c Mon Oct 4 22:42:19 1999 *************** *** 54,59 **** --- 54,63 ---- gfu_state gfus; char buf[512]; + if (se->keyid.buf == NULL) { + return xbuffer_append_str(s->xb, "sig ???????? (Don't understand X.509 signatures yet)\n"); + } + llist_alloc(&keys); err.str = err.buf; diff -r -c ./kd_internal.h ../current/kd_internal.h *** ./kd_internal.h Mon Oct 4 18:54:24 1999 --- ../current/kd_internal.h Mon Oct 4 22:36:27 1999 *************** *** 11,16 **** --- 11,19 ---- #include #include "llist.h" + /* Checkpoint after so many successful transactions */ + #define KD_MAX_TXN_WO_CKPT 256 + /* keydb elements will be allocated with exponential size, starting with the min_alloc, until the max_alloc elements is reached, then the size will be incremented linearly by max_alloc elements. These diff -r -c ./kd_search.c ../current/kd_search.c *** ./kd_search.c Mon Oct 4 18:54:24 1999 --- ../current/kd_search.c Mon Oct 4 22:33:16 1999 *************** *** 379,389 **** long sig_time; sigs_elem *se; int ret; ! if (s->ignoring) break; /* extract the keyid and sigclass from the signature */ if (!decode_sig(packet, plen, &keyid, &sigclass, &sig_time)) { soft_err(s, --- 379,395 ---- long sig_time; sigs_elem *se; int ret; ! static unsigned char maxid[8] = {0xff, 0xff, 0xff, 0xff, ! 0xff, 0xff, 0xff, 0xff}; if (s->ignoring) break; /* extract the keyid and sigclass from the signature */ + + /* if no keyid is found, take maxid */ + keyid.data = maxid; + keyid.size = 8; + keyid.offset = 0; if (!decode_sig(packet, plen, &keyid, &sigclass, &sig_time)) { soft_err(s, diff -r -c ./kvcv.c ../current/kvcv.c *** ./kvcv.c Wed May 26 03:35:27 1999 --- ../current/kvcv.c Mon Oct 4 22:28:33 1999 *************** *** 10,15 **** --- 10,16 ---- #include #include + #include "globals.h" #include "pgputil.h" #include "md5.h" #include "pgpfile.h" *************** *** 30,37 **** long ptype, plen; struct state *s = (struct state *) c; ! if (!decode_psf(packet, &ptype, &plen)) ! return(0); switch (ptype) { case 6: --- 31,41 ---- long ptype, plen; struct state *s = (struct state *) c; ! if (!decode_psf(packet, &ptype, &plen)) { ! log_error("decode_psf", ""); ! return(0); ! } ! switch (ptype) { case 6: *************** *** 52,59 **** time_t create_time; if (!decode_pubkey(packet, plen, &m, &e, NULL, &keytype, ! &create_time)) return(0); switch (keytype) { case 1: --- 56,65 ---- time_t create_time; if (!decode_pubkey(packet, plen, &m, &e, NULL, &keytype, ! &create_time)) { ! log_error("decode_pubkey", ""); return(0); + } switch (keytype) { case 1: *************** *** 77,84 **** int i; ddesc userid; ! if (!decode_userid(packet, plen, &userid)) return(0); if (s->got_userid) { printf(" %.*s\n", --- 83,92 ---- int i; ddesc userid; ! if (!decode_userid(packet, plen, &userid)) { ! log_error("decode_pubkey", ""); return(0); + } if (s->got_userid) { printf(" %.*s\n", *************** *** 93,100 **** struct tm *c_tm; if (!decode_pubkey(&(s->pubkey), s->pubkeylen, &modulus, ! &exponent, NULL, &keytype, &create_time)) return(0); if (keytype == 16 || keytype == 17) { shsInit(&sha); --- 101,110 ---- struct tm *c_tm; if (!decode_pubkey(&(s->pubkey), s->pubkeylen, &modulus, ! &exponent, NULL, &keytype, &create_time)) { ! log_error("decode_pubkey 2", ""); return(0); + } if (keytype == 16 || keytype == 17) { shsInit(&sha); *************** *** 158,178 **** /* signature packet */ { ddesc keyid; long sigclass; time_t sigtime; int i; ! if (!decode_sig(packet, plen, &keyid, &sigclass, &sigtime)) return(0); ! if (sigclass == 0x20) { /* key revoked */ s->got_revoke = 1; } else if (sigclass == 0x10) { printf("sig "); for (i=4; i<8; i++) printf("%02X", keyid.data[i]); ! printf(" (can't do uid->name conversion yet)\n"); } else if (sigclass == 0x18) { printf(" (subkey signature)\n"); } else { --- 168,194 ---- /* signature packet */ { ddesc keyid; + /* Point to "null" by default */ long sigclass; time_t sigtime; int i; ! keyid.data = NULL; ! if (!decode_sig(packet, plen, &keyid, &sigclass, &sigtime)) { ! log_error("decode_sig", ""); return(0); + } ! if (keyid.data == NULL) { ! printf("sig ???????? (Don't understand X.509 signatures yet)\n"); ! } else if (sigclass == 0x20) { /* key revoked */ s->got_revoke = 1; } else if (sigclass == 0x10) { printf("sig "); for (i=4; i<8; i++) printf("%02X", keyid.data[i]); ! printf(" (can't do keyid->name conversion yet)\n"); } else if (sigclass == 0x18) { printf(" (subkey signature)\n"); } else { *************** *** 196,198 **** --- 212,221 ---- return(decode_file(data, kvcv, (void *) &s)); } + + /* These are just dummy, for the linker */ + void kd_close(void) + { + } + + int debug; diff -r -c ./mail_req.c ../current/mail_req.c *** ./mail_req.c Mon Oct 4 18:54:29 1999 --- ../current/mail_req.c Mon Oct 4 22:33:17 1999 *************** *** 487,493 **** since -= 86400*days; ! ret = kd_since(since, 0, conf->max_reply_keys, NULL, &retstr, &ret_len); if (ret) { --- 487,493 ---- since -= 86400*days; ! ret = kd_since(since, 0, conf->max_last_reply_keys, NULL, &retstr, &ret_len); if (ret) { diff -r -c ./mail_req.h ../current/mail_req.h *** ./mail_req.h Thu May 20 03:39:51 1999 --- ../current/mail_req.h Mon Oct 4 22:33:17 1999 *************** *** 15,20 **** --- 15,21 ---- mail_send_conf *msc; pks_incr_conf *pic; int max_last; + int max_last_reply_keys; int max_reply_keys; } mail_req_conf; diff -r -c ./mkpksdconf.in ../current/mkpksdconf.in *** ./mkpksdconf.in Wed Jun 2 06:04:33 1999 --- ../current/mkpksdconf.in Mon Oct 4 22:33:17 1999 *************** *** 49,55 **** ### to allow any argument to LAST. # max_last -1 ### Set this to the maximum number of keys to return in the reply to ! ### an index, verbose index, get, or since reply. Setting it to -1 ### will allow any size reply. # max_reply_keys -1 EOF --- 49,58 ---- ### to allow any argument to LAST. # max_last -1 ### Set this to the maximum number of keys to return in the reply to ! ### a last query. Setting it to -1 will allow any size reply. ! # max_last_reply_keys -1 ! ### Set this to the maximum number of keys to return in the reply to ! ### an index, verbose index, or get query. Setting it to -1 ### will allow any size reply. # max_reply_keys -1 EOF diff -r -c ./pgpsplit.c ../current/pgpsplit.c *** ./pgpsplit.c Mon Oct 4 18:54:31 1999 --- ../current/pgpsplit.c Mon Oct 4 22:17:46 1999 *************** *** 79,84 **** --- 79,86 ---- s.maxbytes = 0; s.filenamebase = NULL; + s.f = NULL; + s.filenum = 0; for (i=1; imax_last)) else if (num_conf(max_reply_keys_str, max_reply_keys_len, pc->max_reply_keys)) + else if (num_conf(max_last_reply_keys_str, max_last_reply_keys_len, + pc->max_last_reply_keys)) else if (llist_conf(syncsite_str, syncsite_len, &(pc->syncsites))) else if (num_conf(debug_str, debug_len, debug)) } diff -r -c ./pks_config.h ../current/pks_config.h *** ./pks_config.h Thu May 20 03:39:52 1999 --- ../current/pks_config.h Mon Oct 4 22:33:17 1999 *************** *** 32,37 **** --- 32,38 ---- /* policy stuff */ int max_last; + int max_last_reply_keys; int max_reply_keys; } pks_config; diff -r -c ./pksd.c ../current/pksd.c *** ./pksd.c Mon May 31 20:21:20 1999 --- ../current/pksd.c Mon Oct 4 22:33:17 1999 *************** *** 78,83 **** --- 78,84 ---- mrc.msc = &msc; mrc.pic = &pic; mrc.max_last = pc.max_last; + mrc.max_last_reply_keys = pc.max_last_reply_keys; mrc.max_reply_keys = pc.max_reply_keys; psc.socket = pc.socket_name;