-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

(We don't have reply-to's set; I've re-included the list on this.)

Ray Phillips wrote:
> Thanks for your reply Micah.
> 
> 
>> Ray Phillips wrote:
>>>  I thought I'd report my experiences trying to install wget 1.10.2 on
>>>  NetBSD/i386 3.1.  I'll append the contents of config.log to the end of
>>>  this email.
>>
>> <snip>
>>
>>>  gcc -I. -I.   -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/usr/local/etc/wgetrc\"
>>>  -DLOCALEDIR=\"/usr/local/share/locale\" -O2 -Wall -Wno-implicit -c
>>>  http-ntlm.c
>>>  http-ntlm.c:185: error: parse error before "des_key_schedule"
>>>  http-ntlm.c: In function `setup_des_key':
>>>  http-ntlm.c:187: error: `des_cblock' undeclared (first use in this
>>>  function)
>>
>> What version of OpenSSL do you have installed?
> 
> % which openssl
> /usr/bin/openssl
> % openssl version
> OpenSSL 0.9.7d 17 Mar 2004
> %
> 
>> DES_key_schedule and DES_cblock are defined in <openssl/des.h> in
>> recent versions; they are uncapitalized in some old versions. It
>> appears that your <openssl/des.h> does not declare these.
> 
> % sed -n '75,91p' /usr/include/openssl/des.h
> 
> typedef unsigned char DES_cblock[8];
> typedef /* const */ unsigned char const_DES_cblock[8];
> /* With "const", gcc 2.8.1 on Solaris thinks that DES_cblock *
>  * and const_DES_cblock * are incompatible pointer types. */
> 
> typedef struct DES_ks
>     {
>     union
>         {
>         DES_cblock cblock;
>         /* make sure things are correct size on machines with
>          * 8 byte longs */
>         DES_LONG deslong[2];
>         } ks[16];
>     } DES_key_schedule;
> 
> %
> 
> Does that look OK to you?
> 
> I've just installed openssl 0.9.8e to see if it helps:

<snip>

> so there's no difference in that part of the code.  However, when I tell
> wget to use version 0.9.8e it compiles without error, as shown at the
> end of this email.
> 
> It would be nice if wget 1.10.2 would compile on NetBSD without having
> to install a second version of openssl.

Well, it's too late to change Wget 1.10.2; any new version would have a
new version number. Wget 1.11 will be releasing RSN, though, so
hopefully we'll be able to square this in time for that release (we're
mostly just waiting on resolution of some licensing issues, which should
be done shortly).

It appears from your description that Wget's check in http-ntlm.c:

  #if OPENSSL_VERSION_NUMBER < 0x00907001L

is wrong. Your copy of openssl seems to be issuing a number lower than
that, and yet has the newer, capitalized names. However, when I download
a copy of openssl-0.9.7d, I get a copy of opensslv.h that gives:

  #define OPENSSL_VERSION_NUMBER       0x0090704fL

The likeliest explanation, to me, is that OPENSSL_VERSION_NUMBER isn't
being defined by this point, which will cause the C preprocessor to
replace it in #if conditionals with 0 (guaranteeing a false positive).

I actually can't figure out how we're getting a definition of
OPENSSL_VERSION_NUMBER at all: AFAICT we're not directly #including
<openssl/opensslv.h>... it looks like we're depending on one of
<openssl/md4.h> and <openssl/des.h> to #include it indirectly.

It works for me because des.h includes des_old.h (for support for the
uncapitalized symbols), which includes ui_compat.h, which includes ui.h,
which includes crypto.h... which includes opensslv.h. But des_old.h is
only included if OPENSSL_DISABLE_OLD_DES_SUPPORT is not set. Probably it
isn't, on most systems, but happens to be on yours (perhaps in
<openssl/opensslconf.h>.

This obviously seems pretty precarious, and http-ntlm.c should be
directly #including <openssl/opensslv.h> rather than trusting to fate
that it will get #included by-and-by.

Ray, if you add the line

 #include <openssl/opensslv.h>

along with the other openssl #includes, does it fix your problem wrt
openssl-9.7d?

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHDUch7M8hyUobTrERCOXLAJ0eblOOGQ5SMrFKSfT8Tc13dpuECACfcs+M
4m3LuGLNEoIzdxEJ61HDILQ=
=Hvld
-----END PGP SIGNATURE-----

Reply via email to