Jonathan McDowell [Sun, 5 Jun 2016 20:28:58 +0000 (21:28 +0100)]
Switch to using mail_dir for incoming mail lock file
Rather than using the db_dir for the lock file to prevent multiple
onak-mail instances processing incoming requests at the same time, use
the mail_dir file where the incoming messages are spooled anyway. This
is cleaner and will cope with the potential for multiple DB backends to
be in play in the future.
Jonathan McDowell [Sun, 17 Jan 2016 14:14:21 +0000 (14:14 +0000)]
Remove Ross Burton from Uploaders
Ross requested to be removed from Uploaders due to a lack of
time/inclination to work on onak maintainership.
Jonathan McDowell [Tue, 25 Aug 2015 15:19:14 +0000 (16:19 +0100)]
0.4.6 release
Release; update version string in configure.ac, README, Doxyfile.
Update HISTORY and debian/changelog.
Jonathan McDowell [Tue, 25 Aug 2015 15:46:30 +0000 (16:46 +0100)]
Fix stupid sock_dir bug
I forgot to actually parse the sock_dir info from the config file. Do
so.
Jonathan McDowell [Tue, 25 Aug 2015 14:22:24 +0000 (15:22 +0100)]
Support --runstatedir with autoconf 2.70+
Rather than putting our socket in $localstatedir/run use $runstatedir
which is support by the Debian package autoconf 2.69-9 and will be in
autoconf 2.70. Fall back to $localstatedir/run when an older version
of autoconf is used.
Jonathan McDowell [Fri, 21 Aug 2015 10:44:22 +0000 (12:44 +0200)]
Add config option to specify keyd socket directory
keyd was stashing its Unix domain socket in the DB directory, which
is contrary to convention. Add a sock_dir config option and default it
to ${prefix}/var/run in the sample config file.
Jonathan McDowell [Thu, 20 Aug 2015 12:22:25 +0000 (14:22 +0200)]
Update version.h when source files change
Make $(SRCS) a Makefile dependency for version.h so once any of the
source files change we can update our version to reflect this fact.
Jonathan McDowell [Thu, 20 Aug 2015 10:43:01 +0000 (12:43 +0200)]
Update debian/watch file to deal with non-gz compressed tarballs
Jonathan McDowell [Thu, 20 Aug 2015 10:30:52 +0000 (12:30 +0200)]
Add git commit details to non-release builds
The previous bzr version info is long unused, so replace with
'git describe' to embed the git version status in builds from git.
Jonathan McDowell [Sat, 15 Aug 2015 09:28:31 +0000 (10:28 +0100)]
Add Curve25519 ECC OID details
Jonathan McDowell [Sat, 15 Aug 2015 09:24:58 +0000 (10:24 +0100)]
Fix keysize for
Ed25519 to 255 bits
Jonathan McDowell [Sat, 15 Aug 2015 09:23:54 +0000 (10:23 +0100)]
Add support for displaying EDDSA keys
EDDSA is not yet formally defined, but understood by GnuPG 2.1 and
has been seen in the wild. Key size is defined by the OID as for
ECDH/ECDSA keys.
Jonathan McDowell [Fri, 14 Aug 2015 17:19:15 +0000 (18:19 +0100)]
Add de-duplication of subkeys on a key
GnuPG will incorrectly add a pre-existing subkey that it doesn't
understand (e.g. ECC) to a key. This results in keys with a large
number of identical subkeys. Avoid this by detecting such keys and
de-duplicating the identical subkeys.
(gnupg bug report at https://bugs.gnupg.org/gnupg/issue1962)
Jonathan McDowell [Sun, 17 May 2015 20:11:04 +0000 (21:11 +0100)]
Re-order linking for backend plugins to cope with ld --as-needed
The shared libraries for DB4/curl/PostgreSQL should all come after the
object file that uses them so that ld --as-needed can correctly pick up
the required linkage.
Fixes Debian bug #772433
Jonathan McDowell [Thu, 5 Mar 2015 15:27:14 +0000 (15:27 +0000)]
Add additional ECC OIDs
In addition to the 3 NIST curves add
Ed25519, the 3 brainpool curves and
secp256k1 (as used in Bitcoin).
Jonathan McDowell [Sun, 5 Oct 2014 13:43:11 +0000 (14:43 +0100)]
Don't build-depend on Debian systemd dev packages for non-Linux architectures
Later versions of systemd aren't build on FreeBSD etc so the Debian build
was failing due to an unmet build-dep on libsystemd-dev; limit this
requirement to Linux archs.
Fixes Debian bug #763924. Thanks to Pino Toscano <pino@debian.org>
Jonathan McDowell [Fri, 3 Oct 2014 16:30:51 +0000 (17:30 +0100)]
0.4.5 release
Release; update version string in configure.ac, README, Doxyfile.
Update HISTORY and debian/changelog.
Jonathan McDowell [Wed, 1 Oct 2014 08:37:56 +0000 (09:37 +0100)]
Check for sd_listen_fds in libsystemd as well as libsystemd-daemon
Upstream systemd has moved the sd_listen_fds function from
libsystemd-daemon into a combined libsystemd. For Debian this change
happens in the 214-1 package. Make the autoconf script look in both
and change the Debian build-deps to look for either suitably
recent libsystemd-dev or fall back to libsystemd-daemon-dev (to aid
backports).
Jonathan McDowell [Tue, 30 Sep 2014 21:38:04 +0000 (22:38 +0100)]
0.4.4 release
Release; update version string in configure.ac, README, Doxyfile.
Update HISTORY and debian/changelog.
Jonathan McDowell [Tue, 30 Sep 2014 21:34:21 +0000 (22:34 +0100)]
Use strtouq to parse keyid instead of strtoul
The use of strtoul to parse the key ID breaks parsing 64 bit key IDs
on 32 bit platforms. Use strtouq instead, which is defined as returning
a 64 bit rather than being dependant on the length of "unsigned long".
Jonathan McDowell [Tue, 30 Sep 2014 09:10:03 +0000 (10:10 +0100)]
0.4.3 release
Release; update version string in configure.ac, README, Doxyfile.
Update HISTORY and debian/changelog.
Jonathan McDowell [Tue, 30 Sep 2014 08:59:35 +0000 (09:59 +0100)]
Bump Debian Standards-Version to 3.9.6.0
No changes.
Jonathan McDowell [Tue, 30 Sep 2014 08:52:01 +0000 (09:52 +0100)]
Add dependency on dh-systemd to Debian packaging
Jonathan McDowell [Tue, 30 Sep 2014 08:51:10 +0000 (09:51 +0100)]
Don't ignore errors in newly added Debian prerm script
Jonathan McDowell [Mon, 29 Sep 2014 20:57:08 +0000 (21:57 +0100)]
Enable use of systemd + socket activation support for Debian package
Now that onak supports systemd socket activation add the appropriate
systemd service files to enable this on Debian installs. In the longer
term I'd like this to be generic for any distro; patches from people
experienced with them most welcome.
Jonathan McDowell [Tue, 23 Sep 2014 21:41:38 +0000 (22:41 +0100)]
Add keyd support for systemd socket activation
If we have libsystemd-daemon available then enable support for
systemd socket activation of keyd. Even if this support is compiled
in we will fall back to the old behaviour of setting up our own
listening Unix domain socket if systemd is not in use.
Jonathan McDowell [Tue, 23 Sep 2014 15:59:34 +0000 (16:59 +0100)]
Fix issue with pre-seeding key database on Debian install
The test for my key didn't include the .gz file extension, so the
key database wasn't getting created upon initial install.
Jonathan McDowell [Tue, 23 Sep 2014 14:42:44 +0000 (15:42 +0100)]
Use generic rule for rebuilding .in files
Rather than a specific Makefile rule for each .in file use a generic
approach so we can easily add more if necessary.
Jonathan McDowell [Tue, 22 Jul 2014 13:48:46 +0000 (14:48 +0100)]
Use common function for command sending in keyd client code
Rather than duplicating the checks for writing ok and getting a non
error response use a common function for sending commands to keyd from
the DB backend client code.
Jonathan McDowell [Tue, 22 Jul 2014 12:01:14 +0000 (13:01 +0100)]
Guard max lock setting with error check
We weren't checking for an error before setting the DB4 maxlocks
parameter, which could cause a NULL dereference in the error path.
Jonathan McDowell [Tue, 22 Jul 2014 11:59:32 +0000 (12:59 +0100)]
Cleanup key array logic to make llvm scan-build happier
We can't have the size != 0 without keys != NULL, but the fact we
checked one at the start and the other later was confusing the static
checks from scan-build. Use size in both places; it keeps scan-build
happy and make the code a little easier to read.
Jonathan McDowell [Tue, 22 Jul 2014 11:53:40 +0000 (12:53 +0100)]
Fix keyd memory leak on error reading client provided search text
Jonathan McDowell [Tue, 22 Jul 2014 11:42:35 +0000 (12:42 +0100)]
Bail out if we can't change to the DB directory for the FS backend
Jonathan McDowell [Tue, 22 Jul 2014 11:38:33 +0000 (12:38 +0100)]
Bail out if we get errors reading the config file
Jonathan McDowell [Mon, 6 Jan 2014 19:48:59 +0000 (11:48 -0800)]
Make keyd more robust in the face of socket errors
We were mostly ignoring errors back from reads or writes to the keyd
socket. Check that we've read/written as many bytes as we expect and
pull some of this out to common functions for sending keys/replies.
Jonathan McDowell [Mon, 6 Jan 2014 19:02:37 +0000 (11:02 -0800)]
Make keyd internal functions static
Nothing else links to keyd.o, but these functions are internal so mark
them static.
Jonathan McDowell [Mon, 6 Jan 2014 18:58:11 +0000 (10:58 -0800)]
Add error checking when trying to daemonize in keyd
We weren't checking the return from freopen, which causes warnings when
compiling with -D_FORTIFY_SOURCE=2. Do so, and also for the setsid().
Jonathan McDowell [Sun, 5 Jan 2014 17:50:55 +0000 (17:50 +0000)]
Check return value when writing PID to DB4 upgrade lock file
When writing our PID to the lock file for upgrading the DB4 version
we didn't check it was actually successful. This doesn't matter in
general (because it's the existence or not of the file we care about)
but catch it and error out appropriate anyway.
Jonathan McDowell [Sun, 5 Jan 2014 17:44:47 +0000 (09:44 -0800)]
Fix issue with looking up keys by fingerprint via HKP interface
The index variable for the current parameter was being reused to parse
the fingerprint, resulting in attempting to free an unallocated piece of
memory and crashing. Use a different loop variable instead.
Jonathan McDowell [Tue, 24 Dec 2013 17:28:04 +0000 (17:28 +0000)]
Add a reindex command to the onak tool
With the changes to the backends to store keys using the full fingerprints
it can be useful to force a key to be re-indexed and thus transitioned to
a fingerprint rather than 64 bit key id index. Ideally we'd want to be
able to do this across the entire backend, but that's a bit heavyweight for
a full keyserver so add the ability to do it for a single key to start with.
Jonathan McDowell [Thu, 28 Nov 2013 21:30:06 +0000 (13:30 -0800)]
Check that signature data lengths do not exceed the available data
Some signatures have been witnessed on the keyserver network where the
hashed data lengths reported exceed the size of the overall packet. It
is assumed these are the results of some corruption somewhere, so if
they're detected don't try to parse any further (and drop them if we're
doing signature checking).
Jonathan McDowell [Wed, 20 Nov 2013 02:44:39 +0000 (18:44 -0800)]
Don't end an existing transaction if trying to delete a non-existent key
The DB4 key deletion routine would always exit the current transaction
if the key wasn't found, even if it had been called by another function
which had entered the transaction. Only do so if the deletion routine
itself is what caused the transaction to be started.
Jonathan McDowell [Tue, 19 Nov 2013 05:44:46 +0000 (21:44 -0800)]
Another deletion fix of 64 bit keys in DB4 backend
We weren't deleting the actual key data when a key had been correctly
stored using its fingerprint.
Jonathan McDowell [Tue, 19 Nov 2013 05:34:48 +0000 (21:34 -0800)]
Code cleanups
Unused return values + unnecessary setting of variable.
Jonathan McDowell [Thu, 14 Nov 2013 05:39:14 +0000 (21:39 -0800)]
Fix deletion of 64 bit keys in DB4 backend
We were using the cursor from the id32db instead of the one for the
id64db.
Jonathan McDowell [Wed, 13 Nov 2013 03:10:49 +0000 (19:10 -0800)]
Use fingerprints as key index in DB4 backend
Up until now the DB4 backend has used the 64 bit key ID as the index
into the key database. The fingerprint has always been a better idea
and it's easy to create a v3 key that causes a collision, so switch to
using the fingerprint in the DB4 backend.
These changes to not require an upgrade to an existing DB4 setup; keys
will get transitioned to the new storage method as they are updated in
the keyserver.
Jonathan McDowell [Tue, 12 Nov 2013 05:46:16 +0000 (21:46 -0800)]
Add some more subpacket types to key decoder
Observed in keys sent to the keyserver and taken from either RFC 4880
or the source of various older PGP implementations. Some of these are
legacy but we can identify and ignore them.
Jonathan McDowell [Sun, 10 Nov 2013 04:14:26 +0000 (20:14 -0800)]
Switch keysubkeys to returning an array of fingerprints instead of IDs
No functional change at present because the users only currently use the
64 bit key ID, so add a helper function fingerprint2keyid as well (which
only works for v4 keys, but v3 keys can't have subkeys).
Jonathan McDowell [Sun, 10 Nov 2013 01:21:42 +0000 (17:21 -0800)]
Fix subkey retrieval with fs backend
Fix retrieving keys by the 64 bit key id from one of their subkeys.
Jonathan McDowell [Sun, 10 Nov 2013 00:16:00 +0000 (16:16 -0800)]
Add tests for retrieving by sub key ID
2 tests for retrieving a key by a short 32 bit key id of a subkey and
the full 64 bit sub key id.
Jonathan McDowell [Sat, 9 Nov 2013 20:29:15 +0000 (12:29 -0800)]
Introduce and use a structure to hold OpenPGP fingerprints
Fingerprint lengths can be 16 bytes (for v3 keys) or 20 bytes (for v4
keys). Rather than passing around a size and fingerprint buffer separately
use a structure to hold both pieces of information and just pass that
around.
Jonathan McDowell [Sat, 9 Nov 2013 19:17:21 +0000 (11:17 -0800)]
Use full key id in key id retrieval test + add separate short key id test
Jonathan McDowell [Sat, 9 Nov 2013 16:34:08 +0000 (08:34 -0800)]
Fix issues found by llvm scan-build static analysis
A mixture of fixes: some variables set but never used (fix by either
removing or correctly checking error codes), some unlikely but possible
memory leaks, some invalid casting.
Jonathan McDowell [Sat, 9 Nov 2013 07:02:45 +0000 (23:02 -0800)]
Use dynamic context for all backend databases
Rather than defining a static set of database functions use a well
known initialisation function for each database backend that then
returns a database context structure. This structure contains function
pointers for all of the functions previously held in dbstructs as well
as a private instance context pointer.
For the moment this doesn't provide any change to behaviour, but it
provides the initial preparation for allowing multiple database instance
(whether of the same or differing types) to be used at the same time.
Jonathan McDowell [Tue, 5 Nov 2013 05:57:49 +0000 (21:57 -0800)]
Skip signature hash verification for X509 signatures
X509 signatures don't have a valid hash checksum and can't be easily
verified without full X509 support. Skip them in check_packet_sighash
entirely.
Jonathan McDowell [Tue, 5 Nov 2013 04:52:38 +0000 (20:52 -0800)]
Add SHA1x hash support
A hash variant that uses 8 SHA-1 instances and results in a double width
hash (320 bits instead of SHA-1's 160 bits). This was used in older
versions of PGP and there are quite a few keys on the keyservers with
signatures using it. Added mainly to enable the sig hash checking
routine to do some sanity checking on these signatures.
Jonathan McDowell [Tue, 5 Nov 2013 03:13:39 +0000 (19:13 -0800)]
Remove DB2 backend
This was originally for pulling keys from an old pksd keyserver setup.
The code has bit-rotted and no one should have been running pksd for
years now, so just remove the backend entirely. DB4 has been the best
choice for onak backend for some time now.
Jonathan McDowell [Tue, 5 Nov 2013 03:05:20 +0000 (19:05 -0800)]
Remove trailing newline on sigcheck debug output
Jonathan McDowell [Tue, 5 Nov 2013 03:04:51 +0000 (19:04 -0800)]
Change SHA_DIGEST_LENGTH to SHA1_DIGEST_SIZE to match nettle
Jonathan McDowell [Tue, 5 Nov 2013 00:56:31 +0000 (16:56 -0800)]
Extend database backends to support fetching by key fingerprint
Up until now the database backends have supported fetching a specific
key only by 64 bit key id. We should really have been using the
fingerprint where possible. Add a new backend function, fetch_key_fp,
to allow us to fetch using the fingerprint, and a generic implementation
that just truncates the fingerprint to get the 64 bit key id (valid for
v4 only). The HKP, keyd and dynamic backends gain full passthrough
support for retrieval by fingerprint with this commit.
Jonathan McDowell [Mon, 4 Nov 2013 07:09:12 +0000 (23:09 -0800)]
Add support for displaying ECDH/ECDSA key sizes
The key size of an elliptic curve key is given by the OID defining the
curve. Add support for understanding the OIDs listed in RFC6637 (256,
384 + 521 bits).
Jonathan McDowell [Mon, 4 Nov 2013 00:41:13 +0000 (16:41 -0800)]
Add support for displaying EC/ECDSA key types
Switch to a common pkalgo to char function and include the EC/ECDSA
key types (e/E) in it.
Jonathan McDowell [Sun, 3 Nov 2013 20:58:27 +0000 (12:58 -0800)]
Add example v3 Elgamal key
Jonathan McDowell [Sun, 3 Nov 2013 19:36:11 +0000 (11:36 -0800)]
Fix signature hash checking for RIPEMD-160
There was a missing break statement in the RIPEMD-160 case that resulted
in us miscalculating the signature hash for a signature using RIPEMD-160.
Jonathan McDowell [Sun, 3 Nov 2013 01:22:33 +0000 (18:22 -0700)]
Add support for old Elgamal v3 key IDs
Old versions of GnuPG put Elgamal (type 16) keys inside v3 packets.
The method of getting the keyid for these keys was via a RIPE MD160
hash approach similar to the SHA-1 approach used in v4. While nothing
supports this these days there are keys in the public keyserver
network that contain this sort of data and if we don't parse the keyid
correctly we can't show things like self-sigs.
Jonathan McDowell [Sat, 2 Nov 2013 05:00:25 +0000 (22:00 -0700)]
Don't store a key if we can't get the keyid
If the get_keyid call fails for a key then we shouldn't be storing it,
so don't.
Jonathan McDowell [Sat, 2 Nov 2013 04:58:02 +0000 (21:58 -0700)]
Add a subkey ID mapping DB for DB4 backend
With the increased use of signature subkeys and the fact long
keyids are being used to do HKP lookups we need to store a mapping
of the subkey long keyids to primary key ids. Previously the fact
we did this for the 32 bit subkey id was enough. Add a new DB for
the DB4 backend that can map the 64 bit subkey ID to the 64 bit
primary key ID.
Jonathan McDowell [Sat, 2 Nov 2013 04:51:09 +0000 (21:51 -0700)]
Check that libcurl supports SSL if using HKPS with HKP backend
Use CURL's runtime feature checking to ensure that we have support
for SSL before trying to use a HKPS (HTTPS) remote keyserver with
the HKP keydb backend.
Jonathan McDowell [Sat, 2 Nov 2013 04:31:43 +0000 (21:31 -0700)]
Include keyid when logging signature checking errors
Having information on an unknown signature hash or version is much
more useful if we know what key it's associated with.
Jonathan McDowell [Sat, 2 Nov 2013 04:15:04 +0000 (21:15 -0700)]
Try to use a user specific configuration file if available
Try looking for $XDG_CONFIG_HOME/onak.conf (or $HOME/.config/onak.conf
if $XDG_CONFIG_HOME is not set) before looking for the system wide
config file. This allows users to use their own config file without
having to always use the -c option to provide it.
Jonathan McDowell [Sat, 2 Nov 2013 03:59:51 +0000 (20:59 -0700)]
Fix memory leaks found using valgrind
A harmless failure to cleanup the config structure before exiting
keydctl and a more major (small, but key runs for a long period of
time) leak of the search string for fetching a key by text string
in keyd.
Jonathan McDowell [Sat, 2 Nov 2013 03:56:41 +0000 (20:56 -0700)]
Add some more algorithm constants to openpgp.h
Some from RFC2440 (MD2/SHA1X), some from GnuPG (CAMELLIA).
Jonathan McDowell [Wed, 9 Oct 2013 16:35:29 +0000 (17:35 +0100)]
Make wotsap ignore revoked keys
wotsap wasn't paying attention to keys that were revoked, leading to them
being included in the output key/signature lists. Force the load of a key
before colouring it so we can ignore it if it's revoked.
Jonathan McDowell [Wed, 9 Oct 2013 16:10:00 +0000 (17:10 +0100)]
Enhance HKP backend URL parsing
The initial commit of the HKP backend just took a hostname as the "db_dir"
parameter. Extend this to cope with an http:// or hkp:// style URL, allowing
the port to be specified as well.
Jonathan McDowell [Wed, 9 Oct 2013 11:30:44 +0000 (12:30 +0100)]
Remove now obsolete SYMBOL_CACHE_SIZE directive from Doxygen config
Jonathan McDowell [Wed, 9 Oct 2013 11:15:56 +0000 (12:15 +0100)]
Clean up use of K&R style function definitions in md5.c
md5_process_block / md5_read_ctx had K&R style function definitions.
Clean them up to use ANSI C style like the rest of the code (including
other functions in that file). Spotted by Doxygen.
Jonathan McDowell [Wed, 9 Oct 2013 10:46:42 +0000 (11:46 +0100)]
Switch keyd to allow multiple clients to be served at once
keyd was only accepting a single connection at a time and dealing with
all the requests from it before accepting the next client. This causes
delays in regular HKP processing while running something like wotsap on
a live keyserver.
Most of the pieces were already in place to deal with a per request select
based processing loop, so this commit switches to that model. A better
solution in the future may be to consider the use of libevent or libev,
but at present this enables the use of long runs stats programs while
still being able to service HKP requests in reasonable time.
Jonathan McDowell [Sun, 6 Oct 2013 17:05:20 +0000 (18:05 +0100)]
Bump debhelper compat level to 9
Jonathan McDowell [Sun, 6 Oct 2013 12:19:19 +0000 (13:19 +0100)]
Alter version number to indicate git build
Jonathan McDowell [Sun, 6 Oct 2013 12:15:39 +0000 (13:15 +0100)]
Use dh-autoreconf to rebuild autoconf artifacts
Jonathan McDowell [Sun, 6 Oct 2013 11:41:18 +0000 (12:41 +0100)]
Merge branch 'switch-to-debhelper' of git://git.sommitrealweird.co.uk/onak
Jonathan McDowell [Wed, 2 Oct 2013 10:34:23 +0000 (11:34 +0100)]
Add aclocal.m4 to .gitignore
Jonathan McDowell [Tue, 1 Oct 2013 16:08:38 +0000 (17:08 +0100)]
Set the user agent to onak/<version> for HKP backend
Jonathan McDowell [Tue, 1 Oct 2013 15:33:06 +0000 (16:33 +0100)]
Fix reference to onak binary to keydctl in keydctl help output
Brett Parker [Tue, 1 Oct 2013 11:30:52 +0000 (12:30 +0100)]
Switch debian build system to dh
Jonathan McDowell [Tue, 1 Oct 2013 11:09:01 +0000 (12:09 +0100)]
0.4.2 release
Release; update version string in configure.ac, README, Doxyfile.
Update HISTORY and debian/changelog.
Jonathan McDowell [Tue, 1 Oct 2013 10:42:22 +0000 (11:42 +0100)]
Update Debian Vcs-* fields to point to git repository
Jonathan McDowell [Tue, 1 Oct 2013 10:32:18 +0000 (11:32 +0100)]
Update Debian packaging standards version to 3.9.4
No changes other than bumping the date in the copyright file to be current.
Jonathan McDowell [Tue, 1 Oct 2013 10:29:12 +0000 (11:29 +0100)]
Use LDFLAGS when building backend shared objects
The LDFLAGS weren't being passed when linking the backend shared
objects; fix that so things like the hardening flags Debian adds
get uses correctly.
Jonathan McDowell [Mon, 30 Sep 2013 16:31:03 +0000 (17:31 +0100)]
Add HKP database backend
A potential use case of onak is as a proxy server. Add an HKP backend
that uses libcurl to make requests to a remote keyserver to fetch, search
or store keys. The "db_dir" configuration parameter becomes the base
host name for the remote keyserver e.g.:
db_backend hkp
db_dir the.earth.li
In the future the addition of the ability to stack database backends
should allow this to be used to turn onak into a caching keyserver.
Jonathan McDowell [Mon, 30 Sep 2013 14:18:31 +0000 (15:18 +0100)]
Add initial wotsap file generation tool
Wotsap (http://www.lysator.liu.se/~jc/wotsap/) is a web of trust
statistics and pathfinding tool. It takes a set of preformatted key
data covering the primary UID and signatures on each key.
This commit adds a tool which will generate the file data required for
wotsap. These files still need ar/bzip2 run against them in order to
be fed into wotsap, but are generated from the live keyring data.
Jonathan McDowell [Mon, 30 Sep 2013 11:50:01 +0000 (12:50 +0100)]
Add support for checking RIPEMD160 signatures
Sufficiently recent versions of nettle have support for RIPEMD160 and
there are various keys in the wild that use this algorithm, so add an
autoconf check for the nettle support and use it if it's available.
Jonathan McDowell [Mon, 30 Sep 2013 11:22:59 +0000 (12:22 +0100)]
Add -c option to maxpath / sixdegrees to specify config file
maxpath + sixdegrees weren't allowing a config file to be specified
in the same fashion as onak. Add the -c option so they do so, which
helps when using these tools in a non-system install setup.
Jonathan McDowell [Sun, 29 Sep 2013 21:51:18 +0000 (22:51 +0100)]
Fix PostgreSQL backend compilation
This got missed with the changes to get_keyid.
Jonathan McDowell [Sun, 29 Sep 2013 21:35:44 +0000 (22:35 +0100)]
Use OPENPGP_PACKET_COMMENT in parse_keys instead of raw constant
Jonathan McDowell [Sun, 29 Sep 2013 21:19:26 +0000 (22:19 +0100)]
Add ctags/cscope files to .gitignore + clean rule
Jonathan McDowell [Sun, 29 Sep 2013 21:12:21 +0000 (22:12 +0100)]
Prevent read_openpgp_stream from returning empty packets
If read_openpgp_stream got an invalid packet that had a semi valid
header it could potentially return an empty package, which would
confuse splitkeys. Cleanup the final package returned if it turns
out we didn't have valid data for it.
Fixes Debian bug #716350
Jonathan McDowell [Sun, 29 Sep 2013 20:30:06 +0000 (21:30 +0100)]
Only seed initial Debian package database if key file is available.
If the Debian package detected no keyring database on installation it
would seed the database with my key, from
/usr/share/doc/onak/noodles.key.gz. This is against Debian policy 12.3 -
packages cannot require files from /usr/share/doc/ to function. Only
seed the database if the file exists, avoiding issues installing when
skipping /usr/share/doc/
Fixes Debian bug #710665.
Jonathan McDowell [Sat, 25 Aug 2012 04:52:20 +0000 (21:52 -0700)]
Move stats_key structure to stats.h
It still ends up pulled into the core objects by mem.c / hash.c,
but we no longer pollute keystructs.h
Jonathan McDowell [Mon, 30 Jul 2012 01:36:11 +0000 (18:36 -0700)]
Remove dependency on onak-conf and logthing for splitkeys
No need for this to pull either the overall onak config or logthing in.