[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] new alpha tarball wget-1.12-2460.tar.bz2
From: |
Ray Satiro |
Subject: |
Re: [Bug-wget] new alpha tarball wget-1.12-2460.tar.bz2 |
Date: |
Tue, 29 Mar 2011 23:18:12 -0700 (PDT) |
Hi,
It is still an issue that wget/openssl combo is broken in windows. Wget source
has changed to file descriptors for sending and receiving data in windows.
OpenSSL in windows expects a socket that it can recv/send. From OpenSSL's
e_os.h
for WINDOWS:
#define readsocket(s,b,n)recv((s),(b),(n),0)
#define writesocket(s,b,n)send((s),(b),(n),0)
Anything in OpenSSL that tries to write to a socket will fail because it's
passed a fd and not a socket. For example sock_write() in openssl's
crypto/bio/bss_sock.c:153 calling send() and passing a fd will cause an error
of
WSAENOTSOCK.
Here are three ideas:
1. Revert to sockets don't use gnulib select() etc
2. Although OpenSSL's BIOs are abstract enough that it is possible to change
the
pointer to their associated read/write functions in wget (specifically those
used by bss_conn/dgram/sock, respectively). It's hacky to do this though, and
it
could cause problems if OpenSSL later changes their BIO code.
3. In wget's openssl.c to get the handle/socket from the fd using (SOCKET)
_get_osfhandle ((fd)) and pass that, as is now done elsewhere in wget code.
Although OpenSSL can then send/recv, I witnessed data dropouts while testing
this.
Has anyone else tested mingw wget build with mingw openssl since the change in
wget to file descriptors on windows?
Another thing is the configure test for openssl is still using ssl and crypto
libs
configure:22076: gcc -o conftest.exe -O2 -Wall conftest.c -lssl -lcrypto >&5
but on windows you want
-lssl -lcrypto -lws2_32 -lgdi32
As I mentioned at some other point in time what you'd expect is shared libs
when
building. Unfortunately a similar test for that will fail if the actual dll is
not in the path. Would it be better for just an AC_CHECK_LIB on eay32 and ssl32?
Another thing re ipv6 support:
host.c: In function 'getaddrinfo_with_timeout_callback':
host.c:383:3: warning: implicit declaration of function 'getaddrinfo'
host.c: In function 'lookup_host':
host.c:787:5: warning: implicit declaration of function 'freeaddrinfo'
In windows ws2tcpip.h should be included in addition to winsock2.h. Some
headers
for ws2tcpip.h have the winsock2.h include some don't. The order is
# include <winsock2.h>
# include <ws2tcpip.h>
When ipv6 is enabled _WIN32_WINNT should be defined >= 0x0501 (WinXP) before
includes. This means wget with ipv6 will not work on win2000. There's a
solution
for this but it requires rewriting code that is copyrighted microsoft for a
getaddrinfo wrapper, unless someone has already done this. Is windows 2000
support still wanted? I have one request from last year but other than that I
don't hear about it anymore.
Thanks,
Jay Satiro on behalf of the GetGnuWin32 project
----- Original Message ----
> From: Giuseppe Scrivano <address@hidden>
> To: address@hidden
> Sent: Sun, March 27, 2011 10:37:57 AM
> Subject: Re: [Bug-wget] new alpha tarball wget-1.12-2460.tar.bz2
>
> Hello,
>
> as a followup to the last alpha release, I have uploaded a new tarball
> with some minor changes:
>
> ftp://alpha.gnu.org/gnu/wget/wget-1.12-2466.tar.bz2
>
> and the detached GPG signature using the key C03363F4:
>
> ftp://alpha.gnu.org/gnu/wget/wget-1.12-2466.tar.bz2.sig
>
>
> If no problems are found, I am going to finally release wget 1.13 in the
> next few days.
>
> Cheers,
> Giuseppe
>
>