tlsdate-helper: fix SAN checking

Right now, SAN checking checks against the host we're opening a socket to
instead of the host we're actually trying to talk to, which is fine... as long
as we don't have a proxy. Note that this problem only manifests for hosts whose
CN is not equal to their hostname (so the default host of www.ptb.de is fine).

To observe the problem:
$ ssh -D 127.0.0.1:30000 somehost
$ tlsdate -H clients3.google.com -x socks5://127.0.0.1:30000
hostname verification failed for host 127.0.0.1!
child process failed in SSL handshake

With this fix, you instead see no output.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Merge pull request #78 from elly/proxy-san

tlsdate-helper: fix SAN checking
tlsdate-dbus-announce: use name and flush connection

Have tlsdate-dbus-announce grab a well-known bus name before it sends its
signal, and have it wait for the signal to actually be sent over the bus before
exiting.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Merge pull request #79 from elly/dbus-flush

tlsdate-dbus-announce: use name and flush connection
tlsdated: pass -l and -v through to tlsdate

Supply these options to tlsdate as needed. The ultimate goal of these changes is
to avoid passing an arbitrary tlsdate argv to tlsdated.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Merge pull request #80 from elly/tlsdate-argvec

tlsdated: pass -l and -v through to tlsdate
tlsdated: log more aggressively

Sometimes it's not clear from syslogs when tlsdated is starting and exiting, so
make it be explicit about these things when verbose. Also, dump both the cached
timestamp and the sysclock at startup.

Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Merge pull request #82 from elly/aggressive-logging

tlsdated: log more aggressively
tlsdate-helper: Include the CA cert container path in error messages

It makes debugging permission issues or incorrect paths more convenient.
return-argc: Fix prototype to silence compiler complaint
tlsdate-helper: Remove a pointless assignment
Fix a small memory leak in a conf_parse() error path
Fix a typo in the Mac OS X instructions
autogen.sh: Ignore autoconf warnings on FreeBSD

Prevents "upstream" issues like:

fk@r500 ~/git/tlsdate $./autogen.sh
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force -I m4
aclocal-1.12: warnings are treated as errors
/usr/local/share/aclocal/libxosd.m4:9: warning: underquoted definition of AM_PATH_LIBXOSD
/usr/local/share/aclocal/libxosd.m4:9:   run info Automake 'Extending aclocal'
/usr/local/share/aclocal/libxosd.m4:9:   or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoreconf-2.69: aclocal failed with exit status: 1
Add FreeBSD support for tlsdate and tlsdate-helper
Merge conflict issues
Add FreeBSD support for tlsdate and tlsdate-helper
configure.ac: Add an explicit check for fmemopen on FreeBSD

The unit tests need it and segfault if the autoconf
goo picks up a compiler that hides the prototype.
Makefile.am: Only try to run tlsdated_unittest on GNU/Linux

It currently doesn't compile on FreeBSD (and probably Mac OS X).
Only tested on FreeBSD where this commit gets the "check" target working.
Install GNU/Linux-only files only on GNU/Linux

Only tested on FreeBSD.