qemu-patch-raspberry4/include
Daniel P. Berrange 9a2fd4347c crypto: add sanity checking of TLS x509 credentials
If the administrator incorrectly sets up their x509 certificates,
the errors seen at runtime during connection attempts are very
obscure and difficult to diagnose. This has been a particular
problem for people using openssl to generate their certificates
instead of the gnutls certtool, because the openssl tools don't
turn on the various x509 extensions that gnutls expects to be
present by default.

This change thus adds support in the TLS credentials object to
sanity check the certificates when QEMU first loads them. This
gives the administrator immediate feedback for the majority of
common configuration mistakes, reducing the pain involved in
setting up TLS. The code is derived from equivalent code that
has been part of libvirt's TLS support and has been seen to be
valuable in assisting admins.

It is possible to disable the sanity checking, however, via
the new 'sanity-check' property on the tls-creds object type,
with a value of 'no'.

Unit tests are included in this change to verify the correctness
of the sanity checking code in all the key scenarios it is
intended to cope with. As part of the test suite, the pkix_asn1_tab.c
from gnutls is imported. This file is intentionally copied from the
(long since obsolete) gnutls 1.6.3 source tree, since that version
was still under GPLv2+, rather than the GPLv3+ of gnutls >= 2.0.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-09-15 15:05:09 +01:00
..
block block: Allow specifying driver-specific options to reopen 2015-09-14 16:51:36 +02:00
crypto crypto: add sanity checking of TLS x509 credentials 2015-09-15 15:05:09 +01:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec * Support for jemalloc 2015-09-14 16:13:16 +01:00
fpu softfloat: expand out STATUS macro 2015-02-06 16:11:38 +00:00
hw * Support for jemalloc 2015-09-14 16:13:16 +01:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration migration: Fix global state with Xen. 2015-08-03 16:13:23 +00:00
monitor Include monitor/monitor.h exactly where needed 2015-06-22 18:20:41 +02:00
net qmp: Wean off qerror_report() 2015-06-22 18:20:40 +02:00
qapi error: On abort, report where the error was created 2015-09-10 13:48:06 +02:00
qemu * Support for jemalloc 2015-09-14 16:13:16 +01:00
qom * Support for jemalloc 2015-09-14 16:13:16 +01:00
standard-headers virtio-input: move sys/ioctl.h include 2015-07-16 17:34:41 +02:00
sysemu Added generic panic handler qemu_system_guest_panicked() 2015-09-07 18:14:03 +02:00
ui Include monitor/monitor.h exactly where needed 2015-06-22 18:20:41 +02:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h linux/elf.h update 2015-05-27 17:52:03 +02:00
glib-compat.h glib: remove stale compat functions 2015-05-22 15:58:06 -04:00
qemu-common.h * Support for jemalloc 2015-09-14 16:13:16 +01:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00