]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remote: Fix TLS transport on Windows
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 20 Nov 2010 17:04:42 +0000 (18:04 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 23 Nov 2010 17:31:42 +0000 (18:31 +0100)
commit9abe1e4358efe15608ceb452c4c07ae9d3b5ab6d
tree75b7b59e183ad418114e3f26fca577fb1c9b0c6d
parentb2399b06c5268b18f9a85b23968ecbaec4800999
remote: Fix TLS transport on Windows

gnulib wraps Windows' SOCKET handle based send() and recv() functions
into file descriptor based ones that are used in libvirt.

Even though GnuTLS is using gnulib too, it explicitly doesn't use
gnulib's replacement functions on Windows. By default GnuTLS uses the
SOCKET handle based send() and recv(). This makes gnutls_handshake()
fail internally with a WSAENOTSOCK error because libvirt passes a
file descriptor; GnuTLS needs the SOCKET handle.

To avoid this mismatch make sure that GnuTLS uses gnulib's replacment
functions, by setting custom pull() and push() functions for GnuTLS.
src/remote/remote_driver.c