Porterfield, Sean | 12 Dec 2011 13:35

Ubuntu 11.10 SSLv2 error compiling

I recently installed Ubuntu 11.10 and have an error compiling tn5250.

make[2]: Entering directory `/home/sporter/src/tn5250/lp5250d'
gcc -DHAVE_CONFIG_H -I. -I.. -DSYSCONFDIR=\"/usr/local/etc\" -I../lib5250  -I/usr/include  -g -O2 -MT
scs2ascii.o -MD -MP -MF .deps/scs2ascii.Tpo -c -o scs2ascii.o scs2ascii.c
mv -f .deps/scs2ascii.Tpo .deps/scs2ascii.Po
/bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2   -o scs2ascii scs2ascii.o ../lib5250/lib5250.la
-lssl -lcrypto
libtool: link: gcc -g -O2 -o .libs/scs2ascii scs2ascii.o  ../lib5250/.libs/lib5250.so -lssl -lcrypto
../lib5250/.libs/lib5250.so: undefined reference to `SSLv2_client_method'
collect2: ld returned 1 exit status
make[2]: *** [scs2ascii] Error 1
make[2]: Leaving directory `/home/sporter/src/tn5250/lp5250d'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sporter/src/tn5250'
make: *** [all] Error 2

I think OpenSSL no longer includes SSLv2 support.  I also think I may be able to hack it to get it working, but I
have no idea the "right way" to fix this.  I suspect something in configure or just removing SSLv2 support completely.
--
Sean Porterfield

This email is confidential, intended only for the named recipient(s) above and may contain information
that is privileged.  If you have received this message in error or are not the named recipient(s), please
notify the sender immediately and delete this email message from your computer as any and all
unauthorized distribution or use of this message is strictly prohibited.  Thank you.
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
(Continue reading)

Scott Klement | 12 Dec 2011 18:26
Favicon

Re: Ubuntu 11.10 SSLv2 error compiling

hi Sean,

What version of OpenSSL are you using?  I don't really want to install 
Ubuntu just to figure out the solution. :-)

type: openssl version

On 12/12/2011 6:35 AM, Porterfield, Sean wrote:
> I recently installed Ubuntu 11.10 and have an error compiling tn5250.
>
> make[2]: Entering directory `/home/sporter/src/tn5250/lp5250d'
> gcc -DHAVE_CONFIG_H -I. -I.. -DSYSCONFDIR=\"/usr/local/etc\" -I../lib5250  -I/usr/include  -g -O2
-MT scs2ascii.o -MD -MP -MF .deps/scs2ascii.Tpo -c -o scs2ascii.o scs2ascii.c
> mv -f .deps/scs2ascii.Tpo .deps/scs2ascii.Po
> /bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2   -o scs2ascii scs2ascii.o ../lib5250/lib5250.la
-lssl -lcrypto
> libtool: link: gcc -g -O2 -o .libs/scs2ascii scs2ascii.o  ../lib5250/.libs/lib5250.so -lssl -lcrypto
> ../lib5250/.libs/lib5250.so: undefined reference to `SSLv2_client_method'
> collect2: ld returned 1 exit status
> make[2]: *** [scs2ascii] Error 1
> make[2]: Leaving directory `/home/sporter/src/tn5250/lp5250d'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/sporter/src/tn5250'
> make: *** [all] Error 2
>
> I think OpenSSL no longer includes SSLv2 support.  I also think I may be able to hack it to get it working, but I
have no idea the "right way" to fix this.  I suspect something in configure or just removing SSLv2 support completely.
> --
> Sean Porterfield
>
(Continue reading)

Porterfield, Sean | 12 Dec 2011 19:39

Re: Ubuntu 11.10 SSLv2 error compiling

OpenSSL 1.0.0e 6 Sep 2011

For my purposes, I just commented out the section referencing ssl2 in sslstream.c
--
Sean Porterfield
________________________________________
From: Scott Klement

hi Sean,

What version of OpenSSL are you using?  I don't really want to install
Ubuntu just to figure out the solution. :-)

type: openssl version

