[Pkg-sks-commit] r238 - in sks/trunk/sks: . bdb sampleConfig sampleConfig/debian sampleWeb sampleWeb/HTML5 sampleWeb/OpenPKG sampleWeb/XHTML+ES

Christoph Martin chrism at alioth.debian.org
Wed Jun 20 09:04:11 UTC 2012


Author: chrism
Date: 2012-06-20 09:04:11 +0000 (Wed, 20 Jun 2012)
New Revision: 238

Added:
   sks/trunk/sks/ANNOUNCEMENT
   sks/trunk/sks/sampleConfig/
   sks/trunk/sks/sampleConfig/DB_CONFIG
   sks/trunk/sks/sampleConfig/aliases.sample
   sks/trunk/sks/sampleConfig/crontab.sample
   sks/trunk/sks/sampleConfig/debian/
   sks/trunk/sks/sampleConfig/debian/README
   sks/trunk/sks/sampleConfig/debian/forward.exim
   sks/trunk/sks/sampleConfig/debian/forward.postfix
   sks/trunk/sks/sampleConfig/debian/mailsync
   sks/trunk/sks/sampleConfig/debian/membership
   sks/trunk/sks/sampleConfig/debian/procmail
   sks/trunk/sks/sampleConfig/debian/sksconf
   sks/trunk/sks/sampleConfig/mailsync
   sks/trunk/sks/sampleConfig/membership
   sks/trunk/sks/sampleConfig/procmailrc
   sks/trunk/sks/sampleConfig/rc.sks
   sks/trunk/sks/sampleConfig/sksconf.minimal
   sks/trunk/sks/sampleConfig/sksconf.typical
   sks/trunk/sks/sampleWeb/
   sks/trunk/sks/sampleWeb/HTML5/
   sks/trunk/sks/sampleWeb/HTML5/README
   sks/trunk/sks/sampleWeb/HTML5/index.html
   sks/trunk/sks/sampleWeb/HTML5/robots.txt
   sks/trunk/sks/sampleWeb/OpenPKG/
   sks/trunk/sks/sampleWeb/OpenPKG/README
   sks/trunk/sks/sampleWeb/OpenPKG/index.html
   sks/trunk/sks/sampleWeb/OpenPKG/robots.txt
   sks/trunk/sks/sampleWeb/XHTML+ES/
   sks/trunk/sks/sampleWeb/XHTML+ES/README
   sks/trunk/sks/sampleWeb/XHTML+ES/index.xhtml
   sks/trunk/sks/sampleWeb/XHTML+ES/robots.txt
   sks/trunk/sks/sampleWeb/XHTML+ES/script.es
   sks/trunk/sks/sks_build.bc.sh
   sks/trunk/sks/smtp_script.py
Removed:
   sks/trunk/sks/.depend
Modified:
   sks/trunk/sks/CHANGELOG
   sks/trunk/sks/Makefile
   sks/trunk/sks/README
   sks/trunk/sks/VERSION
   sks/trunk/sks/bdb/bdb.ml
   sks/trunk/sks/bdb/bdb_stubs.c
   sks/trunk/sks/common.ml
   sks/trunk/sks/dbserver.ml
   sks/trunk/sks/eventloop.ml
   sks/trunk/sks/fingerprint.ml
   sks/trunk/sks/htmlTemplates.ml
   sks/trunk/sks/index.ml
   sks/trunk/sks/keydb.ml
   sks/trunk/sks/prefix_test.ml
   sks/trunk/sks/reconComm.ml
   sks/trunk/sks/reconserver.ml
   sks/trunk/sks/recoverList.ml
   sks/trunk/sks/request.ml
   sks/trunk/sks/script.ml
   sks/trunk/sks/settings.ml
   sks/trunk/sks/sks.ml
   sks/trunk/sks/sks.pod
   sks/trunk/sks/sks_build.sh
   sks/trunk/sks/sksdump.ml
   sks/trunk/sks/stats.ml
   sks/trunk/sks/utils.ml
   sks/trunk/sks/wserver.ml
Log:
Incorporate new upstream release


Deleted: sks/trunk/sks/.depend
===================================================================
--- sks/trunk/sks/.depend	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/.depend	2012-06-20 09:04:11 UTC (rev 238)
@@ -1,290 +0,0 @@
-add_mail.cmo: pSet.cmi pMap.cmi 
-add_mail.cmx: pSet.cmx pMap.cmx 
-armor.cmo: key.cmo common.cmo 
-armor.cmx: key.cmx common.cmx 
-bdbwrap.cmo: common.cmo 
-bdbwrap.cmx: common.cmx 
-bitstring.cmo: utils.cmo 
-bitstring.cmx: utils.cmx 
-bugscript.cmo: zZp.cmi reconPTreeDb.cmo pSet.cmi keyHash.cmo common.cmo 
-bugscript.cmx: zZp.cmx reconPTreeDb.cmx pSet.cmx keyHash.cmx common.cmx 
-build.cmo: settings.cmo packet.cmo pSet.cmi mTimer.cmi keydb.cmo key.cmo \
-    fixkey.cmo common.cmo channel.cmi 
-build.cmx: settings.cmx packet.cmx pSet.cmx mTimer.cmx keydb.cmx key.cmx \
-    fixkey.cmx common.cmx channel.cmx 
-catchup.cmo: reconComm.cmo pTreeDB.cmo eventloop.cmo dbMessages.cmo \
-    common.cmo 
-catchup.cmx: reconComm.cmx pTreeDB.cmx eventloop.cmx dbMessages.cmx \
-    common.cmx 
-channel.cmo: common.cmo channel.cmi 
-channel.cmx: common.cmx channel.cmi 
-clean_keydb.cmo: settings.cmo packet.cmo pSet.cmi pMap.cmi mList.cmi \
-    keydb.cmo keyHash.cmo key.cmo fixkey.cmo fingerprint.cmo common.cmo \
-    channel.cmi 
-clean_keydb.cmx: settings.cmx packet.cmx pSet.cmx pMap.cmx mList.cmx \
-    keydb.cmx keyHash.cmx key.cmx fixkey.cmx fingerprint.cmx common.cmx \
-    channel.cmx 
-client.cmo: settings.cmo reconMessages.cmo prefixTree.cmo pSet.cmi pMap.cmi \
-    mTimer.cmi eventloop.cmo common.cmo bitstring.cmo 
-client.cmx: settings.cmx reconMessages.cmx prefixTree.cmx pSet.cmx pMap.cmx \
-    mTimer.cmx eventloop.cmx common.cmx bitstring.cmx 
-cMarshal.cmo: zZp.cmi channel.cmi bitstring.cmo 
-cMarshal.cmx: zZp.cmx channel.cmx bitstring.cmx 
-common.cmo: utils.cmo settings.cmo pMap.cmi 
-common.cmx: utils.cmx settings.cmx pMap.cmx 
-dbMessages.cmo: utils.cmo packet.cmo pSet.cmi msgContainer.cmo key.cmo \
-    common.cmo cMarshal.cmo 
-dbMessages.cmx: utils.cmx packet.cmx pSet.cmx msgContainer.cmx key.cmx \
-    common.cmx cMarshal.cmx 
-dbscript.cmo: settings.cmo packet.cmo keydb.cmo common.cmo 
-dbscript.cmx: settings.cmx packet.cmx keydb.cmx common.cmx 
-dbserver.cmo: wserver.cmo utils.cmo stats.cmo settings.cmo sendmail.cmo \
-    request.cmo rMisc.cmo pstyle.cmo parsePGP.cmo packet.cmo membership.cmi \
-    mailsync.cmo mRindex.cmo mList.cmi keydb.cmo keyMerge.cmo keyHash.cmo \
-    key.cmo index.cmo htmlTemplates.cmo fixkey.cmo fingerprint.cmo \
-    eventloop.cmo ehandlers.cmo dbMessages.cmo common.cmo channel.cmi \
-    cMarshal.cmo armor.cmo 
-dbserver.cmx: wserver.cmx utils.cmx stats.cmx settings.cmx sendmail.cmx \
-    request.cmx rMisc.cmx pstyle.cmx parsePGP.cmx packet.cmx membership.cmx \
-    mailsync.cmx mRindex.cmx mList.cmx keydb.cmx keyMerge.cmx keyHash.cmx \
-    key.cmx index.cmx htmlTemplates.cmx fixkey.cmx fingerprint.cmx \
-    eventloop.cmx ehandlers.cmx dbMessages.cmx common.cmx channel.cmx \
-    cMarshal.cmx armor.cmx 
-dbtest.cmo: settings.cmo packet.cmo keydb.cmo keyMerge.cmo common.cmo 
-dbtest.cmx: settings.cmx packet.cmx keydb.cmx keyMerge.cmx common.cmx 
-decode.cmo: zZp.cmi prime.cmo poly.cmo number.cmi linearAlg.cmo 
-decode.cmx: zZp.cmx prime.cmx poly.cmx number.cmx linearAlg.cmx 
-decode_test.cmo: zZp.cmi rMisc.cmo poly.cmo decode.cmo common.cmo 
-decode_test.cmx: zZp.cmx rMisc.cmx poly.cmx decode.cmx common.cmx 
-ehandlers.cmo: eventloop.cmo common.cmo 
-ehandlers.cmx: eventloop.cmx common.cmx 
-eventloop.cmo: packet.cmo heap.cmi common.cmo 
-eventloop.cmx: packet.cmx heap.cmx common.cmx 
-fastbuild.cmo: settings.cmo packet.cmo pSet.cmi mTimer.cmi keydb.cmo key.cmo \
-    fixkey.cmo common.cmo channel.cmi 
-fastbuild.cmx: settings.cmx packet.cmx pSet.cmx mTimer.cmx keydb.cmx key.cmx \
-    fixkey.cmx common.cmx channel.cmx 
-fingerprint.cmo: utils.cmo parsePGP.cmo packet.cmo pSet.cmi channel.cmi 
-fingerprint.cmx: utils.cmx parsePGP.cmx packet.cmx pSet.cmx channel.cmx 
-fixkey.cmo: utils.cmo parsePGP.cmo packet.cmo keyMerge.cmo common.cmo 
-fixkey.cmx: utils.cmx parsePGP.cmx packet.cmx keyMerge.cmx common.cmx 
-foo.cmo: zZp.cmi number.cmi 
-foo.cmx: zZp.cmx number.cmx 
-fqueue.cmo: 
-fqueue.cmx: 
-getfileopts.cmo: settings.cmo pstyle.cmo 
-getfileopts.cmx: settings.cmx pstyle.cmx 
-heap.cmo: heap.cmi 
-heap.cmx: heap.cmi 
-htmlTemplates.cmo: packet.cmo channel.cmi 
-htmlTemplates.cmx: packet.cmx channel.cmx 
-incdump.cmo: utils.cmo settings.cmo packet.cmo pSet.cmi keydb.cmo common.cmo 
-incdump.cmx: utils.cmx settings.cmx packet.cmx pSet.cmx keydb.cmx common.cmx 
-index.cmo: utils.cmo stats.cmo settings.cmo request.cmo pstyle.cmo \
-    parsePGP.cmo packet.cmo pMap.cmi keyMerge.cmo keyHash.cmo \
-    htmlTemplates.cmo fingerprint.cmo eventloop.cmo common.cmo channel.cmi 
-index.cmx: utils.cmx stats.cmx settings.cmx request.cmx pstyle.cmx \
-    parsePGP.cmx packet.cmx pMap.cmx keyMerge.cmx keyHash.cmx \
-    htmlTemplates.cmx fingerprint.cmx eventloop.cmx common.cmx channel.cmx 
-int_comparators.cmo: 
-int_comparators.cmx: 
-keydb.cmo: settings.cmo sStream.cmo packet.cmo pSet.cmi mList.cmi \
-    keyMerge.cmo keyHash.cmo key.cmo fingerprint.cmo eventloop.cmo common.cmo \
-    channel.cmi 
-keydb.cmx: settings.cmx sStream.cmx packet.cmx pSet.cmx mList.cmx \
-    keyMerge.cmx keyHash.cmx key.cmx fingerprint.cmx eventloop.cmx common.cmx \
-    channel.cmx 
-keyHash.cmo: utils.cmo packet.cmo channel.cmi 
-keyHash.cmx: utils.cmx packet.cmx channel.cmx 
-keyMerge.cmo: utils.cmo packet.cmo pSet.cmi pMap.cmi common.cmo 
-keyMerge.cmx: utils.cmx packet.cmx pSet.cmx pMap.cmx common.cmx 
-key.cmo: utils.cmo sStream.cmo parsePGP.cmo packet.cmo pSet.cmi channel.cmi 
-key.cmx: utils.cmx sStream.cmx parsePGP.cmx packet.cmx pSet.cmx channel.cmx 
-linearAlg.cmo: zZp.cmi 
-linearAlg.cmx: zZp.cmx 
-logdump.cmo: settings.cmo packet.cmo keydb.cmo keyHash.cmo dbMessages.cmo \
-    common.cmo 
-logdump.cmx: settings.cmx packet.cmx keydb.cmx keyHash.cmx dbMessages.cmx \
-    common.cmx 
-mailsync.cmo: settings.cmo keyHash.cmo fixkey.cmo eventloop.cmo common.cmo \
-    armor.cmo 
-mailsync.cmx: settings.cmx keyHash.cmx fixkey.cmx eventloop.cmx common.cmx \
-    armor.cmx 
-mArray.cmo: mArray.cmi 
-mArray.cmx: mArray.cmi 
-membership.cmo: wserver.cmo utils.cmo settings.cmo common.cmo membership.cmi 
-membership.cmx: wserver.cmx utils.cmx settings.cmx common.cmx membership.cmi 
-merge_keyfiles.cmo: settings.cmo packet.cmo pSet.cmi mTimer.cmi keydb.cmo \
-    key.cmo common.cmo channel.cmi 
-merge_keyfiles.cmx: settings.cmx packet.cmx pSet.cmx mTimer.cmx keydb.cmx \
-    key.cmx common.cmx channel.cmx 
-meteredChannel.cmo: channel.cmi 
-meteredChannel.cmx: channel.cmx 
-mList.cmo: mList.cmi 
-mList.cmx: mList.cmi 
-mRindex.cmo: parsePGP.cmo packet.cmo keyMerge.cmo index.cmo fingerprint.cmo \
-    common.cmo 
-mRindex.cmx: parsePGP.cmx packet.cmx keyMerge.cmx index.cmx fingerprint.cmx \
-    common.cmx 
-msgContainer.cmo: channel.cmi 
-msgContainer.cmx: channel.cmx 
-mTimer.cmo: mTimer.cmi 
-mTimer.cmx: mTimer.cmi 
-nbMsgContainer.cmo: common.cmo channel.cmi 
-nbMsgContainer.cmx: common.cmx channel.cmx 
-number2.cmo: 
-number2.cmx: 
-number.cmo: common.cmo number.cmi 
-number.cmx: common.cmx number.cmi 
-number_test.cmo: rMisc.cmo prime.cmo number.cmi common.cmo 
-number_test.cmx: rMisc.cmx prime.cmx number.cmx common.cmx 
-packet.cmo: 
-packet.cmx: 
-parsePGP.cmo: utils.cmo packet.cmo common.cmo channel.cmi 
-parsePGP.cmx: utils.cmx packet.cmx common.cmx channel.cmx 
-pbuild.cmo: settings.cmo sStream.cmo prefixTree.cmo pTreeDB.cmo keydb.cmo \
-    common.cmo 
-pbuild.cmx: settings.cmx sStream.cmx prefixTree.cmx pTreeDB.cmx keydb.cmx \
-    common.cmx 
-pdiskTest.cmo: zZp.cmi settings.cmo rMisc.cmo prefixTree.cmo packet.cmo \
-    pSet.cmi mTimer.cmi common.cmo bitstring.cmo 
-pdiskTest.cmx: zZp.cmx settings.cmx rMisc.cmx prefixTree.cmx packet.cmx \
-    pSet.cmx mTimer.cmx common.cmx bitstring.cmx 
-pMap.cmo: pMap.cmi 
-pMap.cmx: pMap.cmi 
-poly.cmo: zZp.cmi pMap.cmi mList.cmi 
-poly.cmx: zZp.cmx pMap.cmx mList.cmx 
-poly_test.cmo: zZp.cmi rMisc.cmo poly.cmo common.cmo 
-poly_test.cmx: zZp.cmx rMisc.cmx poly.cmx common.cmx 
-prefix_test.cmo: zZp.cmi settings.cmo rMisc.cmo prefixTree.cmo pSet.cmi \
-    mTimer.cmi mList.cmi bitstring.cmo 
-prefix_test.cmx: zZp.cmx settings.cmx rMisc.cmx prefixTree.cmx pSet.cmx \
-    mTimer.cmx mList.cmx bitstring.cmx 
-prefixTree.cmo: zZp.cmi pSet.cmi mArray.cmi common.cmo channel.cmi \
-    bitstring.cmo 
-prefixTree.cmx: zZp.cmx pSet.cmx mArray.cmx common.cmx channel.cmx \
-    bitstring.cmx 
-prime.cmo: utils.cmo number.cmi 
-prime.cmx: utils.cmx number.cmx 
-pSet.cmo: pSet.cmi 
-pSet.cmx: pSet.cmi 
-pstyle.cmo: 
-pstyle.cmx: 
-ptest.cmo: settings.cmo sStream.cmo prefixTree.cmo packet.cmo pTreeDB.cmo \
-    pSet.cmi mList.cmi keydb.cmo keyHash.cmo common.cmo 
-ptest.cmx: settings.cmx sStream.cmx prefixTree.cmx packet.cmx pTreeDB.cmx \
-    pSet.cmx mList.cmx keydb.cmx keyHash.cmx common.cmx 
-ptree_consistency_test.cmo: zZp.cmi reconPTreeDb.cmo pSet.cmi common.cmo \
-    bitstring.cmo 
-ptree_consistency_test.cmx: zZp.cmx reconPTreeDb.cmx pSet.cmx common.cmx \
-    bitstring.cmx 
-pTreeDB.cmo: settings.cmo prefixTree.cmo common.cmo 
-pTreeDB.cmx: settings.cmx prefixTree.cmx common.cmx 
-ptree_db_test.cmo: reconPTreeDb.cmo pSet.cmi common.cmo 
-ptree_db_test.cmx: reconPTreeDb.cmx pSet.cmx common.cmx 
-ptree_replay.cmo: reconPTreeDb.cmo pstyle.cmo pSet.cmi keyHash.cmo common.cmo 
-ptree_replay.cmx: reconPTreeDb.cmx pstyle.cmx pSet.cmx keyHash.cmx common.cmx 
-ptscript.cmo: settings.cmo pdiskTest.cmo 
-ptscript.cmx: settings.cmx pdiskTest.cmx 
-query.cmo: settings.cmo packet.cmo mList.cmi keydb.cmo key.cmo \
-    fingerprint.cmo 
-query.cmx: settings.cmx packet.cmx mList.cmx keydb.cmx key.cmx \
-    fingerprint.cmx 
-recode.cmo: packet.cmo key.cmo channel.cmi 
-recode.cmx: packet.cmx key.cmx channel.cmx 
-reconComm.cmo: wserver.cmo packet.cmo dbMessages.cmo common.cmo channel.cmi \
-    cMarshal.cmo 
-reconComm.cmx: wserver.cmx packet.cmx dbMessages.cmx common.cmx channel.cmx \
-    cMarshal.cmx 
-reconCS.cmo: settings.cmo server.cmo reconMessages.cmo pSet.cmi mList.cmi \
-    eventloop.cmo common.cmo client.cmo channel.cmi cMarshal.cmo 
-reconCS.cmx: settings.cmx server.cmx reconMessages.cmx pSet.cmx mList.cmx \
-    eventloop.cmx common.cmx client.cmx channel.cmx cMarshal.cmx 
-reconMessages.cmo: zZp.cmi pMap.cmi nbMsgContainer.cmo mTimer.cmi common.cmo \
-    cMarshal.cmo bitstring.cmo 
-reconMessages.cmx: zZp.cmx pMap.cmx nbMsgContainer.cmx mTimer.cmx common.cmx \
-    cMarshal.cmx bitstring.cmx 
-reconPTreeDb.cmo: prefixTree.cmo common.cmo 
-reconPTreeDb.cmx: prefixTree.cmx common.cmx 
-reconserver.cmo: zZp.cmi utils.cmo settings.cmo recoverList.cmo reconComm.cmo \
-    reconCS.cmo rMisc.cmo prefixTree.cmo packet.cmo pTreeDB.cmo pMap.cmi \
-    membership.cmi keyHash.cmo eventloop.cmo ehandlers.cmo dbMessages.cmo \
-    common.cmo channel.cmi catchup.cmo 
-reconserver.cmx: zZp.cmx utils.cmx settings.cmx recoverList.cmx reconComm.cmx \
-    reconCS.cmx rMisc.cmx prefixTree.cmx packet.cmx pTreeDB.cmx pMap.cmx \
-    membership.cmx keyHash.cmx eventloop.cmx ehandlers.cmx dbMessages.cmx \
-    common.cmx channel.cmx catchup.cmx 
-recoverList.cmo: zZp.cmi settings.cmo rMisc.cmo keyHash.cmo common.cmo 
-recoverList.cmx: zZp.cmx settings.cmx rMisc.cmx keyHash.cmx common.cmx 
-recvmail.cmo: wserver.cmo sendmail.cmo common.cmo 
-recvmail.cmx: wserver.cmx sendmail.cmx common.cmx 
-request.cmo: utils.cmo common.cmo 
-request.cmx: utils.cmx common.cmx 
-rMisc.cmo: zZp.cmi utils.cmo settings.cmo pSet.cmi pMap.cmi \
-    meteredChannel.cmo mList.cmi channel.cmi 
-rMisc.cmx: zZp.cmx utils.cmx settings.cmx pSet.cmx pMap.cmx \
-    meteredChannel.cmx mList.cmx channel.cmx 
-script.cmo: tester.cmo pSet.cmi pMap.cmi keyHash.cmo key.cmo fingerprint.cmo \
-    dbMessages.cmo common.cmo channel.cmi cMarshal.cmo 
-script.cmx: tester.cmx pSet.cmx pMap.cmx keyHash.cmx key.cmx fingerprint.cmx \
-    dbMessages.cmx common.cmx channel.cmx cMarshal.cmx 
-sendmail.cmo: settings.cmo pSet.cmi pMap.cmi common.cmo 
-sendmail.cmx: settings.cmx pSet.cmx pMap.cmx common.cmx 
-server.cmo: zZp.cmi settings.cmo reconMessages.cmo prefixTree.cmo \
-    eventloop.cmo decode.cmo common.cmo 
-server.cmx: zZp.cmx settings.cmx reconMessages.cmx prefixTree.cmx \
-    eventloop.cmx decode.cmx common.cmx 
-settings.cmo: 
-settings.cmx: 
-sks_do.cmo: settings.cmo prefixTree.cmo packet.cmo pMap.cmi keyHash.cmo \
-    dbMessages.cmo common.cmo channel.cmi 
-sks_do.cmx: settings.cmx prefixTree.cmx packet.cmx pMap.cmx keyHash.cmx \
-    dbMessages.cmx common.cmx channel.cmx 
-sksdump.cmo: settings.cmo sStream.cmo packet.cmo keydb.cmo keyHash.cmo \
-    common.cmo 
-sksdump.cmx: settings.cmx sStream.cmx packet.cmx keydb.cmx keyHash.cmx \
-    common.cmx 
-sks.cmo: update_subkeys.cmo unit_tests.cmo sksdump.cmo sks_do.cmo \
-    settings.cmo reconserver.cmo pbuild.cmo merge_keyfiles.cmo incdump.cmo \
-    fastbuild.cmo dbserver.cmo common.cmo clean_keydb.cmo build.cmo 
-sks.cmx: update_subkeys.cmx unit_tests.cmx sksdump.cmx sks_do.cmx \
-    settings.cmx reconserver.cmx pbuild.cmx merge_keyfiles.cmx incdump.cmx \
-    fastbuild.cmx dbserver.cmx common.cmx clean_keydb.cmx build.cmx 
-spider.cmo: pstyle.cmo pSet.cmi common.cmo 
-spider.cmx: pstyle.cmx pSet.cmx common.cmx 
-sStream.cmo: 
-sStream.cmx: 
-stats.cmo: settings.cmo packet.cmo membership.cmi htmlTemplates.cmo \
-    common.cmo 
-stats.cmx: settings.cmx packet.cmx membership.cmx htmlTemplates.cmx \
-    common.cmx 
-tester.cmo: utils.cmo settings.cmo packet.cmo keydb.cmo key.cmo \
-    dbMessages.cmo common.cmo channel.cmi 
-tester.cmx: utils.cmx settings.cmx packet.cmx keydb.cmx key.cmx \
-    dbMessages.cmx common.cmx channel.cmx 
-unit_tests.cmo: poly_test.cmo number_test.cmo decode_test.cmo common.cmo 
-unit_tests.cmx: poly_test.cmx number_test.cmx decode_test.cmx common.cmx 
-update_subkeys.cmo: settings.cmo packet.cmo pSet.cmi pMap.cmi keydb.cmo \
-    fingerprint.cmo common.cmo 
-update_subkeys.cmx: settings.cmx packet.cmx pSet.cmx pMap.cmx keydb.cmx \
-    fingerprint.cmx common.cmx 
-utils.cmo: pSet.cmi pMap.cmi 
-utils.cmx: pSet.cmx pMap.cmx 
-wserver.cmo: settings.cmo pSet.cmi pMap.cmi htmlTemplates.cmo eventloop.cmo \
-    common.cmo channel.cmi 
-wserver.cmx: settings.cmx pSet.cmx pMap.cmx htmlTemplates.cmx eventloop.cmx \
-    common.cmx channel.cmx 
-zZp2.cmo: number2.cmo 
-zZp2.cmx: number2.cmx 
-zZp.cmo: prime.cmo number.cmi zZp.cmi 
-zZp.cmx: prime.cmx number.cmx zZp.cmi 
-channel.cmi: 
-heap.cmi: 
-mArray.cmi: 
-membership.cmi: common.cmo 
-mList.cmi: 
-mTimer.cmi: 
-number.cmi: 
-pMap.cmi: 
-pSet.cmi: 
-zZp.cmi: number.cmi 

