Add some basic sanity checking of certificates before use
Add some basic sanity checking of certificates before use

If the libvirt daemon or libvirt client is configured with bogus
certificates, it is very unhelpful to only find out about this
when a TLS connection is actually attempted. Not least because
the error messages you get back for failures are incredibly
obscure.

This adds some basic sanity checking of certificates at the
time the virNetTLSContext object is created. This is at libvirt
startup, or when creating a virNetClient instance.

This checks that the certificate expiry/start dates are valid
and that the certificate is actually signed by the CA that is
loaded.

* src/rpc/virnettlscontext.c: Add certificate sanity checks

nertpinx/libvirt,shugaoye/libvirt,emaste/libvirt,zhlcindy/libvirt-1.1.4-maintain,taget/libvirt,bjzhang/libvirt,VenkatDatta/libvirt,libvirt/libvirt,siboulet/libvirt-openvz,olafhering/libvirt,zhlcindy/libvirt-1.1.4-maintain,trainstack/libvirt,rlaager/libvirt,trainstack/libvirt,datto/libvirt,jeckersb/libvirt,danwent/libvirt-ovs,zippy2/libvirt,wiedi/libvirt,emaste/libvirt,trainstack/libvirt,jardasgit/libvirt,novel/fbsd-libvirt,shugaoye/libvirt,crobinso/libvirt,leilihh/libvirt,soulxu/libvirt-xuhj,jardasgit/libvirt,usc-isi/libvirt,rmarwaha/libvirt1,fabianfreyer/libvirt,warewolf/libvirt,foomango/libvirt,emaste/libvirt,novel/fbsd-libvirt,bjzhang/libvirt,iam-TJ/libvirt,bjzhang/libvirt,elmarco/libvirt,olafhering/libvirt,iam-TJ/libvirt,soulxu/libvirt-xuhj,warewolf/libvirt,emaste/libvirt,novel/fbsd-libvirt,wiedi/libvirt,andreabolognani/libvirt,jardasgit/libvirt,jeckersb/libvirt,crobinso/libvirt,andreabolognani/libvirt,foomango/libvirt,taget/libvirt,siboulet/libvirt-openvz,dumbbell/libvirt,shugaoye/libvirt,trainstack/libvirt,olafhering/libvirt,agx/libvirt,cbosdo/libvirt,emaste/libvirt,siboulet/libvirt-openvz,shugaoye/libvirt,warewolf/libvirt,wiedi/libvirt,agx/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,eskultety/libvirt,warewolf/libvirt,andreabolognani/libvirt,kantai/libvirt-vfork,leilihh/libvirt,VenkatDatta/libvirt,leilihh/libvirt,iam-TJ/libvirt,crobinso/libvirt,libvirt/libvirt,agx/libvirt,rmarwaha/libvirt1,usc-isi/libvirt,nertpinx/libvirt,danwent/libvirt-ovs,andreabolognani/libvirt,rmarwaha/libvirt1,danwent/libvirt-ovs,elmarco/libvirt,nertpinx/libvirt,novel/fbsd-libvirt,fabianfreyer/libvirt,dumbbell/libvirt,dumbbell/libvirt,elmarco/libvirt,taget/libvirt,jfehlig/libvirt,rlaager/libvirt,elmarco/libvirt,warewolf/libvirt,datto/libvirt,wiedi/libvirt,rmarwaha/libvirt,siboulet/libvirt-openvz,eskultety/libvirt,kantai/libvirt-vfork,bjzhang/libvirt,VenkatDatta/libvirt,dumbbell/libvirt,rmarwaha/libvirt1,wiedi/libvirt,cbosdo/libvirt,leilihh/libvirt,jfehlig/libvirt,crobinso/libvirt,agx/libvirt,eskultety/libvirt,fabianfreyer/libvirt,kantai/libvirt-vfork,taget/libvirt,wiedi/libvirt,warewolf/libvirt,VenkatDatta/libvirt,datto/libvirt,rmarwaha/libvirt,eskultety/libvirt,trainstack/libvirt,shugaoye/libvirt,rmarwaha/libvirt,iam-TJ/libvirt,rmarwaha/libvirt1,trainstack/libvirt,libvirt/libvirt,olafhering/libvirt,libvirt/libvirt,novel/fbsd-libvirt,usc-isi/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,jfehlig/libvirt,rmarwaha/libvirt,usc-isi/libvirt,iam-TJ/libvirt,rmarwaha/libvirt,foomango/libvirt,nertpinx/libvirt,novel/fbsd-libvirt,kantai/libvirt-vfork,bjzhang/libvirt,dumbbell/libvirt,jeckersb/libvirt,taget/libvirt,rlaager/libvirt,rlaager/libvirt,warewolf/libvirt,jeckersb/libvirt,dumbbell/libvirt,wiedi/libvirt,datto/libvirt,siboulet/libvirt-openvz,elmarco/libvirt,soulxu/libvirt-xuhj,agx/libvirt,zippy2/libvirt,leilihh/libvirt,novel/fbsd-libvirt,jardasgit/libvirt,cbosdo/libvirt,jardasgit/libvirt,emaste/libvirt,leilihh/libvirt,soulxu/libvirt-xuhj,jeckersb/libvirt,jeckersb/libvirt,trainstack/libvirt,jfehlig/libvirt,novel/fbsd-libvirt,zippy2/libvirt,nertpinx/libvirt,usc-isi/libvirt,danwent/libvirt-ovs,VenkatDatta/libvirt,datto/libvirt,soulxu/libvirt-xuhj,iam-TJ/libvirt,andreabolognani/libvirt,kantai/libvirt-vfork,iam-TJ/libvirt,zhlcindy/libvirt-1.1.4-maintain,zippy2/libvirt,emaste/libvirt,danwent/libvirt-ovs,foomango/libvirt,novel/fbsd-libvirt,jeckersb/libvirt,fabianfreyer/libvirt,foomango/libvirt,eskultety/libvirt,rmarwaha/libvirt,rmarwaha/libvirt1,fabianfreyer/libvirt,rlaager/libvirt