This series started off with an attempt to refactor the TLS
certificate validation code to remove duplication. I then
realized I ought to be testing such sensitive code too. So
the big interesting part of this patch is a test case todo
validation using very certificates. Rather than add a bunch
of certs to GIT, I have written (nasty) GNUTLS code to
generate certs on the fly with a variety of good & bad data
in them.