Added: sks/trunk/sks/ANNOUNCEMENT
===================================================================
--- sks/trunk/sks/ANNOUNCEMENT	                        (rev 0)
+++ sks/trunk/sks/ANNOUNCEMENT	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,25 @@
+sks-1.0.5 is released!
+
+There are a number of big changes from 1.0.4.  Here are the main ones:
+
+- SKS supports indexing by subkey keyids!
+
+- The SKS executables have been merged into one, improving maintainability.
+
+  this is an important one for current SKS admins.  sks_recon, sks_db,
+  sks_fastbuild, etc, are all gone.  There are only two executables, sks, and
+  sks_add_mail, which is a simple script used for getting incoming emails via
+  procmail.  All other functions are invoked via sks.  You can see the
+  various options of sks by typing "sks help".
+  
+  You can upgrade your existing SKS installation with "sks update_subkeys".
+  Note that this will take a while, and you must shut down your server during
+  the update process.  
+
+  WARNING!  Make sure you delete the old executables, as they won't be
+  overwritten when you install the new version.
+
+- (Untested) support for running "sks db" on two ports simultaneously.  This
+  is useful for servers that want to be available on port 80 (to allow
+  access through firewalls) and on port 11371, to allow tools like GPG to
+  access the server.

Modified: sks/trunk/sks/CHANGELOG
===================================================================
--- sks/trunk/sks/CHANGELOG	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/CHANGELOG	2012-06-20 09:04:11 UTC (rev 238)
@@ -1,3 +1,64 @@
+1.1.3
+  - Makefile fix for 'make dep' if .depend does not exist. Issue #4
+  - Makefile fix: sks and sks_add_mail fail to link w/o '-ccopt -pg'
+    Issue #23
+  - Added -disable_mailsync and -disable_log_diffs to sks.pod 
+  - Added file extensions .css, .jpeg, .htm, .es, .js, .xml, .shtml, .xhtm,
+    .xhtml and associated MIME types to server code. Part of Issue #6
+  - Added sample configuration files in sampleConfig directory
+  - Added sample web page files in sampleWeb directory. Issues #7, 9, 19
+  - Allow requests for non-official options hget, hash, status, & clean to 
+    be preceded by '-x'. Closes issues #10, 11, 13, & 14. 
+  - Allow &search with long subkey ID (16 digit) and subkey fingerprint
+    subkey lookup was failing with other than a short key ID. However,
+    public key lookup was working with short and long key ID and fingerprints.
+    This patch makes subkey lookup behave the same as full key lookup.
+    http://lists.gnupg.org/pipermail/gnupg-users/2012-January/043495.html
+    Initial patch sumbitted by Dan McGee (dpmcgee at gmail.com).
+    Cleanup by Yaron Minsky
+  - Patch recon script so that POST includes HTTP version number.
+    Patch submitted by Daniel Kahn Gilmor
+
+1.1.2:
+  - HTML generated by SKS has been cleaned up to pass XHTML 1.0 Strict
+    without error or warnings
+  - Added HTTP/1.0 after POST, '-' added to safe characters for webserver,
+    Add '.html' (text/html) to list of supported file extensions for web server 
+  - Johan van Selst's patch implementing Phil Pennock's suggestion
+      of an X-HKP-Results-Count: header to returned web server queries
+  - Johan van Selst's patch to add Content-length header to web results
+  - DB Statistics are kept for 30 days instead of 7
+  - SIGUSR2 now triggers on-demand statistics
+  - sks dump should ignore -USR1 and -USR2
+  - Remove XA support which Oracle dropped in DB 4.8 (& restored in DB 5.2)
+  - Work-around in bdb_stubs.c for DB_XA_CREATE dropped after DB 4.7
+  - Import debian patch 508_build_fastbuild.patch for improved sks_build script
+  - always display number of hashes received for better statistics in recon.log
+  - Fix 'sks dump' usage: help message syntax 
+  - Fix documentation to explicit that hkp_address and recon_address can 
+    contain both IP addresses and domain names.
+  - Fix documentation with ambiguity of -n when used with build and fastbuild
+  - Spelling corrections
+  - BUGFIX: do not leak the joined cursor in Keydb.get_by_words.
+
+1.1.1:
+  - Fix tail recursion for reconciliation with huge differences.
+  - fixed bug in handling of send_mailsyncs flag
+  - BUGFIX: The last word of a user id was not properly case converted.
+  - Makefile fixes
+  - imported patch sksdump-recursion 
+  - imported patch reconsever-resilience
+  - imported patch multiple-addresses 
+  - imported patch full-rrset 
+  - imported patch dbsyc-on-sigusr1 
+  - imported patch ignore-sigusr2 
+  - imported patch increase-wserver-timeout 
+  - imported patch spider-set-starthost 
+  - imported patch spider-add-buildtarget 
+  - [mq]: dns-refresh-patch 
+  - imported patch spider-target-fix
+  - [mq]: pdp-smallfixes
+
 1.1.0:
   - Numerix has been ripped out.  OCaml's Big_int implementation is
     used instead.