On 12/12/2011 6:35 AM, Porterfield, Sean wrote:
> I recently installed Ubuntu 11.10 and have an error compiling tn5250.
>
> make[2]: Entering directory `/home/sporter/src/tn5250/lp5250d'
> gcc -DHAVE_CONFIG_H -I. -I.. -DSYSCONFDIR=\"/usr/local/etc\" -I../lib5250  -I/usr/include  -g -O2
-MT scs2ascii.o -MD -MP -MF .deps/scs2ascii.Tpo -c -o scs2ascii.o scs2ascii.c
> mv -f .deps/scs2ascii.Tpo .deps/scs2ascii.Po
> /bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2   -o scs2ascii scs2ascii.o ../lib5250/lib5250.la
-lssl -lcrypto
> libtool: link: gcc -g -O2 -o .libs/scs2ascii scs2ascii.o  ../lib5250/.libs/lib5250.so -lssl -lcrypto
> ../lib5250/.libs/lib5250.so: undefined reference to `SSLv2_client_method'
> collect2: ld returned 1 exit status
> make[2]: *** [scs2ascii] Error 1
> make[2]: Leaving directory `/home/sporter/src/tn5250/lp5250d'
> make[1]: *** [all-recursive] Error 1
(Continue reading)

Scott Klement | 12 Dec 2011 20:36
Favicon

Re: Ubuntu 11.10 SSLv2 error compiling

Hi Sean,

I can't reproduce the problem, locally.  The newest copy of OpenSSL that 
I have is 1.0.0d, which might be the reason why I can't reproduce it. 
But, tn5250 seems to build without issue.

Given the symptom, I'm thinking there's only one minor change that would 
be needed in sslstream.c

Currently, it we have this:

    strcpy(methstr,"auto");
    if (This->config!=NULL &&
         tn5250_config_get (This->config, "ssl_method")) {
         strncpy(methstr, tn5250_config_get (This->config,
             "ssl_method"), 4);
         methstr[4] = '\0';
    }

    if (!strcmp(methstr, "ssl2")) {
         meth = SSLv2_client_method();
         TN5250_LOG(("SSL Method = SSLv2_client_method()\n"));
    } else if (!strcmp(methstr, "ssl3")) {
         meth = SSLv3_client_method();
         TN5250_LOG(("SSL Method = SSLv3_client_method()\n"));
    } else {
         meth = SSLv23_client_method();
         TN5250_LOG(("SSL Method = SSLv23_client_method()\n"));
    }

(Continue reading)

Porterfield, Sean | 12 Dec 2011 20:51

Re: Ubuntu 11.10 SSLv2 error compiling

That's exactly what I did, and it works great.  I misspoke slightly when I said I commented out the section,
since I clearly had to modify the if/else structure as you show.
--
Sean Porterfield
________________________________________
From:Scott Klement

Hi Sean,

I can't reproduce the problem, locally.  The newest copy of OpenSSL that
I have is 1.0.0d, which might be the reason why I can't reproduce it.
But, tn5250 seems to build without issue.

Given the symptom, I'm thinking there's only one minor change that would
be needed in sslstream.c

Currently, it we have this:

    strcpy(methstr,"auto");
    if (This->config!=NULL &&
         tn5250_config_get (This->config, "ssl_method")) {
         strncpy(methstr, tn5250_config_get (This->config,
             "ssl_method"), 4);
         methstr[4] = '\0';
    }

    if (!strcmp(methstr, "ssl2")) {
         meth = SSLv2_client_method();
         TN5250_LOG(("SSL Method = SSLv2_client_method()\n"));
    } else if (!strcmp(methstr, "ssl3")) {
(Continue reading)

Carey Evans | 12 Dec 2011 20:13
Picon
Favicon
Gravatar

Re: Ubuntu 11.10 SSLv2 error compiling

On 13 December 2011 06:26, Scott Klement <tn5250@...> wrote:

> What version of OpenSSL are you using?  I don't really want to install
> Ubuntu just to figure out the solution. :-)
>

Debian disabled SSLv2 at compile time in version 1.0.0c. (
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589706)

Ubuntu version 11.10 ships with OpenSSL 1.0.0e, including that change. (
http://packages.ubuntu.com/oneiric/openssl)
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.


Gmane