[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Check for SSL support in wget
From: |
Micah Cowan |
Subject: |
Re: [Bug-wget] Check for SSL support in wget |
Date: |
Thu, 26 Feb 2009 08:27:15 -0800 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Paul wrote:
> Hi,
>
> I'm using wget in a script, and want to use HTTPS instead of HTTP if
> wget supports it. Therefore I'm looking for a supported way to determine
> whether a certain instance of wget supports HTTPS.
>
> Looking through the source of various wget versions, I found this to be
> one way:
>
> wget --help | grep HTTPS
>
> This works because wget (>= 1.10) only shows the HTTPS options if it's
> compiled with SSL support. As far as older releases are concerned, I
> could check for the old deprecated SSL options or always use http with
> those old binaries.
>
> Is there a better way to perform the check I need? Is the method I use
> now supposed to be supported in ongoing versions of wget?
In currently-released versions of Wget, you're stuck with the trick
above. However, in current development versions, wget --version now
produces output like:
- --------------------------------------------------------------
GNU Wget 1.12-devel (7fc761b25158)
Options : +digest +ipv6 +nls +ntlm +opie +md5/openssl -gnutls
+openssl +gettext
Wgetrc : /opt/wget/etc/wgetrc (system)
Locale : /opt/wget/share/locale
Compile : gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/opt/wget/etc/wgetrc"
-DLOCALEDIR="/opt/wget/share/locale" -I. -I../lib -g
Link : gcc -g -lssl -lcrypto -ldl -lrt ftp-opie.o openssl.o
http-ntlm.o gen-md5.o ../lib/libgnu.a
Copyright © 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Nikšić <address@hidden>.
Currently maintained by Micah Cowan <address@hidden>.
Please send bug reports and questions to <address@hidden>.
- --------------------------------------------------------------
Thanks to work done by Madhusudan Hosaagrahara. So you would probably
grep for either of +gnutls or +openssl (it might be worthwhile to
explicitly have a separate, generic +ssl or +https to explicitly
indicate HTTPS support regardless of what implementation is used). This
sort of thing will be supported in future versions; I can't promise your
current method will be.
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmmwuMACgkQ7M8hyUobTrE/PACfTcadvcGj0pwHTRTmW54LlOUw
7MoAn3fSOTc/oQS37mm7D/HLha2IPvb5
=LNlt
-----END PGP SIGNATURE-----