Modified: sks/trunk/sks/Makefile
===================================================================
--- sks/trunk/sks/Makefile	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/Makefile	2012-06-20 09:04:11 UTC (rev 238)
@@ -47,7 +47,7 @@
 
 CAMLP4=-pp $(CAMLP4O)
 CAMLINCLUDE= -I lib -I bdb
-COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) -ccopt -Lbdb -dtypes -ccopt -pthread -warn-error A
+COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) -ccopt -Lbdb -dtypes -ccopt -pthread -ccopt -pg -warn-error A
 OCAMLDEP=ocamldep $(CAMLP4) 
 CAMLLIBS=unix.cma str.cma bdb.cma nums.cma bigarray.cma cryptokit.cma
 OCAMLFLAGS=$(COMMONCAMLFLAGS) -g $(CAMLLIBS)
@@ -204,7 +204,7 @@
 	pMap.cmo pSet.cmo add_mail.cmo
 
 sks_add_mail: $(LIBS) pMap.cmx pSet.cmx add_mail.cmx
-	$(OCAMLOPT) -o sks_add_mail unix.cmxa \
+	$(OCAMLOPT) -o sks_add_mail -ccopt -pg unix.cmxa \
 	pMap.cmx pSet.cmx add_mail.cmx
 
 ocamldoc.out: $(ALLOBJS) $(EXEOBJS)
@@ -248,7 +248,7 @@
 	sks/.depend sks/*.tar.gz \
 	sks/bdb/Makefile sks/bdb/*.ml sks/bdb/*.mli sks/bdb/*.c \
 	sks/bdb/*.h sks/README sks/COPYING sks/VERSION sks/FILES \
-	sks/Makefile.local.unused sks/sks.8.gz
+	sks/Makefile.local.unused sks/sks.8
 
 ##################################
 # LIBS
@@ -398,10 +398,10 @@
 	rm -rf
 
 # Dependencies
+
 dep: 
 	$(OCAMLDEP) $(INCLUDES) *.ml *.mli > .depend
 
-include .depend
+-include .depend
 
-
 # DO NOT DELETE

Modified: sks/trunk/sks/README
===================================================================
--- sks/trunk/sks/README	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/README	2012-06-20 09:04:11 UTC (rev 238)
@@ -7,8 +7,9 @@
 There are a few prerequisites to building this code.  You need:
 
    * ocaml-3.10.2 or later.  Get it from http://www.ocaml.org
-   * Berkeley DB version 4.6.*.  You can find the appropriate
-     versions at http://www.sleepycat.com/update/index.html
+   * Berkeley DB version 4.6.* or later.  You can find the 
+     appropriate versions at 
+     http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html
 
 -- Compilation and Installation -----------------------------
 
@@ -20,6 +21,10 @@
    You can then set the environment variables OCAMLC, OCAMLOPT and CALMP4O to
    ocamlc.opt, ocamlopt.opt and camlp4o.opt respectively.)
 
+   If your vendor or porting project supplies prebuilt binaries and libraries
+   for Berkeley DB, make sure to get the development package as you will need
+   the correct version include files.
+
 * Copy Makefile.local.unused to Makefile.local, and edit to match your
   installation.  
 
@@ -69,7 +74,7 @@
 
    logfile: log
 
-   which ensures that sks will output messages to log.recon and log.db
+   which ensures that sks will output messages to recon.log and db.log
    respectively.
 
 * membership file
@@ -85,8 +90,8 @@
    This file should be called "membership", and should be stored in the SKS
    directory.  Note that in order for synchronization to work, both hosts
    have to have each other in their membership lists.  Send mail to
-   <sks-devel at lists.sourceforge.net> to get other SKS administrators to add
-   you to their membership lsits.
+   <sks-devel at nongnu.org> to get other SKS administrators to add you to 
+   their membership lsits.
 
    IMPORTANT NOTE: if you include the server itself in the membership file, you
    should make sure that you also specify the "hostname" option, and that the
@@ -132,12 +137,13 @@
 
    You can server up a simple index page directly from the port you're using
    for HKP.  This is done by creating a subdirectory in your SKS directory
-   called "web".  There, you can put an index file named "index.html" and
-   some image files with extensions jpeg, png or gif.  Subdirectories will be
-   ignored, as will filenames with anything other than alphanumeric
-   characters and the '.' character.  This is particularly useful if you want
-   to run your webserver off of port 80.  This can be done by using the
-   -hkp_port command-line option.
+   called "web".  There, you can put an index file named "index.html",
+   "index.htm", "index.xhtm", or "index.xhtml", supporting files with 
+   extensions .css, .es, or .js, and some image files with extensions 
+   jpg, jpeg, png or gif. Subdirectories will be ignored, as will filenames 
+   with anything other than alphanumeric characters and the '.' character.  
+   This is particularly useful if you want to run your webserver off of port 80.
+   This can be done by using the -hkp_port command-line option.
 
 
 -- Building up the databases -------------------

Modified: sks/trunk/sks/VERSION
===================================================================
--- sks/trunk/sks/VERSION	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/VERSION	2012-06-20 09:04:11 UTC (rev 238)
@@ -1 +1 @@
-1.1.1
+1.1.3

Modified: sks/trunk/sks/bdb/bdb.ml
===================================================================
--- sks/trunk/sks/bdb/bdb.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/bdb/bdb.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -55,7 +55,7 @@
 
   type t = db
 
-  type create_flag = XA_CREATE
+  type create_flag
 
   type open_flag = 
      CREATE | EXCL | NOMMAP | RDONLY | THREAD | TRUNCATE | AUTO_COMMIT

Modified: sks/trunk/sks/bdb/bdb_stubs.c
===================================================================
--- sks/trunk/sks/bdb/bdb_stubs.c	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/bdb/bdb_stubs.c	2012-06-20 09:04:11 UTC (rev 238)
@@ -19,6 +19,10 @@
 #include <string.h>
 #include "bdb_stubs.h"
 
+#ifndef DB_XA_CREATE
+#define DB_XA_CREATE 0
+#endif
+
 #define True 1
 #define False 0
 
@@ -371,11 +375,10 @@
 
 /**  DB Flags  ***********************************************/
 static int db_create_flags[] = {
-  DB_XA_CREATE
 };
 
 //+
