]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix reporting of cert validation failures
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 15 Jul 2011 10:40:35 +0000 (11:40 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 15 Jul 2011 15:26:07 +0000 (16:26 +0100)
commitf2845177e2148edd44f90f14cc1bbb144a66f0ab
tree1d6cf40fcfe744d686547a9e0981c9be12521408
parent618b55220ac0cfdbfb4fa4af6adf7631a9962397
Fix reporting of cert validation failures

If the server succesfully validates the client cert, it will send
back a single byte, under TLS. If it fails, it will close the
connection. In this case, we were just reporting the standard
I/O error. The original RPC code had a special case hack for the
GNUTLS_E_UNEXPECTED_PACKET_LENGTH error code to make us report
a more useful error message

* src/rpc/virnetclient.c: Return ENOMSG if we get
  GNUTLS_E_UNEXPECTED_PACKET_LENGTH
* src/rpc/virnettlscontext.c: Report cert failure if we
  see ENOMSG
src/rpc/virnetclient.c
src/rpc/virnettlscontext.c