Re: [PATCH] remote: Fix TLS transport on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 20, 2010 at 06:10:21PM +0100, Matthias Bolte wrote:
> gnulib wraps Windows' SOCKET handle based send() and recv() functions
> into file descriptor based ones that are use in libvirt. By default
> GnuTLS uses the SOCKET handle based send() and recv() on Windows. This
> makes gnutls_handshake() fail internally with a WSAENOTSOCK error because
> libvirt passes a file descriptor; GnuTLS needs the SOCKET handle.

This doesn't entirely make any sense to me. GNUTLS also uses GNULIB,
including all its socket wrappers for send/recv. If the push/pull
function is NULL, gnulib does this

      if (session->internals._gnutls_push_func == NULL)
        {
          i = send (GNUTLS_POINTER_TO_INT (fd), &ptr[n - left], left, 0);

And this 'send' impl maps to GNULIBs replacement in GNUTLS tree, which
is identical to libvirt's 'send' impl

So AFAICT, the syscall behaviour will be identical both with & without
your proposed patch.

The only potential difference I can see is that when push/pull are
NULL, GNUTLS calls into  WSAGetLastError (); to set the errno
which is somewhat redundant as GNULIB has already called that and
used it to set errno.

Daniel

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]