-//+   type create_flag = XA_CREATE
+//+   type create_flag
 
 static int db_open_flags[] = {
   DB_CREATE, DB_EXCL, DB_NOMMAP, DB_RDONLY, DB_THREAD, 
@@ -424,11 +427,16 @@
 value caml_db_create(value dbenv_opt, value vflags){
   CAMLparam2(dbenv_opt,vflags);
   int err;
-  int flags = convert_flag_list(vflags,db_create_flags);
+  int flags;
   DB *db;
   DB_ENV *dbenv;
   CAMLlocal1(rval);
 
+  /* The flags parameter is currently unused, and must be set to 0. */
+  if (vflags != Val_emptylist)
+    invalid_argument("DB.create invalid create flag");
+  flags = convert_flag_list(vflags,db_create_flags);
+
   if (Is_None(dbenv_opt)) { dbenv = NULL; }
   else { 
     test_dbenv_closed(Some_val(dbenv_opt));

Modified: sks/trunk/sks/common.ml
===================================================================
--- sks/trunk/sks/common.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/common.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -15,7 +15,7 @@
    USA *)
 (***********************************************************************)
 
-(** Common services, including error reporting, logging, 
+(** Common services, including error reporting, logging,
   exception handling and port definitions  *)
 
 open Printf
@@ -28,10 +28,13 @@
 exception Argument_error of string
 exception Unit_test_failure of string
 
-module Map = PMap.Map 
+module Map = PMap.Map
 let (|<) map key = (fun data -> Map.add ~key ~data map)
 let (|=) map key = Map.find key map
 
+(** Function sequencing *)
+let (|!) x f = f x
+
 (********************************************************************)
 
 (** filters applied to all incoming keys *)
@@ -39,13 +42,13 @@
 
 let version_tuple = (__VERSION__)
 let compatible_version_tuple = (0,1,5)
-let version = 
+let version =
   let (maj_version,min_version,release) = version_tuple in
   sprintf "%d.%d.%d" maj_version min_version release
 
 let period_regexp = Str.regexp "[.]"
 
-let parse_version_string vstr = 
+let parse_version_string vstr =
   let ar = Array.of_list (Str.bounded_split period_regexp vstr 3) in
   (int_of_string ar.(0), int_of_string ar.(1), int_of_string ar.(2))
 
@@ -63,16 +66,16 @@
 
 (**************************************************************************)
 
-let plerror level format = 
-  kprintf (fun s -> 
-	     if !Settings.debug && level  <= !Settings.debuglevel 
+let plerror level format =
+  kprintf (fun s ->
+	     if !Settings.debug && level  <= !Settings.debuglevel
 	     then  (
 	       let tm = Unix.localtime (Unix.time ()) in
-	       fprintf !logfile "%04d-%02d-%02d %02d:%02d:%02d " 
-		 (tm.Unix.tm_year + 1900) (tm.Unix.tm_mon + 1) 
+	       fprintf !logfile "%04d-%02d-%02d %02d:%02d:%02d "
+		 (tm.Unix.tm_year + 1900) (tm.Unix.tm_mon + 1)
 		 tm.Unix.tm_mday (* date *)
 		 tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec; (* time *)
-	       output_string !logfile s; 
+	       output_string !logfile s;
 	       output_string !logfile "\n";
 	       flush !logfile;
 	     ) )
@@ -80,11 +83,11 @@
 
 (**************************************************************************)
 
-let set_logfile extension = 
+let set_logfile extension =
   if !Settings.filelog then
     let fname = (Filename.concat !Settings.basedir extension) ^ ".log" in
     stored_logfile_name := Some fname;
-    logfile := open_out_gen [ Open_wronly; Open_creat; Open_append; ] 
+    logfile := open_out_gen [ Open_wronly; Open_creat; Open_append; ]
       0o600 fname;
     plerror 0 "Opening log"
 
@@ -93,20 +96,20 @@
     | None -> ()
     | Some name ->
 	close_out !logfile;
-	logfile := open_out_gen [ Open_wronly; Open_creat; Open_append; ]  
+	logfile := open_out_gen [ Open_wronly; Open_creat; Open_append; ]
 	  0o600 name
 
 (**************************************************************************)
 
 let perror x = plerror 3 x
 
-let eplerror level e format = 
+let eplerror level e format =
   kprintf (fun s ->
-	     if !Settings.debug && level  <= !Settings.debuglevel 
+	     if !Settings.debug && level  <= !Settings.debuglevel
 	     then  (
 	       let tm = Unix.localtime (Unix.time ()) in
-	       fprintf !logfile "%04d-%02d-%02d %02d:%02d:%02d " 
-		 (tm.Unix.tm_year + 1900) (tm.Unix.tm_mon + 1) 
+	       fprintf !logfile "%04d-%02d-%02d %02d:%02d:%02d "
+		 (tm.Unix.tm_year + 1900) (tm.Unix.tm_mon + 1)
 		 tm.Unix.tm_mday (* date *)
 		 tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec;
 	       output_string !logfile s;
@@ -124,7 +127,7 @@
 
 let catch_break = ref false
 let handle_interrupt i =
-  if !catch_break 
+  if !catch_break
   then raise Sys.Break
 
 
@@ -132,35 +135,35 @@
 let () = Sys.set_signal Sys.sigint (Sys.Signal_handle handle_interrupt)
 let () = Sys.set_signal Sys.sigpipe Sys.Signal_ignore
 let () = Sys.set_signal Sys.sigusr2 Sys.Signal_ignore
-let () = Sys.set_signal Sys.sighup 
+let () = Sys.set_signal Sys.sighup
 	   (Sys.Signal_handle (fun _ -> reopen_logfile ()))
 
-let set_catch_break bool = 
+let set_catch_break bool =
   catch_break := bool
   (* Sys.catch_break bool; *)
 
-let () = set_catch_break true 
+let () = set_catch_break true
 
 (********************************************************************)
 
-let protect ~f ~finally = 
+let protect ~f ~finally =
   let result = ref None in
-  let pfinally () = 
+  let pfinally () =
     set_catch_break false;
     (try (finally () : unit)
-     with ee -> 
+     with ee ->
        set_catch_break true;
        raise ee);
     set_catch_break true;
   in
-  try 
+  try
     result := Some (f ());
     raise Exit
   with
-      Exit as e -> 
-	pfinally (); 
+      Exit as e ->
+	pfinally ();
 	(match !result with Some x -> x | None -> raise e)
-    | e -> 
+    | e ->
 	pfinally ();
 	raise e
 
@@ -171,7 +174,7 @@
   | (Some x)::tl -> x::(filter_opts tl)
   | None::tl -> filter_opts tl
 
-let decomment l = 
+let decomment l =
   try
     let pos = String.index l '#' in
     String.sub l ~pos:0 ~len:pos
@@ -189,7 +192,7 @@
 
 (***************************)
 
-type event = | Add of string   
+type event = | Add of string
 	     | Delete of string
 
 type timestamp = float
@@ -201,10 +204,12 @@
 let whitespace = Str.regexp "[ \t\n]+"
 let make_addr_list address_string port =
   let addrlist = Str.split whitespace address_string in
-  let f s = Unix.ADDR_INET (Unix.inet_addr_of_string s, port) in
-  List.map ~f addrlist
+  let servname = if port = 0 then "" else (string_of_int port) in
+  let resolver host = List.map ~f:(fun ai -> ai.Unix.ai_addr)
+      (Unix.getaddrinfo host servname [Unix.AI_SOCKTYPE Unix.SOCK_STREAM]) in
+  List.flatten (List.map ~f:resolver addrlist)
 
-let recon_port = !Settings.recon_port 
+let recon_port = !Settings.recon_port
 let recon_address = !Settings.recon_address
 let http_port = !Settings.hkp_port
 let http_address = !Settings.hkp_address
@@ -221,7 +226,7 @@
 
 let get_client_recon_addr () =
   make_addr_list recon_address 0
-let get_client_recon_addr = 
+let get_client_recon_addr =
   Utils.unit_memoize get_client_recon_addr
 
 let match_client_recon_addr addr =

Modified: sks/trunk/sks/dbserver.ml
===================================================================
--- sks/trunk/sks/dbserver.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/dbserver.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -112,9 +112,9 @@
   let get_stats () = 
     let today = Stats.round_up_to_day (Unix.gettimeofday ()) in
     let log = 
-      let maxsize = 20000 in
-      let last_week = today -. (7. *. 24. *. 60. *. 60.) in
-      Keydb.reverse_logquery ~maxsize last_week
+      let maxsize = 180000 in
+      let last_month = today -. (180. *. 24. *. 60. *. 60.) in
+      Keydb.reverse_logquery ~maxsize last_month
     in
     let size = Keydb.get_num_keys () in
     (log,size)
@@ -138,11 +138,17 @@
 
       | 8 -> (* 64-bit keyid *) 
 	  List.filter keys
-	  ~f:(fun key -> (Fingerprint.from_key key).Fingerprint.keyid = keyid )
+	  ~f:(fun key -> keyid = (Fingerprint.from_key key).Fingerprint.keyid ||
+	  (** Return keys i& subkeys with matching long keyID *)
+	     let (mainkeyid,subkeyids) = Fingerprint.keyids_from_key ~short:false key in
+	     List.exists (fun x -> x = keyid) subkeyids)
 
       | 20 -> (* 160-bit v. 4 fingerprint *)
 	  List.filter keys
-	  ~f:(fun key -> keyid = (Fingerprint.from_key key).Fingerprint.fp )
+	  ~f:(fun key -> keyid = (Fingerprint.from_key key).Fingerprint.fp ||
+	  (** Return keys & subkeys with matching fingerprints *)
+              let (mainkeyfp,subkeyfps) = Fingerprint.fps_from_key key in
+              List.exists (fun x -> x = keyid) subkeyfps)
 
       | 16 -> (* 128-bit v3 fingerprint.  Not supported *)
 	  failwith "128-bit v3 fingerprints not implemented"
@@ -205,20 +211,35 @@
 
 
   (******************************************************************)
+  let truncate count keys =
+    let rec trunc_c result orig num =
+      match orig with
+        | [] -> result
+	| h::tail ->
+            if (num = 0)
+	    then result
+	    else (trunc_c (result @ [h]) tail (num-1))
+    in
+    if count > 0
+    then trunc_c [] keys count 
+    else keys
 
   let handle_get_request request =
     match request.kind with
       | Stats -> 
 	  plerror 4 "/pks/lookup: DB Stats request";
-	  ("text/html; charset=UTF-8", !last_stat_page)
+	  ("text/html; charset=UTF-8", -1, !last_stat_page)
       | Get -> 
 	  plerror 4 "/pks/lookup: Get request (%s)"
 	    (String.concat " " request.search);
 	  let keys = lookup_keys request.search in
 	  let keys = clean_keys request keys in
+	  let count = List.length keys in
+	  let keys = truncate request.limit keys in
 	  let keystr = Key.to_string_multiple keys in
 	  let aakeys = Armor.encode_pubkey_string keystr in
 	  ("text/html; charset=UTF-8",
+	   count,
 	   HtmlTemplates.page  
 	     ~title:(sprintf "Public Key Server -- Get ``%s ''" 
 		       (String.concat ~sep:" " request.search))
@@ -243,6 +264,7 @@
 	  let keystr = Key.to_string key in
 	  let aakeys = Armor.encode_pubkey_string keystr in
 	  ("text/html; charset=UTF-8",
+	   1,
 	   HtmlTemplates.page  
 	     ~title:(sprintf "Public Key Server -- Get ``%s ''" hash_str)
 	     ~body:(sprintf "\r\n<pre>\r\n%s\r\n</pre>\r\n" aakeys)
@@ -253,10 +275,13 @@
 	  plerror 4 "/pks/lookup: Index request: (%s)" 
 	    (String.concat " " request.search);
 	  let keys = lookup_keys request.search in
+	  let count = List.length keys in
+	  let keys = truncate request.limit keys in
 	  let hashes = List.map ~f:KeyHash.hash keys in
 	  let keys = clean_keys request keys in
 	  if request.machine_readable then 
 	    ("text/plain",
+	     count,
 	     MRindex.keys_to_index keys)
 	  else 
 	    begin
@@ -275,6 +300,7 @@
 			    (Index.keyinfo_header request :: output)
 		in
 		("text/html; charset=UTF-8",
+		 count,
 		 HtmlTemplates.page ~body:pre
 		   ~title:(sprintf "Search results for '%s'" 
 			     (String.concat ~sep:" " request.search))
@@ -350,7 +376,7 @@
 
   let is_safe char = 
     (char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z') || 
-    (char >= '0' && char <= '9') || (char = '.')
+    (char >= '0' && char <= '9') || (char = '.') || (char = '-')
     
 
   let verify_web_fname fname = 
@@ -368,11 +394,21 @@
     else raise (Wserver.Misc_error "Malformed requst")
 
   let supported_extensions = 
-    [ ".jpg", "image/jpeg";
-      ".gif", "image/gif";
-      ".ico", "image/x-icon";
-      ".png", "image/png";
-      ".txt", "text/plain"; 
+    [ ".jpg",   "image/jpeg";
+      ".jpeg",  "image/jpeg";
+      ".gif",   "image/gif";
+      ".ico",   "image/x-icon";
+      ".png",   "image/png";
+      ".htm",   "text/html";
+      ".html",  "text/html";
+      ".shtml", "text/html";
+      ".txt",   "text/plain"; 
+      ".css",   "text/css";
+      ".xhtml", "application/xhtml+xml";
+      ".xhtm",  "application/xhtml+xml";
+      ".xml",   "application/xhtml+xml";
+      ".es",    "application/ecmascript";
+      ".js",    "application/javascript";
     ]
 
   (** Handler for HTTP requests *)
@@ -384,9 +420,9 @@
 	  let (base,oplist) = string_to_oplist request in
 	  if base = "/pks/lookup" then (
 	    let request = request_of_oplist oplist in
-	    let (mimetype,body) = handle_get_request request in
+	    let (mimetype,count,body) = handle_get_request request in
 	    cout#write_string body;
-	    mimetype
+	    (mimetype, count)
 	  ) else (
 	    if (base = "/index.html" || base = "/index.htm" 
 		|| base = "/" || base = "")
@@ -394,7 +430,7 @@
 	      let fname = convert_web_fname "index.html" in 
 	      let text = read_file fname in
 	      cout#write_string text;
-	      "text/html; charset=UTF-8"
+	      ("text/html; charset=UTF-8", -1)
 	    else 
 	      (try 
 		 let extension = get_extension base in
@@ -408,7 +444,7 @@
 		 let base = base </> (1,0) in
 		 let data = read_file ~binary:true (convert_web_fname base) in
 		 cout#write_string data;
-		 mimetype
+		 (mimetype, -1)
 	       with
 		   Not_found -> raise (Wserver.Page_not_found base)
 	      )
@@ -454,10 +490,10 @@
 		  cout#write_string 
 		    ("Key block added to key server database.\n  " ^
 		     "New public keys added: <br>");
-		  cout#write_string (sprintf "%d keys added succesfully.<br>" !ctr)
+		  cout#write_string (sprintf "%d key(s) added successfully.<br>" !ctr)
 		);
 		cout#write_string "</html></body>";
-		"text/html; charset=UTF-8"
+		("text/html; charset=UTF-8", List.length keys)
 	    | "/pks/hashquery" ->
 		plerror 4 "Handling /pks/hashquery"; 
 		let sin = new Channel.string_in_channel body 0 in
@@ -468,12 +504,13 @@
 		perror "%d keys found" (List.length keystrings);
 		CMarshal.marshal_list ~f:CMarshal.marshal_string cout 
 		  keystrings;
-		"pgp/keys" (* This is a bogus content-type *)
+		("pgp/keys" (* This is a bogus content-type *),
+		 List.length keystrings)
 	    | _ ->
 		cout#write_string (HtmlTemplates.page 
 				     ~title:"Unexpected POST request" 
 				     ~body:"");
-		"text/html; charset=UTF-8"
+		("text/html; charset=UTF-8", -1)
 
 
   (** Prepare handler for use with eventloop by transforming system
@@ -627,6 +664,11 @@
   let () = Sys.set_signal Sys.sigusr1
 	  (Sys.Signal_handle (fun _ -> sync_db_on_sig ()))
 
+  let () = Sys.set_signal Sys.sigusr2
+      (Sys.Signal_handle (fun _ ->
+	Eventloop.add_events Eventloop.heap
+	  [Eventloop.Event(0.0, Eventloop.Callback calculate_stats_page)]))
+
   (***********************************************************************)
 
   let run () = 

Modified: sks/trunk/sks/eventloop.ml
===================================================================
--- sks/trunk/sks/eventloop.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/eventloop.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -227,8 +227,9 @@
 (***************************************************************)
 (***************************************************************)
 
+let heap = Heap.empty (<) 20
+
 let evloop events socklist = 
-  let heap = Heap.empty (<) 20 in
   add_events heap events;
   try
     while true do

Modified: sks/trunk/sks/fingerprint.ml
===================================================================
--- sks/trunk/sks/fingerprint.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/fingerprint.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -19,6 +19,7 @@
 open Printf
 open StdLabels
 open MoreLabels
+open Common
 
 open Packet
 module Set = PSet.Set
@@ -27,7 +28,7 @@
 
 (* v3 and v4 fingerprints and keyids are quite different.
 
-   v3 fingerprint: MD5 sum of concatenation of bodies of MPI's 
+   v3 fingerprint: MD5 sum of concatenation of bodies of MPI's
                    for modulus and exponent of RSA key
 
    v3 keyid: low 64 bits of public modulus of RSA key
@@ -42,64 +43,64 @@
 
 
 type result = { fp : string;
-		keyid : string;
-	      }
+                keyid : string;
+              }
 
-let from_packet packet = 
+let from_packet packet =
   let cin = new Channel.string_in_channel packet.packet_body 0 in
   let version = cin#read_byte in
   match version with
       2 | 3 ->
-	let hash = Cryptokit.Hash.md5 () in
-	(* print_string "v3 pubkey\n"; *)
-	cin#skip 7; 
-	(* skip creation time (4 octets), days of validity (2 octets)
-	   and algorithm type (1 octet) *)
-	let n = ParsePGP.read_mpi cin in (* modulus *)
-	let e = ParsePGP.read_mpi cin in (* exponent *)
-	hash#add_substring n.mpi_data 0 ((n.mpi_bits + 7)/8);
-	hash#add_substring e.mpi_data 0 ((e.mpi_bits + 7)/8); 
-	let fingerprint = hash#result 
-	and keyid = 
-	  let len = String.length n.mpi_data in
-	  String.sub n.mpi_data ~pos:(len - 8) ~len:8
-	in
-	hash#wipe;
-	{ fp = fingerprint; 
-	  keyid = keyid;
-	}
-	
+        let hash = Cryptokit.Hash.md5 () in
+        (* print_string "v3 pubkey\n"; *)
+        cin#skip 7;
+        (* skip creation time (4 octets), days of validity (2 octets)
+           and algorithm type (1 octet) *)
+        let n = ParsePGP.read_mpi cin in (* modulus *)
+        let e = ParsePGP.read_mpi cin in (* exponent *)
+        hash#add_substring n.mpi_data 0 ((n.mpi_bits + 7)/8);
+        hash#add_substring e.mpi_data 0 ((e.mpi_bits + 7)/8);
+        let fingerprint = hash#result
+        and keyid =
+          let len = String.length n.mpi_data in
+          String.sub n.mpi_data ~pos:(len - 8) ~len:8
+        in
+        hash#wipe;
+        { fp = fingerprint;
+          keyid = keyid;
+        }
+
     | 4 ->
-	let hash = Cryptokit.Hash.sha1 () in
-	hash#add_byte 0x99; 
-	(* This seems wrong.  The spec suggests that packet.packet_tag 
-	   is what should be used here.  But this is what's done in the GPG 
-	   codebase, so I'm copying it. *)
-	hash#add_byte ((packet.packet_length lsr 8) land 0xFF);
-	hash#add_byte (packet.packet_length land 0xFF);
-	hash#add_string packet.packet_body;
-	let fingerprint = hash#result in
-	let keyid = 
-	  let len = String.length fingerprint in
-	  String.sub fingerprint ~pos:(len - 8) ~len:8
-	in
-	hash#wipe;
-	{ fp = fingerprint; 
-	  keyid = keyid;
-	}
+        let hash = Cryptokit.Hash.sha1 () in
+        hash#add_byte 0x99;
+        (* This seems wrong.  The spec suggests that packet.packet_tag
+           is what should be used here.  But this is what's done in the GPG
+           codebase, so I'm copying it. *)
+        hash#add_byte ((packet.packet_length lsr 8) land 0xFF);
+        hash#add_byte (packet.packet_length land 0xFF);
+        hash#add_string packet.packet_body;
+        let fingerprint = hash#result in
+        let keyid =
+          let len = String.length fingerprint in
+          String.sub fingerprint ~pos:(len - 8) ~len:8
+        in
+        hash#wipe;
+        { fp = fingerprint;
+          keyid = keyid;
+        }
 
-    | _ -> 
-	failwith "Fingerprint.from_packet: Unexpected version number"
+    | _ ->
+        failwith "Fingerprint.from_packet: Unexpected version number"
 
 let rec from_key key = match key with
     packet::key_tail ->
-      if  packet.packet_type = Public_Key_Packet 
-      then from_packet packet 
+      if  packet.packet_type = Public_Key_Packet
+      then from_packet packet
       else from_key key_tail
-  | [] -> 
+  | [] ->
       raise Not_found
 
-let fp_to_string fp = 
+let fp_to_string fp =
   let bs = if (String.length fp) = 20 then 4 else 2 in
   (* standard practice is to bunch long fingerprints by 4 and short ones by
      2.  An extra space is added in the middle *)
@@ -113,7 +114,7 @@
   done;
   Buffer.contents buf
 
-let keyid_to_string ?(short=true) keyid = 
+let keyid_to_string ?(short=true) keyid =
   let hex = Utils.hexstring keyid in
   if short
   then String.sub ~pos:(String.length hex - 8) ~len:8 hex
@@ -123,9 +124,9 @@
 let is_32bit int64 =
   int64 < max32
 
-let keyid32_of_string s = 
-  let s = 
-    if not (s.[0] = '0' && s.[1] = 'x') 
+let keyid32_of_string s =
+  let s =
+    if not (s.[0] = '0' && s.[1] = 'x')
     then "0x" ^ s else s
   in
   let x = Int64.of_string s in
@@ -134,7 +135,7 @@
   cout#write_int32 x;
   cout#contents
 
-let keyid_of_string s = 
+let keyid_of_string s =
   let x = Int64.of_string s in
   if is_32bit x then (
     let x = Int64.to_int32 x in
@@ -146,33 +147,62 @@
     cout#write_int64 x;
     cout#contents
   )
-    
+
 let shorten ~short keyid =
   if short then String.sub ~pos:4 ~len:4 keyid else keyid
 
 let fp_from_key key = (from_key key).fp
-let keyid_from_key ?(short=true) key = 
+let keyid_from_key ?(short=true) key =
   let keyid = (from_key key).keyid in
   shorten ~short keyid
 
-(** returns main keyid and list of subkey keyids.  The keyid is guaranteed
-  not to appear among the subkey keyids, and there are no duplicates among the 
-  subkey keyids.
-*)
-let keyids_from_key ?(short=true) key = 
+(** Returns a pair of the [result]s describing the fingerprint of the public key
+    paired with the list of results describing the fingerprints of the subkeys.
+    Raises `Not_found` if the information in question can't be found *)
+let key_and_subkey_results key =
   match key with
-    | [] -> raise Not_found
-    | ({ packet_type = Public_Key_Packet} as lead_packet)::tl ->
-	let rec loop packets = match packets with
-	  | [] -> []
-	  | ({ packet_type = Public_Subkey_Packet} as pack)::tl ->
-	      (from_packet pack).keyid::(loop tl)
-	  | pack::tl -> loop tl
-	in
-	let keyid = shorten ~short (from_packet lead_packet).keyid in
-	let subkey_keyids =  List.map ~f:(shorten ~short) (loop tl) in
-	let subkey_keyids = Set.of_list subkey_keyids in
-	let subkey_keyids = Set.remove keyid subkey_keyids in
-	(keyid,Set.elements subkey_keyids)
+  | [] -> raise Not_found
+  | ({ packet_type = Public_Key_Packet} as lead_packet)::tl ->
+    let rec loop packets = match packets with
+      | [] -> []
+      | ({ packet_type = Public_Subkey_Packet} as pack)::tl ->
+        from_packet pack :: loop tl
+      | pack :: tl -> loop tl
+    in
+    (from_packet lead_packet, loop tl)
+  | _ -> raise Not_found
+;;
 
-    | _ -> raise Not_found
+(** [key_and_subkey_ids key ~get] Returns the result of applying [get] to the
+    [result] of the lead key, paired with the unique results of applying get to
+    the [result] of the subkeys.  The ids of the subkey won't include the ids of
+    the lead key.
+*)
+let key_and_subkey_ids key ~get =
+  let (key_result,subkey_results) = key_and_subkey_results key in
+  let key_id = get key_result in
+  let subkey_ids =
+    List.map ~f:get subkey_results
+    |! Set.of_list |! Set.remove key_id |! Set.elements
+  in
+  (key_id,subkey_ids)
+;;
+
+(** returns main keyid and list of subkey keyids.  The keyid is guaranteed not
+    to appear among the subkey keyids, and there are no duplicates among the
+    subkey keyids.
+*)
+let keyids_from_key ?(short=true) key =
+  key_and_subkey_ids key ~get:(fun r -> shorten ~short r.keyid)
+;;
+
+(** returns main key fingerprint and list of subkey fingerprints.  The
+    fingerprint is guaranteed not to appear among the subkey fingerprints, and
+    there are no duplicates among the subkey fingerprints.  This list is made to
+    facilitate searching by long keyid (16 digit) or fingerprint. This was in
+    response to a 28-Dec-Patch to all trees of GnuPG allowing key lookup by
+    short keyID (8 digit), long KeyID, or fingerprint
+*)
+let fps_from_key key =
+  key_and_subkey_ids key ~get:(fun r -> r.fp)
+;;

Modified: sks/trunk/sks/htmlTemplates.ml
===================================================================
--- sks/trunk/sks/htmlTemplates.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/htmlTemplates.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -40,17 +40,17 @@
       End_of_file ->
 	sout#contents
 
-let br_regexp = Str.regexp_case_fold "<br>"
+let br_regexp = Str.regexp_case_fold "<br />"
 let page ~title ~body = 
   sprintf 
-    "<html><head><title>%s</title></head>\r\n<body><h1>%s</h1>%s</body></html>" 
+    "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\" >\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>%s</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\r\n<style type=\"text/css\">\r\n/*<![CDATA[*/\r\n .uid { color: green; text-decoration: underline; }\r\n .warn { color: red; font-weight: bold; }\r\n/*]]>*/\r\n</style></head><body><h1>%s</h1>%s</body></html>" 
     (Str.global_replace br_regexp  " | " title) title body
 
 let link ~op ~hash ~fingerprint ~keyid =
-  sprintf "/pks/lookup?op=%s%s%s&search=0x%s"
+  sprintf "/pks/lookup?op=%s%s%s&search=0x%s"
     op 
-    (if hash then "&hash=on" else "")
-    (if fingerprint then "&fingerprint=on" else "")
+    (if hash then "&hash=on" else "")
+    (if fingerprint then "&fingerprint=on" else "")
     keyid
 
 let keyinfo_header = "Type bits/keyID     Date       User ID"
@@ -74,7 +74,7 @@
   sprintf "\t Fingerprint=%s" fp
 
 let hash_link ~hash =
-  sprintf "/pks/lookup?op=hget&search=%s" hash
+  sprintf "/pks/lookup?op=hget&search=%s" hash
 
 let hash ~hash = 
   sprintf "\t Hash=<a href=%s>%s</a>" (hash_link ~hash) hash

Modified: sks/trunk/sks/index.ml
===================================================================
--- sks/trunk/sks/index.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/index.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -250,20 +250,20 @@
   let sigtype_string = 
     match siginfo.sigtype with
       | 0x10 -> 
-         if sig_expired then "<font color=\"red\"><b> exp  </b></font>"
-         else " sig "
+         if sig_expired then "<span class=\"warn\"> exp  </span>"
+         else " sig  "
       | 0x11 -> 
-         if sig_expired then "<font color=\"red\"><b> exp1 </b></font>"
-         else " sig1"
+         if sig_expired then "<span class=\"warn\"> exp1 </span>"
+         else " sig1 "
       | 0x12 -> 
-         if sig_expired then "<font color=\"red\"><b> exp2 </b></font>"
-         else " sig2"
+         if sig_expired then "<span class=\"warn\"> exp2 </span>"
+         else " sig2 "
       | 0x13 -> 
-         if sig_expired then "<font color=\"red\"><b> exp3 </b></font>"
-         else " sig3"
-      | 0x20 | 0x28 | 0x30 -> "<font color=\"red\"><b>revok </b></font>"
-      | 0x1f -> "dirct"
-      | 0x18 -> "sbind"
+         if sig_expired then "<span class=\"warn\"> exp3 </span>"
+         else " sig3 "
+      | 0x20 | 0x28 | 0x30 -> "<span class=\"warn\">revok </span>"
+      | 0x1f -> "dirct "
+      | 0x18 -> "sbind "
       | x -> sprintf " 0x%02x" x
   in
 
@@ -321,7 +321,7 @@
   let notation_data_opt = 
     apply_opt siginfo.notation_data
       ~f:(fun (name,value) ->
-  	    sprintf "    Notation data: <u>%s</u> %s"
+  	    sprintf "    Notation data: <span class=\"text-decoration: underline;\">%s</span> %s"
 	    (HtmlTemplates.html_quote name)
 	    (HtmlTemplates.html_quote value)
 	 )
@@ -359,10 +359,10 @@
   let siginfo_list = sort_siginfo_list siginfo_list in
   let uid_line = match uid.packet_type with
     | User_ID_Packet -> 
-	sprintf "<b>uid</b> <font color=\"green\"><u>%s</u></font>" 
+	sprintf "<strong>uid</strong> <span class=\"uid\">%s</span>" 
 	(HtmlTemplates.html_quote uid.packet_body)
 
-    | _ -> sprintf "<b>uat</b> [contents omitted]"
+    | _ -> sprintf "<strong>uat</strong> [contents omitted]"
   in
   let siginfo_lines = 
     List.concat 
@@ -379,7 +379,7 @@
 (********************************************************************)
 
 let key_packet_to_line ~is_subkey pki keyid = 
-  let prefix = if is_subkey then "<b>sub</b>" else "<b>pub</b>" in
+  let prefix = if is_subkey then "<strong>sub</strong>" else "<strong>pub</strong>" in
   let creation_string = datestr_of_int64 pki.pk_ctime in
   let expiration_string = 
     if pki.pk_version = 4 then no_datestr
@@ -536,7 +536,7 @@
     (* note: ugly hack here. </pre> and <pre> are used to allow for an <hr>
        inside of a pre-formatted region.  So this code only works if the
        lines are being generated to be put inside of a <pre></pre> block> *)
-    ("</pre><hr><pre>" ^ pubkey_line) ::
+    ("</pre><hr /><pre>" ^ pubkey_line) ::
     List.concat [
       selfsigs_to_lines request key_creation_time keyid selfsigs today;
       extra_lines;
@@ -624,7 +624,7 @@
     let lines =
 	keystr::lines
     in
-    "</pre><hr><pre>"::lines
+    "</pre><hr /><pre>"::lines
   with
     | Sys.Break | Eventloop.SigAlarm as e -> raise e
     | e ->

Modified: sks/trunk/sks/keydb.ml
===================================================================
--- sks/trunk/sks/keydb.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/keydb.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -539,8 +539,11 @@
 	let lengths = List.map ~f:Cursor.count cursors in
 	if MList.min lengths > max_internal_matches
 	then raise (Invalid_argument "Insufficiently specific words");
-	let cj = Cursor.join dbs.key cursors [] in
-	let keystrings = jcursor_get_all ~max cj in
+	let keystrings =
+	  let cj = Cursor.join dbs.key cursors [] in
+	  protect ~f:(fun () -> jcursor_get_all ~max cj)
+	    ~finally:(fun () -> Cursor.close cj)
+	in
 	if List.length keystrings >= max then
 	  raise (Invalid_argument "Too many responses")
 	else

Modified: sks/trunk/sks/prefix_test.ml
===================================================================
--- sks/trunk/sks/prefix_test.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/prefix_test.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -158,7 +158,7 @@
   in
   try
     verify (Bitstring.create 0);
-    print_string "Verification succesful\n";
+    print_string "Verification successful\n";
   with 
       Failure s -> 
 	print_string (sprintf "Verification failed: %s\n" s);

Modified: sks/trunk/sks/reconComm.ml
===================================================================
--- sks/trunk/sks/reconComm.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/reconComm.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -81,7 +81,7 @@
 		let sout = Channel.new_buffer_outc 0 in
 		CMarshal.marshal_list ~f:CMarshal.marshal_string sout hashes;
 		let msg = sout#contents in
-		cout#write_string "POST /pks/hashquery\r\n";
+		cout#write_string "POST /pks/hashquery HTTP/1.0\r\n";
 		cout#write_string (sprintf "content-length: %d\r\n\r\n" 
 				     (String.length msg));
 		cout#write_string msg;

Modified: sks/trunk/sks/reconserver.ml
===================================================================
--- sks/trunk/sks/reconserver.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/reconserver.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -317,6 +317,7 @@
   (***************************************************************)
 
   let () = Sys.set_signal Sys.sigusr1 Sys.Signal_ignore
+  let () = Sys.set_signal Sys.sigusr2 Sys.Signal_ignore
 
   (***********************************************************************)
 

Modified: sks/trunk/sks/recoverList.ml
===================================================================
--- sks/trunk/sks/recoverList.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/recoverList.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -61,7 +61,7 @@
   then plerror 4 "No hashes recovered from %s" source
 
   else if List.length hashes <= 10 then (
-    plerror 3 "Hashes recovered from %s" source;
+    plerror 3 "%d hashes recovered from %s" (List.length hashes) source;
     List.iter hashes
       ~f:(fun hash -> plerror 3 "\t%s" (KeyHash.hexify hash));
   ) else
@@ -69,8 +69,8 @@
 
 (** converts a list of elements of ZZp to a sorted list of hashes *)
 let hashconvert elements =
-  let hashes = List.map ~f:ZZp.to_bytes elements in
-  let hashes = List.map ~f:(fun hash -> RMisc.truncate hash 
+  let hashes = List.rev_map ~f:ZZp.to_bytes elements in
+  let hashes = List.rev_map ~f:(fun hash -> RMisc.truncate hash 
 			      KeyHash.hash_bytes) hashes in
   let hashes = List.sort ~cmp:compare hashes in
   hashes
@@ -79,10 +79,10 @@
 let log_diffs log_fname hashes = 
   if !Settings.log_diffs then
     begin
-      let hash_strs = List.map ~f:KeyHash.hexify hashes in
       let log_fname = Filename.concat !Settings.basedir log_fname in
       let file = open_out log_fname in
-      protect ~f:(fun () -> List.iter ~f:(fprintf file "%s\n") hash_strs)
+      protect ~f:(fun () -> List.iter hashes
+	  ~f:(fun h -> fprintf file "%s\n" (KeyHash.hexify h)))
 	~finally:(fun () -> close_out file)
     end
 

Modified: sks/trunk/sks/request.ml
===================================================================
--- sks/trunk/sks/request.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/request.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -39,6 +39,7 @@
 		 exact: bool;
 		 machine_readable: bool;
 		 clean: bool;
+		 limit: int;
 	       }
 
 let default_request = { kind = Index;
@@ -48,6 +49,7 @@
 			exact = false;
 			machine_readable = false;
 			clean = true;
+			limit = 0;
 		      }
 
 let comma_rxp = Str.regexp ","
@@ -64,10 +66,13 @@
 		then { request with machine_readable = true }
 		else request
 	    | ("op","stats") -> {request with kind = Stats };
+	    | ("op","x-stats") -> {request with kind = Stats };
 	    | ("op","index") -> {request with kind = Index };
 	    | ("op","vindex") -> {request with kind = VIndex };
 	    | ("op","get") -> {request with kind = Get};
 	    | ("op","hget") -> {request with kind = HGet};
+	    | ("op","x-hget") -> {request with kind = HGet};
+	    | ("limit",c) -> {request with limit = (int_of_string c)};
 	    | ("search",s) ->  
 		{request with search = 
 		   List.rev (Utils.extract_words (String.lowercase s))
@@ -76,10 +81,14 @@
 	    | ("fingerprint","off") ->  {request with fingerprint = false};
 	    | ("hash","on") ->  {request with hash = true};
 	    | ("hash","off") ->  {request with hash = false};
+	    | ("x-hash","on") ->  {request with hash = true};
+	    | ("x-hash","off") ->  {request with hash = false};
 	    | ("exact","on") ->  {request with exact = true};
 	    | ("exact","off") ->  {request with exact = false};
 	    | ("clean","on") -> {request with clean = true;}
 	    | ("clean","off") -> {request with clean = false;}
+	    | ("x-clean","on") -> {request with clean = true;}
+	    | ("x-clean","off") -> {request with clean = false;}
 	    | _ -> request
 	in
 	request_of_oplist tl ~request:new_request

Added: sks/trunk/sks/sampleConfig/DB_CONFIG
===================================================================
--- sks/trunk/sks/sampleConfig/DB_CONFIG	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/DB_CONFIG	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,11 @@
+set_mp_mmapsize         268435456
+set_cachesize	 0	134217728 1
+set_flags		DB_LOG_AUTOREMOVE
+set_lg_regionmax	1048576
+set_lg_max		104857600
+set_lg_bsize		2097152
+set_lk_detect		DB_LOCK_DEFAULT
+set_tmp_dir		/tmp
+set_lock_timeout	1000
+set_txn_timeout		1000
+mutex_set_max		65536

Added: sks/trunk/sks/sampleConfig/aliases.sample
===================================================================
--- sks/trunk/sks/sampleConfig/aliases.sample	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/aliases.sample	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,7 @@
+# handle incoming keyserver mail. Use one or the oyher of these but NOT both
+# If you define pgp-public-keys to a user, that user must have an appropriate
+# .procmailrc or other forwarding directive in its $HOME, preferrably the same
+# directory as SKS's base_dir
+#
+#pgp-public-keys:       "|/usr/bin/sks_add_mail /var/sks/messages"
+#pgp-public-keys:	sks

Added: sks/trunk/sks/sampleConfig/crontab.sample
===================================================================
--- sks/trunk/sks/sampleConfig/crontab.sample	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/crontab.sample	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,5 @@
+# SKS stats for sks-keyservers.net @~{10,20}:50 CET
+45 3,13  * * * pkill -USR2 sks || exit 1
+# SKS stats on the hour
+0  *     * * * pkill -USR2 sks || exit 1
+

Added: sks/trunk/sks/sampleConfig/debian/README
===================================================================
--- sks/trunk/sks/sampleConfig/debian/README	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/README	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,2 @@
+These are the example configuration files that ship with the debian
+SKS package.

Added: sks/trunk/sks/sampleConfig/debian/forward.exim
===================================================================
--- sks/trunk/sks/sampleConfig/debian/forward.exim	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/forward.exim	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1 @@
+|/usr/bin/procmail

Added: sks/trunk/sks/sampleConfig/debian/forward.postfix
===================================================================
--- sks/trunk/sks/sampleConfig/debian/forward.postfix	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/forward.postfix	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1 @@
+"|exec /usr/bin/procmail"

Added: sks/trunk/sks/sampleConfig/debian/mailsync
===================================================================
--- sks/trunk/sks/sampleConfig/debian/mailsync	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/mailsync	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,16 @@
+# /etc/sks/mailsync
+#
+# The mailsync should contains a list of email addresses of PKS
+# keyservers, one per line. This file is important, because it ensures
+# that keys submitted directly to an SKS keyserver are also forwarded
+# to PKS keyservers.
+#
+# Empty lines and whitespace-only lines are ignored, as are lines
+# whose first non-whitespace character is a `#'.
+#
+# IMPORTANT: don't add someone to your mailsync file without getting
+# their permission first!
+#
+# Jason Harris says that having his keyserver's address in the Debian package
+# is fine.
+#pgp-public-keys at keyserver.kjsl.com

Added: sks/trunk/sks/sampleConfig/debian/membership
===================================================================
--- sks/trunk/sks/sampleConfig/debian/membership	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/membership	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,13 @@
+# /etc/sks/membership
+#
+# With SKS, two hosts can efficiently compare their databases then
+# repair whatever differences are found.  In order to set up
+# reconciliation, you first need to find other SKS servers that will
+# agree to gossip with you. The hostname and port of the server that
+# has agreed to do so should be added to this file.
+#
+# Empty lines and whitespace-only lines are ignored, as are lines
+# whose first non-whitespace character is a `#'.
+#
+# Example:
+# keyserver.linux.it 11370

Added: sks/trunk/sks/sampleConfig/debian/procmail
===================================================================
--- sks/trunk/sks/sampleConfig/debian/procmail	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/procmail	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,3 @@
+:0
+* ^Subject: *(incremental|add)
+| /usr/lib/sks/sks_add_mail /var/spool/sks

Added: sks/trunk/sks/sampleConfig/debian/sksconf
===================================================================
--- sks/trunk/sks/sampleConfig/debian/sksconf	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/debian/sksconf	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,32 @@
+# /etc/sks/sksconf
+#
+# The configuration file for your SKS server.
+# You can find more options in sks(8) manpage.
+
+# Set server hostname
+#hostname: this.server.fdqn
+
+# Set recon binding address
+#recon_address: 0.0.0.0
+
+# Set recon port number
+#recon_port: 11370
+
+# Set hkp binding address
+#hkp_address: 0.0.0.0
+
+# Set hkp port number
+#hkp_port: 11371
+
+# Have the HKP interface listen on port 80, as well as the hkp_port
+#use_port_80:
+
+# From address used in synchronization emails used to communicate with PKS
+#from_addr: "PGP Key Server Administrator <pgp-public-keys at this.server.fdqn>"
+
+# Command used for sending mail (you can use -f option to specify the
+# envelope sender address, if your MTA trusts the sks user)
+#sendmail_cmd: /usr/lib/sendmail -t -oi
+
+# Runs database statistics calculation on boot (time and cpu expensive)
+#initial_stat:

Added: sks/trunk/sks/sampleConfig/mailsync
===================================================================
--- sks/trunk/sks/sampleConfig/mailsync	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/mailsync	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,21 @@
+# mailsync
+#
+# The mailsync should contains a list of email addresses of PKS
+# keyservers, one per line. This file is important, because it ensures
+# that keys submitted directly to an SKS keyserver are also forwarded
+# to PKS keyservers.
+#
+# Empty lines and whitespace-only lines are ignored, as are lines
+# whose first non-whitespace character is a `#'.
+#
+# IMPORTANT: don't add someone to your mailsync file without getting
+# their permission first!
+#
+# Hironobu Suzuki operates the OpenPKSD server <suzuki.hironobu at gmail.com>
+#pgp-public-keys at pgp.nic.ad.jp
+#
+# Jonathon McDowell openrates the ONAK server <noodles at earth.li>
+# http://www.earth.li/projectpurple/progs/onak.html
+#pgp-public-keys at the.earth.li
+#
+# V. Alex Brennen operates the CKS (CrytptNet) servers <vab at cryptnet.net>

Added: sks/trunk/sks/sampleConfig/membership
===================================================================
--- sks/trunk/sks/sampleConfig/membership	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/membership	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,25 @@
+# membership
+#
+# With SKS, two hosts can efficiently compare their databases then
+# repair whatever differences are found.  In order to set up
+# reconciliation, you first need to find other SKS servers that will
+# agree to gossip with you. The hostname and port of the server that
+# has agreed to do so should be added to this file.
+#
+# Empty lines and whitespace-only lines are ignored, as are lines
+# whose first non-whitespace character is a `#'. Comments preceded by '#'
+# are allowed at the ends of lines
+#
+# Example:
+# keyserver.linux.it 11370
+#
+# The following operators have agreed to have their peering info included in this sample file.
+# NOTE: This does NOT mean you may uncomment the lines and have peers. First you must contact the
+# server owner and ask permission. You should include a line styled like these for your own server.
+# Until two SKS membership files contain eact others peering info, they will not gossip.
+#
+#yourserver.example.net		11370	# Your full name <emailaddress for admin purposes> 0xPreferrefPGPkey
+#keyserver.gingerbear.net	11370	# John P. Clizbe <John at Gingerbear.net>		0xD6569825
+#sks.keyservers.net		11370	# John P. Clizbe <John at Gingerbear.net>		0xD6569825
+#keyserver.rainydayz.org	11370	# Andy Ruddock <andy.ruddock at rainydayz.org>	0xEEC3AFB3
+#keyserver.computer42.org	11370	# H.-Dirk Schmitt <dirk at computer42.org>		0x6A017B17

Added: sks/trunk/sks/sampleConfig/procmailrc
===================================================================
--- sks/trunk/sks/sampleConfig/procmailrc	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/procmailrc	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,27 @@
+#!/usr/bin/procmail
+#
+# <user> - .procmailrc
+                                                                                
+# Environment
+SHELL=/bin/bash
+UMASK=0177
+LINEBUF=4096
+LOGFILE=/var/log/procmail.log
+VERBOSE=off
+DEFAULT=/dev/null
+PATH=/usr/bin
+
+# Bounce and loop detection
+:0
+* ^FROM_DAEMON
+* ^X-Loop:.*pgp-public-keys at gingerbear.net
+$DEFAULT
+
+# Handle your keysync mails (optional)
+:0
+* ^Subject.*incremental
+| /usr/bin/sks_add_mail /var/sks/
+
+# Anything leftover
+:0
+$DEFAULT

Added: sks/trunk/sks/sampleConfig/rc.sks
===================================================================
--- sks/trunk/sks/sampleConfig/rc.sks	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/rc.sks	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,39 @@
+#! /bin/sh
+#
+CLIENT=/usr/bin/sks
+DIR=/var/sks
+STARTOPTS=
+#STARTOPTS will need to be in quotes if it has white space in it
+
+test -e $CLIENT || exit 0
+
+test -d $DIR || exit 0
+
+case "$1" in
+        start)
+		cd $DIR
+                echo -n "Starting SKS:"
+                echo -n \ sks_db
+                $CLIENT db &
+                echo -n \ sks_recon
+                $CLIENT recon &
+                echo "."
+        ;;
+        stop)
+                echo -n "Stopping SKS:"
+		killall sks
+		while [ "`pidof sks`" ]; do sleep 1; done # wait until SKS processes have exited
+                echo "."
+        ;;
+        restart|force-reload)
+		$0 stop
+		sleep 1
+		$0 start
+   	;;
+    	*)
+		echo "Usage: $0 {start|stop|reload|restart|force-reload}"
+		exit 1
+	;;
+esac
+
+exit 0


Property changes on: sks/trunk/sks/sampleConfig/rc.sks
___________________________________________________________________
Added: svn:executable
   + *

Added: sks/trunk/sks/sampleConfig/sksconf.minimal
===================================================================
--- sks/trunk/sks/sampleConfig/sksconf.minimal	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/sksconf.minimal	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,12 @@
+# sksconf sample for keyserver.foo.bar
+# ------------------------------------
+# Set the logfile to $basedir/log[.db|.recon]
+logfile: log
+
+# debuglevel 4 is default (max. debuglevel is 10)
+debuglevel: 4
+
+# set the hostname of your server
+hostname: keyserver.foo.bar
+
+# EOF

Added: sks/trunk/sks/sampleConfig/sksconf.typical
===================================================================
--- sks/trunk/sks/sampleConfig/sksconf.typical	                        (rev 0)
+++ sks/trunk/sks/sampleConfig/sksconf.typical	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,17 @@
+#  sksconf -- SKS main configuration
+#
+basedir:			/var/sks
+
+# debuglevel 4 is default (max. debuglevel is 10)
+debuglevel:			5
+
+hostname:			keyserver.example.tld
+hkp_port:			11371
+recon_port:			11370
+#
+from_addr:			pgp-public-keys at example.tld
+sendmail_cmd:			/usr/sbin/sendmail -t -oi
+#
+initial_stat:
+membership_reload_interval:	1
+stat_hour:			17

Added: sks/trunk/sks/sampleWeb/HTML5/README
===================================================================
--- sks/trunk/sks/sampleWeb/HTML5/README	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/HTML5/README	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,12 @@
+This is just a prettified index.html in HTML5.
+
+It uses elements of HTML5 boilerplate 1.0
+
+The link to SKS points to the code.google.com
+
+The submission links are relative to minimize having to search and replace
+on installation.
+
+Comments welcome.
+
+Submitted by samir at samirnassar.com.

Added: sks/trunk/sks/sampleWeb/HTML5/index.html
===================================================================
--- sks/trunk/sks/sampleWeb/HTML5/index.html	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/HTML5/index.html	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,161 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <title>SKS key server at YOURDOMAIN</title>
+    <meta name="description" content="">
+    <meta name="author" content="">
+    <!-- Mobile viewport optimized: j.mp/bplateviewport -->
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <style type="text/css">
+    h1,
+    h2,
+    p {
+      margin: 0; /* Let's zero those margins */
+    }
+
+    #container {
+      border: 1px solid #555; /* Nice transition from white background */ 
+      width: 600px; /* Should be narrow enough for small screens */
+      margin: 0 auto; /* Centering */
+      font-size: 1.1em; /* Font big enough not to need to squint */
+      line-height: 1.3em;
+    }
+ 
+    #title { 
+      background-color:#e2e5e2;
+      padding: 10px;
+    }
+    
+    #title h1, #title h2 {
+      margin-top: 0.3em;
+    }
+
+    #info { 
+      background-color:#e2e5e2;
+      padding: 5px 10px;
+    }
+ 
+    #main {
+      background : #FAFBEA;
+      padding: 0 10px 10px 10px;
+    }
+
+    #main header {
+      padding-top: 1em;
+    }
+
+    #main p {
+      margin: 0.5em 0;
+    }
+
+    #keytext {
+      width: 100%;
+      height: 150px;
+      border: 1px solid #555;
+      background : #fff;
+      max-width: 100%;
+      display: block;
+    }
+
+    ul {
+      width: 100%;
+      list-style-type: none;
+      padding-left: 0;
+    }
+
+    li {
+      width: 99%;
+    }
+
+    li label {
+      width: 57%;
+      display: inline-block;
+    }
+    
+    button {
+      border-radius: 3px;
+      -moz-border-radius: 3px;
+      background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ddd));
+      background: -moz-linear-gradient(top, #fff, #ddd);  
+      border: 1px solid #bbb;
+    }
+
+    #info p {line-height: 1.1em; margin-bottom: 0.3em;}
+    </style>
+  </head>
+  <body>
+    <div id="container">
+      <header id="title">
+        <hgroup>
+          <h1>SKS OpenPGP Key server</h1>
+          <h2>YOURDOMAIN</h2>
+        </hgroup>
+      </header>
+      <div id="main" role="main">
+        <header>
+          <h2>Extract a key</h2>
+        </header>
+        <p>You can find a key by typing in some words that appear in the
+          userid (name, email, etc.) of the key you're looking for, or
+          by typing in the keyid in hex format ("0x…")</p>
+        <form id="lookup" action="/pks/lookup" method="get">
+          <fieldset checked="true"> <legend>Search for a public key</legend>
+            <ul>
+              <li> <label for="search">String</label> <input id="search"
+                  name="search" placeholder="0xDEADBEEF" required="" autofocus=""
+                  type="text"> </li>
+              <li> <label for="fingerprint">Show PGP Fingerprints</label>
+                <input id="fingerprint" name="fingerprint" type="checkbox">
+              </li>
+              <li> <label for="hash">Show SKS full-key hashes</label> <input
+                  id="hash" name="hash" type="checkbox"> </li>
+              <li> <label for="matching">Get regular index of matching
+                  keys</label> <input id="matching" name="op" value="index"
+                  type="radio"> </li>
+              <li> <label for="verbose">Get verbose index of matching
+                  keys</label> <input id="verbose" name="op" value="vindex"
+                  checked="checked" type="radio"> </li>
+              <li> <label for="asciiarmored">Retrieve ascii-armored
+                  keys</label> <input id="asciiarmored" name="op" value="get"
+                  type="radio"> </li>
+              <li> <label for="fullkey">Retrieve keys by full-key hash</label>
+                <input id="fullkey" name="op" value="hget" type="radio">
+              </li>
+            </ul>
+            <button type="reset">Reset</button> <button type="submit">Search
+
+
+
+
+
+
+              for a key</button> </fieldset>
+        </form>
+        <header>
+          <h2>Submit a key</h2>
+        </header>
+        <p>You can submit a key by simply pasting in the ASCII-armored
+          version of your key and clicking on submit.</p>
+        <form id="add" action="/pks/add" method="post">
+          <fieldset> <textarea id="keytext" name="keytext" rows="5" cols="30"></textarea>
+            <button type="reset">Reset</button> <button checked="true"
+              type="submit">Submit this key</button></fieldset>
+        </form>
+      </div>
+      <!-- end of #main -->
+      <footer id="info">
+        <p><a href="https://code.google.com/p/sks-keyserver/">SKS</a> is
+          a new <a href="http://www.openpgp.org/">OpenPGP</a>
+          keyserver. The main innovation of SKS is that it includes a
+          highly-efficient reconciliation algorithm for keeping the
+          keyservers synchronized.</p>
+        <p style="text-align: center;"><a href="/pks/lookup?op=stats">SKS
+
+            statistics</a></p>
+      </footer>
+    </div>
+    <!--! end of #container -->
+  </body>
+</html>

Added: sks/trunk/sks/sampleWeb/HTML5/robots.txt
===================================================================
--- sks/trunk/sks/sampleWeb/HTML5/robots.txt	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/HTML5/robots.txt	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /

Added: sks/trunk/sks/sampleWeb/OpenPKG/README
===================================================================
--- sks/trunk/sks/sampleWeb/OpenPKG/README	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/OpenPKG/README	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,4 @@
+I found this one day surfing. It from the OpenPKG RPM Package Specification
+Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
+
+It is considerably barebones

Added: sks/trunk/sks/sampleWeb/OpenPKG/index.html
===================================================================
--- sks/trunk/sks/sampleWeb/OpenPKG/index.html	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/OpenPKG/index.html	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>SKS OpenPGP Public Key Server</title>
+  </head>
+  <body>
+  <h1>SKS OpenPGP Public Key Server</h1>
+  <hr />
+  <h2>
+  <a id="extract" name="extract">Extracting a OpenPGP Key</a>
+  </h2>
+  <form action="/pks/lookup" method="get">
+    <p>Index: 
+    <input type="radio" name="op" value="index" />
+     Verbose Index: 
+    <input type="radio" name="op" value="vindex" checked="checked" />
+    </p>
+    <p>Search String: 
+    <input name="search" size="40" value="openpkg" />
+    </p>
+    <p>
+    <input type="checkbox" name="fingerprint" checked="checked" />
+     Show OpenPGP "fingerprints" for keys</p>
+    <p>
+    <input type="checkbox" name="exact" />
+     Only return exact matches</p>
+    <p>
+    <input type="reset" value="Reset" />
+     
+    <input type="submit" value="Search!" />
+    </p>
+  </form>
+  <hr />
+  <h2>
+  <a id="submit" name="submit">Submitting a new OpenPGP Key</a>
+  </h2>
+  <form action="/pks/add" method="post">
+    <p>Enter ASCII-armored OpenPGP key here:</p>
+    <p>
+    <textarea name="keytext" rows="20" cols="66"></textarea>
+    </p>
+    <p>
+    <input type="reset" value="Reset" />
+     
+    <input type="submit" value="Submit!" />
+    </p>
+  </form>
+  <hr />
+  </body>
+</html>

Added: sks/trunk/sks/sampleWeb/OpenPKG/robots.txt
===================================================================
--- sks/trunk/sks/sampleWeb/OpenPKG/robots.txt	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/OpenPKG/robots.txt	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /

Added: sks/trunk/sks/sampleWeb/XHTML+ES/README
===================================================================
--- sks/trunk/sks/sampleWeb/XHTML+ES/README	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/XHTML+ES/README	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,37 @@
+Christoph Anton Mitterer <mail at christoph.anton.mitterer.name> 
+XHTML w/ ECMAscript/Javascript
+This was issue #9 on the GoogleCode page.
+
+Notes from submission
+
+Reported by calestyo, Oct 25, 2010
+
+As far as I can see the source tar-ball does currently not ship a default index website, which would make some sense IMHO, so that fresh installations have one and in order that people have a starting point on how to create their own (if they want).
+
+The attached index.xhtml would be one with the following "features":
+- valid XHTML 1.1, CSS 2.1
+  therefore depending on issue #6 (http://code.google.com/p/sks-keyserver/issues/detail?id=6)
+- tries to use clean and structured HTML as it's indented, no fancy graphics etc.
+- seems to be quite viewable in both graphical and textual browsers
+- uses little CMS and simple JavaScript for better "look and feel", both are however not necessary (e.g. if not implemented by the user agent).
+- scripts are in a seperate files, to allow user agents not supporting them to not load them at all
+
+Todos:
+- scripts.txt should be named scripts.es (once issue #6 is resolved)
+- the commented part is indented to be adapted by the sysadmin to their respectvie site... a note on this should be perhaps added to the readme or so.
+- are there further Options/etc. that sks would understand?!
+
+
+Change and/or drop the license notes as you like.
+
+Hope you like,
+Chris.
+
+Comment 2  by calestyo, Oct 31, 2010
+
+New versions of the files, adding support for "options=mr", which is however disabled for "op=get" as it's not yet implemented there (see issue #12).
+
+"exact=on" is not in the website, as it seems to be ignored in sks. The same with "options=nm".
+
+"clean=on" is not yet in, as I don't understand what it does.
+

Added: sks/trunk/sks/sampleWeb/XHTML+ES/index.xhtml
===================================================================
--- sks/trunk/sks/sampleWeb/XHTML+ES/index.xhtml	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/XHTML+ES/index.xhtml	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,138 @@
+<?xml version="1.1" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+
+
+
+<head>
+	<title>scientia.net OpenPGP&#xA0;Keyserver</title>
+	
+	<meta http-equiv="Content-Style-Type" content="text/css"/>
+	<meta http-equiv="Content-Script-Type" content="application/ecmascript"/>
+	
+	<script src="script.es" type="application/ecmascript" defer="defer"/></script>
+</head>
+
+
+
+
+<body>
+	<h1>scientia.net OpenPGP&#xA0;Keyserver</h1>
+	<p>
+	Welcome to <a href="http://scientia.net/" title="scientia.net">scientia.net</a>'s OpenPGP&#xA0;Keyserver service at "<a href="/" title="scientia.net OpenPGP&#xA0;Keyserver">keyserver.pki.scientia.net</a>".
+	</p>
+	<p>
+	In case of questions or problems please contact "<a href="mailto:root at keyserver.pki.scientia.net" title="scientia.net OpenPGP&#xA0;Keyserver Administrator">root at keyserver.pki.scientia.net</a>".
+	</p>
+	
+	
+	<h2><a id="search">Search</a></h2>
+	<form action="/pks/lookup" method="get">
+		<p>
+		Search for keys:<br/>
+		<span>
+		<input type="text" name="search" size="80" style="width: 100%; font-family: monospace;"/><br/>
+		<input type="submit" value="Search"/><input type="reset" value="Clear Form" style="float: right;"/>
+		</span>
+		</p>
+		<p>
+		Options:<br/>
+		<span>
+		<input type="radio" name="op" value="index" checked="checked" onchange="search_options_change();"/>&#xa0;generate normal key listing<br/>
+		<input type="radio" name="op" value="vindex" onchange="search_options_change();"/>&#xa0;generate verbose key listing<br/>
+		<input type="radio" name="op" value="get" onchange="search_options_change();"/>&#xa0;generate an "<a href="http://tools.ietf.org/html/rfc4880" title="RFC&#xA0;4880 ("OpenPGP Message Format")">OpenPGP Message</a>" in the <a href="http://tools.ietf.org/html/rfc4880#section-6" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 6.&#xA0;Radix-64 Conversions">"Radix-64" (also known as "ASCII armor") format</a> containing the keys (<a id="radio-button_hget"><input type="radio" name="op" value="hget" onchange="search_options_change();"/></a>&#xa0;by searching for "SKS full key hashes")<br/>
+		<span id="modifier_fingerprint"><input type="checkbox" name="fingerprint" value="on" checked="checked" style="margin-top: 1em;"/>&#xa0;display <a href="http://tools.ietf.org/html/rfc4880#section-12.2" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 12.2.&#xA0;Key&#xA0;IDs and Fingerprints">Key&#xA0;Fingerprints</a><br/></span>
+		<span id="modifier_hash"><input type="checkbox" name="hash" value="on"/>&#xa0;display "SKS full key hashes"<br/></span>
+		<span id="modifier_options_mr"><input type="checkbox" name="options" value="mr"/>&#xa0;use <a href="http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-5.1" title="Internet-Draft ("The OpenPGP HTTP Keyserver Protocol (HKP)") - 5.1.&#xA0;Machine Readable Output">machine readable format</a></span>
+		</span>
+		</p>
+		<p>
+		Examples:<br/>
+		</p>
+		<ul>
+			<li>User&#xA0;IDs<br/>
+			Searching the keys' <a href="http://tools.ietf.org/html/rfc4880#section-5.11" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 5.11.&#xA0;User&#xA0;ID Packet (Tag&#xA0;13)">User&#xA0;IDs</a> for any string, usually <a href="http://en.wikipedia.org/wiki/Personal_name" title="Wikipedia - Personal name">personal names</a> like "<samp>Pierre de Fermat</samp>", <a href="http://en.wikipedia.org/wiki/Email_address" title="Wikipedia - Email address">email addresses</a> "<samp>pierre at de-fermat.example</samp>" or so called "<a href="http://tools.ietf.org/html/rfc5322#section-3.4" title="RFC&#xA0;5322 ("Internet Message Format") - 3.4.&#xA0;Address Specification">name-addrs</a>" like "<samp>Pierre de Fermat <pierre at de-fermat.example></samp>".
+			</li>
+			<li>Key&#xA0;Fingerprints and Key&#xA0;IDs<br/>
+			Searching for <a href="http://tools.ietf.org/html/rfc4880#section-12.2" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 12.2.&#xA0;Key&#xA0;IDs and Fingerprints">Key&#xA0;Fingerprints</a> like "<samp>0x0123456789ABCDEF0123456789ABCDEF01234567</samp>" (version&#xA0;4) or "<samp>0x89ABCDEF0123456789ABCDEF01234567</samp>" (version&#xA0;3) and <a href="http://tools.ietf.org/html/rfc4880#section-3.3" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 3.3.&#xA0;Key&#xA0;IDs">Key&#xA0;IDs</a> like "<samp>0x89ABCDEF01234567</samp>" (so called "short Key&#xA0;IDs" like "<samp>0x01234567</samp>" can be used, too).
+			</li>
+			<li>"SKS full key hashes"<br/>
+			Searching for "SKS full key hashes" like "<samp>0123456789ABCDEF0123456789ABCDEF</samp>".<br/>
+			For this the respective option must be selected <a href="#radio-button_hget">above</a>.
+			</li>
+		</ul>
+	</form>
+	
+	
+	<h2><a id="submission">Submission</a> And <a id="publication">Publication</a></h2>
+	<form action="/pks/add" method="post">
+		<p>
+		Notes:
+		</p>
+		<ul>
+			<li>The keys must be presented as an "<a href="http://tools.ietf.org/html/rfc4880" title="RFC&#xA0;4880 ("OpenPGP Message Format")">OpenPGP Message</a>" in the <a href="http://tools.ietf.org/html/rfc4880#section-6" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 6.&#xA0;Radix-64 Conversions">"Radix-64" (also known as "ASCII armor") format</a>.</li>
+			<li>This keyserver is part of the "<a href="http://sks-keyservers.net/" title="Unofficial "SKS&#xA0;Keyserver Network" Website">SKS&#xA0;Keyserver Network</a>" and therefore ultimately <em>fully synchronised with all of its other keyservers</em>.</li>
+			<li>Submitted keys are going to be <em>published immediately</em>, which means that all their data (including the cryptographic material, <a href="http://tools.ietf.org/html/rfc4880#section-5.11" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 5.11.&#xA0;User&#xA0;ID Packet (Tag&#xA0;13)">User&#xA0;IDs</a>, <a href="http://tools.ietf.org/html/rfc4880#section-5.12" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 5.12.&#xA0;User&#xA0;Attribute Packet (Tag&#xA0;17)">User&#xA0;Attributes</a>, <a href="http://tools.ietf.org/html/rfc4880#section-5.2.1" title="RFC&#xA0;4880 ("OpenPGP Message Format") - 5.2.1.&#xA0;Signature Types">certification signatures</a>, et&#x202F;cetera) becomes publicly available and that personal information and even social connections may be revealed.</li>
+			<li><strong>Published keys cannot be removed</strong> for security and technical reasons, neither from this keyserver nor from the "<a href="http://sks-keyservers.net/" title="Unofficial "SKS&#xA0;Keyserver Network" Website">SKS&#xA0;Keyserver Network</a>".</li>
+		</ul>
+		<p>
+		Submit and publish keys:<br/>
+		<span>
+		<textarea name="keytext" cols="80" rows="10" style="width: 100%; height: 10em; font-family: monospace;"/></textarea><br/>
+		<input type="submit" value="Submit&#xA0;/&#xA0;Publish"/><input type="reset" value="Clear Form" style="float: right;"/>
+		</span>
+		</p>
+	</form>
+	
+	
+	<h2><a id="status">Status</a></h2>
+	<p>
+	The <a href="/pks/lookup?op=stats">status page</a> contains miscellaneous information about the keyserver, including its general settings, its peers and statistics.
+	</p>
+	
+	
+	<hr/>
+	<p>
+	<a href="http://validator.w3.org/check?uri=referer"><object data="http://www.w3.org/Icons/valid-xml11-v.svg" type="image/svg+xml" style="width:5em; height:100%;"><p>Valid XML&#xA0;1.1</p></object></a>
+	<a href="http://validator.w3.org/check?uri=referer"><object data="http://www.w3.org/Icons/valid-xhtml11-v.svg" type="image/svg+xml" style="width:5em; height:100%;"><p>Valid XHTML&#xA0;1.1</p></object></a>
+	<a href="http://jigsaw.w3.org/css-validator/check/referer"><object data="http://www.w3.org/Icons/valid-css-v.svg" type="image/svg+xml" style="width:5em; height:100%;"><p>Valid CSS</p></object></a>
+	</p>
+</body>
+
+
+
+
+</html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!--
+Copyright © 2010, Christoph Anton Mitterer <mail at christoph.anton.mitterer.name>.
+All rights reserved.
+
+
+This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
+Unported License. To view a copy of this license, visit
+http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
+Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
+
+Permission is granted to copy, distribute and/or modify this document under the
+terms of the GNU Free Documentation License, Version 1.3 or any later version
+published by the Free Software Foundation; with no Invariant Sections, no Front-
+Cover Texts, and no Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+-->

Added: sks/trunk/sks/sampleWeb/XHTML+ES/robots.txt
===================================================================
--- sks/trunk/sks/sampleWeb/XHTML+ES/robots.txt	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/XHTML+ES/robots.txt	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /

Added: sks/trunk/sks/sampleWeb/XHTML+ES/script.es
===================================================================
--- sks/trunk/sks/sampleWeb/XHTML+ES/script.es	                        (rev 0)
+++ sks/trunk/sks/sampleWeb/XHTML+ES/script.es	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,88 @@
+function search_options_change()
+{
+	var op = "";
+	for (var i = 0; i < document.getElementsByName("op").length; ++i)
+		if (document.getElementsByName("op")[i].checked)
+		{
+			op = document.getElementsByName("op")[i].value;
+			break;
+		}
+	
+	
+	switch (op)
+	{
+	case "index":
+		document.getElementById("modifier_fingerprint").style.visibility = "visible";
+		document.getElementById("modifier_hash").style.visibility = "visible";
+		document.getElementById("modifier_options_mr").style.visibility = "visible";
+		document.getElementById("modifier_fingerprint").disabled = false;
+		document.getElementById("modifier_hash").disabled = false;
+		document.getElementById("modifier_options_mr").disabled = false;
+		break;
+	
+	case "vindex":
+		document.getElementById("modifier_fingerprint").style.visibility = "visible";
+		document.getElementById("modifier_hash").style.visibility = "visible";
+		document.getElementById("modifier_options_mr").style.visibility = "hidden";
+		document.getElementById("modifier_fingerprint").disabled = false;
+		document.getElementById("modifier_hash").disabled = false;
+		document.getElementById("modifier_options_mr").disabled = true;
+		break;
+	
+	case "get":
+		document.getElementById("modifier_fingerprint").style.visibility = "hidden";
+		document.getElementById("modifier_hash").style.visibility = "hidden";
+		document.getElementById("modifier_options_mr").style.visibility = "hidden";
+		document.getElementById("modifier_fingerprint").disabled = true;
+		document.getElementById("modifier_hash").disabled = true;
+		document.getElementById("modifier_options_mr").disabled = true;
+		break;
+	
+	case "hget":
+		document.getElementById("modifier_fingerprint").style.visibility = "hidden";
+		document.getElementById("modifier_hash").style.visibility = "hidden";
+		document.getElementById("modifier_options_mr").style.visibility = "hidden";
+		document.getElementById("modifier_fingerprint").disabled = true;
+		document.getElementById("modifier_hash").disabled = true;
+		document.getElementById("modifier_options_mr").disabled = true;
+		break;
+	}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//Copyright © 2010, Christoph Anton Mitterer <mail at christoph.anton.mitterer.name>.
+//All rights reserved.
+//
+//
+//This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
+//Unported License. To view a copy of this license, visit
+//http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
+//Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
+//
+//
+//This program is free software: you can redistribute it and/or modify
+//it under the terms of the GNU General Public License as published by
+//the Free Software Foundation, either version 3 of the License, or
+//(at your option) any later version.
+//
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//GNU General Public License for more details.
+//
+//You should have received a copy of the GNU General Public License
+//along with this program.  If not, see <http://www.gnu.org/licenses/>.

Modified: sks/trunk/sks/script.ml
===================================================================
--- sks/trunk/sks/script.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/script.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -69,7 +69,7 @@
   let sout = Channel.new_buffer_outc 0 in
   CMarshal.marshal_list ~f:CMarshal.marshal_string sout hashes;
   let msg = sout#contents in
-  cout#write_string "POST /pks/hashquery\r\n";
+  cout#write_string "POST /pks/hashquery HTTP/1.0\r\n";
   cout#write_string (sprintf "content-length: %d\r\n\r\n" 
 		       (String.length msg));
   cout#write_string msg;
@@ -97,7 +97,7 @@
   let sout = Channel.new_buffer_outc 0 in
   CMarshal.marshal_list ~f:CMarshal.marshal_string sout hashes;
   let msg = sout#contents in
-  cout#write_string "POST /pks/hashquery\r\n";
+  cout#write_string "POST /pks/hashquery HTTP/1.0\r\n";
   cout#write_string (sprintf "content-length: %d\r\n\r\n" 
 		       (String.length msg));
   cout#write_string msg;

Modified: sks/trunk/sks/settings.ml
===================================================================
--- sks/trunk/sks/settings.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/settings.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -230,7 +230,9 @@
     ("-hostname", Arg.String set_hostname, " current hostname");
     ("-d", Arg.Int set_drop, " Number of keys to drop at random " ^
        "when synchronizing");
-    ("-n", Arg.Int set_n, " Multiple of 15,000 keys to load at once");
+    ("-n", Arg.Int set_n, " Number of key dump files to load at once " ^
+       "when used with build, multiple of 15000 keys when used with " ^
+       "fastbuild.");
     ("-max_internal_matches", Arg.Int set_max_internal_matches,
      " Maximum number of matches for most specific word in a " ^
      "multi-word search");

Modified: sks/trunk/sks/sks.ml
===================================================================
--- sks/trunk/sks/sks.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/sks.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -70,9 +70,10 @@
   { name = "fastbuild";
     usage = "-n [size] -cache [mbytes]";
     desc = "Build key database, doesn't include keys directly in database, " ^
-	   "faster than build.  -n specifies the mulitple of 15000 keys to " ^
-	   "read in at once, and -cache specifies the database cache to use " ^
-	   "in megabytes";
+           "faster than build . -n specifies the number of keydump files to " ^
+           "read per pass when used with build and the multiple of 15,000 " ^
+           "keys to be read per pass when used with fastbuild. " ^
+           " -cache specifies the database cache to use in megabytes.";
     func = (fun () -> 
 	      let module M = Fastbuild.F(struct end) in
 	      M.run ()

Modified: sks/trunk/sks/sks.pod
===================================================================
--- sks/trunk/sks/sks.pod	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/sks.pod	2012-06-20 09:04:11 UTC (rev 238)
@@ -48,7 +48,7 @@
 
 =item fastbuild -n [size] -cache [mbytes]
 
-Build key database, doesn't include keys directly in database, faster than build. -n specifies the mulitple of 15000 keys to read in at once, and -cache specifies the database cache to use in megabytes.
+Build key database, doesn't include keys directly in database, faster than build. -n specifies the number of keydump files to read per pass when used with build and the multiple of 15,000 keys to be read per pass when used with fastbuild.  -cache specifies the database cache to use in megabytes.
 
 =item pbuild -cache [mbytes] -ptree_cache [mbytes]
 
@@ -112,7 +112,7 @@
 
 =item -n
 
- Multiple of 15,000 keys to load at once.
+ Number of keydump files to load at once.
 
 =item -max_internal_matches
 
@@ -152,7 +152,7 @@
 
 =item -recon_address
 
-Set recon binding address.  Can be a list of whitespace separated IP addresses.
+Set recon binding addresses.  Can be a list of whitespace separated IP addresses or domain names.
 
 =item -hkp_port
 
@@ -160,7 +160,7 @@
 
 =item -hkp_address
 
-Set hkp binding address.  Can be a list of whitespace separated IP addresses.
+Set hkp binding addresses.  Can be a list of whitespace separated IP addresses or domain names.
 
 =item -use_port_80
 
@@ -278,6 +278,15 @@
 
 Maximum interval (in hours) at which membership file is reloaded.
 
+=item -disable_mailsync
+
+Disable sending of PKS mailsync messages.  ONLY FOR STANDALONE SERVERS!
+THIS IS THE MECHANIASM FOR SENDING UPDATES TO NON-SKS SERVERS.
+
+=item -disable_log_diffs
+
+Disable logging of recent hashset diffs.
+
 =item  --help, -help
 
 Displays list of options.

Added: sks/trunk/sks/sks_build.bc.sh
===================================================================
--- sks/trunk/sks/sks_build.bc.sh	                        (rev 0)
+++ sks/trunk/sks/sks_build.bc.sh	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# SKS build script.
+# cd to directory with "dump" subdirectory, and run
+# You might want to edit this file to reduce or increase memory usage 
+# depending on your system
+
+fail() { echo Command failed unexpectedly.  Bailing out; exit -1; }
+SKS=sks.bc
+
+echo === Running fastbuild... ===
+if ! $SKS fastbuild -n 10 -cache 100; then fail; fi
+echo === Cleaning key database... ===
+if ! $SKS cleandb; then fail; fi
+echo === Building ptree database... ===
+if ! $SKS pbuild -cache 20 -ptree_cache 70; then fail; fi
+echo === Done! ===

Modified: sks/trunk/sks/sks_build.sh
===================================================================
--- sks/trunk/sks/sks_build.sh	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/sks_build.sh	2012-06-20 09:04:11 UTC (rev 238)
@@ -5,12 +5,44 @@
 # You might want to edit this file to reduce or increase memory usage 
 # depending on your system
 
+ask_mode() {
+    echo "Please select the mode in which you want to import the keydump:"
+    echo ""
+    echo "1 - fastbuild"
+    echo "    only an index of the keydump is created and the keydump cannot be"
+    echo "    removed."
+    echo ""
+    echo "2 - normalbuild"
+    echo ""
+    echo "    all the keydump will be imported in a new database. It takes longer"
+    echo "    time and more disk space, but the server will run faster (depending"
+    echo "    from the source/age of the keydump)."
+    echo "    The keydump can be removed after the import."
+    echo ""
+    echo -n "Enter enter the mode (1/2): "
+    read
+    case "$REPLY" in
+     1)
+	mode="fastbuild"
+     ;;
+     2)
+	mode="build /var/lib/sks/dump/*.pgp"
+     ;;
+     *)
+	echo "Option unknown. bye!"
+	exit 1
+     ;;
+    esac
+}
+
 fail() { echo Command failed unexpectedly.  Bailing out; exit -1; }
 
-echo === Running fastbuild... ===
-if ! sks fastbuild -n 10 -cache 100; then fail; fi
+ask_mode
+
+echo "=== Running (fast)build... ==="
+if ! /usr/sbin/sks $mode -n 10 -cache 100; then fail; fi
 echo === Cleaning key database... ===
-if ! sks cleandb; then fail; fi
+if ! /usr/sbin/sks cleandb; then fail; fi
 echo === Building ptree database... ===
-if ! sks pbuild -cache 20 -ptree_cache 70; then fail; fi
+if ! /usr/sbin/sks pbuild -cache 20 -ptree_cache 70; then fail; fi
 echo === Done! ===

Modified: sks/trunk/sks/sksdump.ml
===================================================================
--- sks/trunk/sks/sksdump.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/sksdump.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -89,6 +89,13 @@
 
   exception Argument_error
 
+  (***************************************************************)
+
+  let () = Sys.set_signal Sys.sigusr1 Sys.Signal_ignore
+  let () = Sys.set_signal Sys.sigusr2 Sys.Signal_ignore
+
+  (***************************************************************)
+
   let run () = 
     try (
       match !Settings.anonlist with
@@ -106,7 +113,7 @@
 	    raise Argument_error
     ) with Argument_error -> 
       eprintf "wrong number of arguments\n";
-      eprintf "usage: sksdump numkeys dumpdir [dumpname]\n";
+      eprintf "usage: sks dump numkeys dumpdir [dumpname]\n";
       flush stderr;
       exit (-1)
 end

Added: sks/trunk/sks/smtp_script.py
===================================================================
--- sks/trunk/sks/smtp_script.py	                        (rev 0)
+++ sks/trunk/sks/smtp_script.py	2012-06-20 09:04:11 UTC (rev 238)
@@ -0,0 +1,33 @@
+#!/usr/bin/env python2
+
+# Simple script for sending out messages via smtp.  
+# This is an alternative to using sendmail
+
+import smtplib
+import os
+import sys
+import string
+
+msg = [ line for line in sys.stdin ]
+msgtext = string.join([line[:-1] for line in msg],sep="\n")
+
+def get_headers(msg):
+    i = 0
+    headers = {}
+    while i < len(msg):
+        line = msg[i]
+        line = line[:-1]
+        if line == "": break
+        (field,data) = line.split(":",1)
+        field = field.lower().strip()
+        data = data.strip()
+        if field == "from":
+            headers["from"] = data
+        elif field == "to":
+            headers["to"] = [ addr.strip() for addr in data.split(",") ]
+        i = i + 1
+    return headers
+
+headers = get_headers(msg)
+smtp = smtplib.SMTP("smtp.earthlink.net")
+smtp.sendmail(headers["from"],headers["to"],msgtext)


Property changes on: sks/trunk/sks/smtp_script.py
___________________________________________________________________
Added: svn:executable
   + *

Modified: sks/trunk/sks/stats.ml
===================================================================
--- sks/trunk/sks/stats.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/stats.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -113,15 +113,15 @@
 
 let histogram_to_table time_to_string histogram = 
   let hist_entry_to_table_entry entry = 
-    sprintf "<tr><td>%s<td>%d<td>%d"
+    sprintf "<tr><td>%s</td><td>%d</td><td>%d</td></tr>"
       (time_to_string entry.lower) 
       (entry.num_adds - entry.num_dels) entry.num_dels
   in
   let table_entries = 
     List.map ~f:hist_entry_to_table_entry (Array.to_list histogram)
   in
-  "<table border=\"1\">\n" ^ 
-  "<tr><td>Time<td>New Keys<td>Updated Keys\n" ^
+  "<table summary=\"Statistics\" border=\"1\">\n" ^ 
+  "<tr><td>Time</td><td>New Keys</td><td>Updated Keys</td></tr>\n" ^
   String.concat "\n" table_entries ^
   "\n</table>\n"
 
@@ -132,20 +132,20 @@
   let settings = 
     sprintf 
       "<h2>Settings</h2>
-     <table>
-     <tr><td>Hostname:<td>%s
-     <tr><td>Version:<td>%s
-     <tr><td>HTTP port:<td>%d
-     <tr><td>Recon port:<td>%d
-     <tr><td>Debug level:<td>%d
-</table><br>"
+     <table summary=\"Keyserver Settings\">
+     <tr><td>Hostname:</td><td>%s</td></tr>
+     <tr><td>Version:</td><td>%s</td></tr>
+     <tr><td>HTTP port:</td><td>%d</td></tr>
+     <tr><td>Recon port:</td><td>%d</td></tr>
+     <tr><td>Debug level:</td><td>%d</td></tr>
+</table>\r\n"
       !Settings.hostname Common.version
       http_port recon_port !Settings.debuglevel
   in
   let gossip_peers = 
     let peers = Array.to_list (Membership.get_names ()) in
-    let peers = List.map ~f:(fun peer -> sprintf "<tr><td>%s\n" peer) peers in
-    sprintf "<h2>Gossip Peers</h2>\n<table>\n%s</table>"
+    let peers = List.map ~f:(fun peer -> sprintf "<tr><td>%s</td></tr>\n" peer) peers in
+    sprintf "<h2>Gossip Peers</h2>\n<table summary=\"Gossip Peers\">\n%s</table>"
       (String.concat ~sep:"" peers)
   in
   let mail_peers = 
@@ -153,16 +153,16 @@
       try Membership.get_mailsync_partners () 
       with Failure "No partners specified" -> []
     in
-    let peers = List.map ~f:(fun s -> sprintf "<tr><td>%s\n" s) peers in
-    sprintf "<h2>Outgoing Mailsync Peers</h2>\n<table>\n%s</table>"
+    let peers = List.map ~f:(fun s -> sprintf "<tr><td>%s</td></tr>\n" s) peers in
+    sprintf "<h2>Outgoing Mailsync Peers</h2>\n<table summary=\"Mailsync Peers\">\n%s</table>"
       (String.concat ~sep:"" peers)
   in
-  sprintf "%s\n\n<table width=\"100%%\">
-<tr valign=\"TOP\"><td>
+  sprintf "%s\n\n<table summary=\"Keyserver Peers\" width=\"100%%\">
+<tr valign=\"top\"><td>
 %s
-<td>
+</td><td>
 %s
-</table><br>\n"
+</td></tr></table>\r\n"
     settings gossip_peers mail_peers
 
 
@@ -174,7 +174,7 @@
   let num_keys = sprintf "<p>Total number of keys: %d</p>\n" size  in
   let title = 
     sprintf 
-      "SKS OpenPGP Keyserver statistics<br>Taken at %s"
+      "SKS OpenPGP Keyserver statistics<br />Taken at %s"
       (time_to_tz_string now)
   in
   if Array.length log = 0 then
@@ -205,7 +205,7 @@
   
 let generate_html_stats_page_nostats () = 
   let body = info_tables () ^
-	     "<br> Database statistics are time-consuming and so are " ^
+	     "<br /> Database statistics are time-consuming and so are " ^
 	     "only calculated once per day"
   in
   let title = "Stats not calculated yet" in

Modified: sks/trunk/sks/utils.ml
===================================================================
--- sks/trunk/sks/utils.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/utils.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -100,16 +100,17 @@
 
 
 let rec extract_words_rec s ~start ~len partial = 
+  let one () = Set.add (String.lowercase (String.sub s start len)) partial in
   if start + len = String.length s 
   then ( if len = 0 then partial 
-	 else Set.add (String.sub s start len) partial )
+	 else one ())
   else (
     if is_alnum s.[start + len]
     then extract_words_rec s ~start ~len:(len + 1) partial
     else ( if len = 0 
 	   then extract_words_rec s ~start:(start + 1) ~len partial
 	   else extract_words_rec s ~start:(start + len)  ~len:0
-	     (Set.add (String.lowercase (String.sub s start len)) partial)
+	     (one ())
 	 )
   )
 

Modified: sks/trunk/sks/wserver.ml
===================================================================
--- sks/trunk/sks/wserver.ml	2012-05-30 15:11:11 UTC (rev 237)
+++ sks/trunk/sks/wserver.ml	2012-06-20 09:04:11 UTC (rev 238)
@@ -236,9 +236,12 @@
 
 
 
-let send_result cout ?(error_code = 200) ?(content_type = "text/html; charset=UTF-8") body =
+let send_result cout ?(error_code = 200) ?(content_type = "text/html; charset=UTF-8") ?(count = -1) body =
   fprintf cout "HTTP/1.0 %03d OK\r\n" error_code;
   fprintf cout "Server: sks_www/%s\r\n" version;
+  fprintf cout "Content-length: %u\r\n" (String.length body + 2);
+  if count >= 0 then
+    fprintf cout "X-HKP-Results-Count: %d\r\n" count;
   fprintf cout "Content-type: %s\r\n\r\n" content_type;
   fprintf cout "%s\r\n" body;
   flush cout
@@ -250,9 +253,9 @@
       let request = parse_request cin in
       let output_chan = Channel.new_buffer_outc 0 in
       try
-	let content_type = f addr request output_chan#upcast in
+	let (content_type, count) = f addr request output_chan#upcast in
 	let output = output_chan#contents in
-	send_result cout ~content_type output
+	send_result cout ~content_type ~count output
       with
 	| Eventloop.SigAlarm -> 
 	    ignore (Unix.alarm recover_timeout);




More information about the Pkg-sks-commit mailing list