OpenSSL 0.9.7d

patch for QNX6 and QNX4 available at
http://timonin.home.mindspring.com

I’m using patch v2.5.4 on QNX v4.25G, for some reason it rejects patching
the /openssl-0.9.7d/Makefile.ssl

Can you mail the patched version to me directly, please?

PS I’ve got perl v5.8.1, is it a must to have bash too? What is the latest
port of bash to qnx4?

Tony wrote:

I’m using patch v2.5.4 on QNX v4.25G, for some reason it rejects
patching the /openssl-0.9.7d/Makefile.ssl

Can you mail the patched version to me directly, please?

PS I’ve got perl v5.8.1, is it a must to have bash too? What is the
latest port of bash to qnx4?

Replied my mail.

OpenSSL v0.9.7e was released on 25th of October.
It is announced as an important bug-fix.

I did try to use Mr.'s Timonin’s patch from 0.9.7d - judging by the fact
it is partially rejected - the developers team has incorporated some
QNX-specific hacks into the distribution.

But still - I could not build the package (0.9.7e). More hacks needed.

Tony.

Hi,
I am trying to generate the binaries for OpenSSL (QNX4, 0.9.7f)
but I don´t know how to start. I have downloaded the source files
from OpenSSL.org and Mr. Timonin patches
but when I try to make the binaries I get a lot of error messages. My
first question is: Can I use the Watcom C compiler or do I need to
use gcc?

Is there any place I can find binaries for QNX4 for SSL?

Do you know if stunnel works under QNX4?

Thank you

On Fri, 17 Jun 2005 01:50:43 +0400, hmartinez
<dsnasa1@yahoo-dot-com.no-spam.invalid> wrote:

Can I use the Watcom C compiler or do I need to use gcc?
I compile all v0.9.7x with Watcom C v10.6B+Security_patch using the Mr.

Timonin’s excellent patches.

Is there any place I can find binaries for QNX4 for SSL?
I can mail you mine.

Tony.

I used these steps in trying to build OpenSSL for QNX4:

  1. Downloaded sources from openssl.org
  2. Used: patch -p1 <
    openssl-0.9.7f.diff (from Timonin’s page)
  3. Typed: [b:5d6d110cb1]./config no-threads no-shared no-hw [no-krb5]
    [no-idea] [no-cast][/b:5d6d110cb1]
  4. Typed: [b:5d6d110cb1]make SHELL=bash depend[/b:5d6d110cb1]
    (Got some warnings)
  5. Typed [b:5d6d110cb1]make SHELL=bash[/b:5d6d110cb1]

Got this compilation errors:

making all in crypto/x509…
make[2]: Entering directory /openssl-0.9.7f/crypto/x509' cc -I.. -I../.. -I../../include -DOPENSSL_NO_KRB5 -O -c x_all.c -o x_all.o ../../include/openssl/rsa.h(229): Error! E1044: Variable 'RSAPrivateKey_it' has incomplete type ../../include/openssl/rsa.h(228): Error! E1044: Variable 'RSAPublicKey_it' has incomplete type ../../include/openssl/pkcs7.h(279): Error! E1044: Variable 'PKCS7_ISSUER_AND_SERIAL_it' has incomplete type ../../include/openssl/pkcs7.h(301): Error! E1044: Variable 'PKCS7_it' has incomplete type ../../include/openssl/x509.h(858): Error! E1044: Variable 'X509_REQ_it' has incomplete type ../../include/openssl/x509.h(857): Error! E1044: Variable 'X509_REQ_INFO_it' has incomplete type ../../include/openssl/x509.h(871): Error! E1044: Variable 'X509_CINF_it' has incomplete type ../../include/openssl/x509.h(867): Error! E1044: Variable 'X509_NAME_it' has incomplete type ../../include/openssl/x509.h(873): Error! E1044: Variable 'X509_it' has incomplete type ../../include/openssl/x509.h(895): Error! E1044: Variable 'X509_CRL_it' has incomplete type ../../include/openssl/x509.h(894): Error! E1044: Variable 'X509_CRL_INFO_it' has incomplete type ../../include/openssl/x509.h(905): Error! E1044: Variable 'NETSCAPE_SPKAC_it' has incomplete type make[2]: *** [x_all.o] Error 12 make[2]: Leaving directory /openssl-0.9.7f/crypto/x509’
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/openssl-0.9.7f/crypto’
make: *** [sub_all] Error 1


Watcom compiler version is 10.6 (no release letter, are there any
upgrades?) (also no security patch)


Any ideas??


Thank you

hmartinezwrote:
I used these steps in trying to build OpenSSL for QNX4:

  1. Downloaded sources from openssl.org
  2. Used: patch -p1
    openssl-0.9.7f.diff (from Timonin’s page)
  3. Typed: [b:c82fca68fe]./config no-threads no-shared no-hw
    [no-krb5] [no-idea] [no-cast][/b:c82fca68fe]
  4. Typed: [b:c82fca68fe]make SHELL=bash depend[/b:c82fca68fe]
    (Got some warnings)
  5. Typed [b:c82fca68fe]make SHELL=bash[/b:c82fca68fe]

Got these compilation errors:

making all in crypto/x509…
make[2]: Entering directory /openssl-0.9.7f/crypto/x509' cc -I.. -I../.. -I../../include -DOPENSSL_NO_KRB5 -O -c x_all.c -o x_all.o ../../include/openssl/rsa.h(229): Error! E1044: Variable 'RSAPrivateKey_it' has incomplete type ../../include/openssl/rsa.h(228): Error! E1044: Variable 'RSAPublicKey_it' has incomplete type ../../include/openssl/pkcs7.h(279): Error! E1044: Variable 'PKCS7_ISSUER_AND_SERIAL_it' has incomplete type ../../include/openssl/pkcs7.h(301): Error! E1044: Variable 'PKCS7_it' has incomplete type ../../include/openssl/x509.h(858): Error! E1044: Variable 'X509_REQ_it' has incomplete type ../../include/openssl/x509.h(857): Error! E1044: Variable 'X509_REQ_INFO_it' has incomplete type ../../include/openssl/x509.h(871): Error! E1044: Variable 'X509_CINF_it' has incomplete type ../../include/openssl/x509.h(867): Error! E1044: Variable 'X509_NAME_it' has incomplete type ../../include/openssl/x509.h(873): Error! E1044: Variable 'X509_it' has incomplete type ../../include/openssl/x509.h(895): Error! E1044: Variable 'X509_CRL_it' has incomplete type ../../include/openssl/x509.h(894): Error! E1044: Variable 'X509_CRL_INFO_it' has incomplete type ../../include/openssl/x509.h(905): Error! E1044: Variable 'NETSCAPE_SPKAC_it' has incomplete type make[2]: *** [x_all.o] Error 12 make[2]: Leaving directory /openssl-0.9.7f/crypto/x509’
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/openssl-0.9.7f/crypto’
make: *** [sub_all] Error 1


Watcom compiler version is 10.6 (no release letter, are there any
upgrades?) (also no security patch)


Any ideas??


Thank you

OK, the problem was on step 3, what I really meant to type was:
[b:c82fca68fe]./config no-threads no-shared no-hw no-krb5 no-idea
no-cast[/b:c82fca68fe]


I finally have the binaries. Now, does anybody know if
[b:c82fca68fe]stunnel[/b:c82fca68fe] works under QNX4? Any other
software that has the same functionality as
[b:c82fca68fe]stunnel[/b:c82fca68fe] and has a port to QNX4?

Thanks

hmartinez wrote:

hmartinezwrote:

I used these steps in trying to build OpenSSL for QNX4:

  1. Downloaded sources from openssl.org
  2. Used: patch -p1

openssl-0.9.7f.diff (from Timonin’s page)

  1. Typed: [b:c82fca68fe]./config no-threads no-shared no-hw

[no-krb5] [no-idea] [no-cast][/b:c82fca68fe]

  1. Typed: [b:c82fca68fe]make SHELL=bash depend[/b:c82fca68fe]
    (Got some warnings)
  2. Typed [b:c82fca68fe]make SHELL=bash[/b:c82fca68fe]

Got these compilation errors:

making all in crypto/x509…
make[2]: Entering directory `/openssl-0.9.7f/crypto/x509’
cc -I… -I…/… -I…/…/include -DOPENSSL_NO_KRB5 -O -c x_all.c -o

x_all.o

…/…/include/openssl/rsa.h(229): Error! E1044: Variable

‘RSAPrivateKey_it’ has incomplete type

…/…/include/openssl/rsa.h(228): Error! E1044: Variable

‘RSAPublicKey_it’ has incomplete type

…/…/include/openssl/pkcs7.h(279): Error! E1044: Variable

‘PKCS7_ISSUER_AND_SERIAL_it’ has incomplete type

…/…/include/openssl/pkcs7.h(301): Error! E1044: Variable

‘PKCS7_it’ has incomplete type

…/…/include/openssl/x509.h(858): Error! E1044: Variable

‘X509_REQ_it’ has incomplete type

…/…/include/openssl/x509.h(857): Error! E1044: Variable

‘X509_REQ_INFO_it’ has incomplete type

…/…/include/openssl/x509.h(871): Error! E1044: Variable

‘X509_CINF_it’ has incomplete type

…/…/include/openssl/x509.h(867): Error! E1044: Variable

‘X509_NAME_it’ has incomplete type

…/…/include/openssl/x509.h(873): Error! E1044: Variable ‘X509_it’

has incomplete type

…/…/include/openssl/x509.h(895): Error! E1044: Variable

‘X509_CRL_it’ has incomplete type

…/…/include/openssl/x509.h(894): Error! E1044: Variable

‘X509_CRL_INFO_it’ has incomplete type

…/…/include/openssl/x509.h(905): Error! E1044: Variable

‘NETSCAPE_SPKAC_it’ has incomplete type

make[2]: *** [x_all.o] Error 12
make[2]: Leaving directory /openssl-0.9.7f/crypto/x509' make[1]: *** [subdirs] Error 1 make[1]: Leaving directory /openssl-0.9.7f/crypto’
make: *** [sub_all] Error 1


Watcom compiler version is 10.6 (no release letter, are there any

upgrades?) (also no security patch)


Any ideas??


Thank you


OK, the problem was on step 3, what I really meant to type was:
[b:c82fca68fe]./config no-threads no-shared no-hw no-krb5 no-idea
no-cast[/b:c82fca68fe]


I finally have the binaries. Now, does anybody know if
[b:c82fca68fe]stunnel[/b:c82fca68fe] works under QNX4? Any other
software that has the same functionality as
[b:c82fca68fe]stunnel[/b:c82fca68fe] and has a port to QNX4?

Thanks

With stunnel version 4.10 the following works for me under QNX4:

export CXXCPP=“cc -E”
export LD=cc
…/configure --without-gnu --without-gnu-ld --with-ssl=/usr/local/ssl

edit config.status and change (it’s one line)

s,@LIBS@,-lsocket -L/usr/local/ssl/lib -lssl -lcrypto -lRSAglue
-LNONE/lib -lrsaref ,;t t

to (it’s one line)

s,@LIBS@,-L/usr/tcptk/current/usr/lib -lsocket -L/usr/local/ssl/lib
-lssl -lcrypto ,;t t

you may check that socket.lib in /usr/lib is a link to TCP toolkit
library and do not insert -L… before -lsocket

make

Hello Vladimir Timonin,

I tried to compile OpenSSL 0.9.8 under QNX 6.3.0 SP1.
I first applied your patch.
then I performed:
#./config threads shared no-hw

Then I had a problem with “#make”.
Indeed, the “config” command broke nearly all include links (it misses
a letter - for instance - include/openssl/bio.h =>
crypto/bi/bio.h)

I searched a while and I found that links where done by
“utils/mklink.pl”.
I had to remove line 55 (unlink …).

With this modification I could perform successfully:
#tar zxf openssl-0.9.8.tar.gz
#cd openssl-0.9.8
#patch -p1 < …/openssl-0.9.8.diff
#./config threads shared no-hw
#make

But now, when I launch “make test”, I have the following error:
could not preload library …/util/…/libcrypto.so.0.9.8
…/util/…/libssl.so.0.9.8

Did you have the same problem?
(make install works and it seems that openssl is ok but I would rather
perform successfully the make test).

Thanks in advance and thank you for your openssl patch.

Regards,

Bertrand

Hello,

I found that the “could not preload library
…/util/…/libcrypto.so.0.9.8
…/util/…/libssl.so.0.9.8” was due to a misconfiguration in
“util/shlib_wrap.sh”.

Indeed, the LD_PRELOAD values must be separated by a colon for QNX.
So, I added the following line after line 63:
*QNX) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *QNX

With this modification, the “make test” goes further.
Now, it seems that there is a cryptographic error:
test for ECDH fails:
/p ./p.clear differ: char 1, line 1
make[1]: *** [test_enc] Error 1

Did you encounter this problem?

Thanks,

Bertrand

Hello,

It was a problem with files test/p and test/p.clear due to the debug I
did.
Now, it works.

So the steps to compile OpenSSL 0.9.8 for QNX 6.3.0 SP1 are:

On a Linux Box (the QNX patch command did nothing so I did this step
with a Linux Box)
#tar zxf openssl-0.9.8.tar.gz
#gunzip openssl-0.9.8.diff.gz
#cd openssl-0.9.8
#patch -p1 <…/openssl-0.9.8.diff
#cd
#tar czvf openssl-0.9.8-qnx.tar.gz openssl-0.9.8

On the QNX host:
#mkdir /install
#cd /install
#tar zxf openssl-0.9.8-qnx.tar.gz
#cd openssl-0.9.8

#vi util/mklink.pl
=> Remove line 55 (unlink “$from/$file”:wink:

#vi util/shlib_wrap.sh
=> Add the following line after line 63
*QNX) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *QNX

#./config threads shared no-hw
#make
#make tests
#make install

Vladimir,

Could you add these 2 modifications to your openssl-0.9.8 patch?

Regards,

Bertrand

On Wed, 03 Aug 2005 13:47:03 +0400, blp
<bertrand_lepiolot@yahoo-dot-fr.no-spam.invalid> wrote:

Could you add these 2 modifications to your openssl-0.9.8 patch?
I also suggest getting the very latest zlib (v1.2.3) as well and "./config

zlib (all you other options)".

Tony.

under QNX4 in Configure I use
“qnx4”, “cc:-DL_ENDIAN -DTERMIO
-DNO_STRINGS_H::(unknown)::-lsocket:EXPORT_VAR_AS_FN ${x86_gcc_des}
${x86_gcc_opts}:”

just one other patch needed in config for QNX4 to recognize.

Hi All,
Can we directly use the Make file available in the openssl
source to build on QNX 6.3 ? Will I be able to specify the taregt
platform like "mpc "in my case while building?


Nayak

nayak <anoop.nayak@yahoo.co-dot-in.no-spam.invalid> wrote:

Hi All,
Can we directly use the Make file available in the openssl
source to build on QNX 6.3 ? Will I be able to specify the taregt
platform like "mpc "in my case while building?



Nayak

openssl 0.9.8e is part of the networking project
on foundry27. It’s been switched over to use
the qnx makefile structure so you can do something
like:

make CPULIST=“mips x86”

Never heard of “mpc”.

-seanb

hi seanb,
Thanks for the reply. I tried to download it from the
foundry27 but couldnt. Sorry i meant ppc. I am using the mpc5200b
board. so for that do I have to write

make CPULIST=“ppc” ?

nayak <anoop.nayak@yahoo.co-dot-in.no-spam.invalid> wrote:

hi seanb,
Thanks for the reply. I tried to download it from the
foundry27 but couldnt. Sorry i meant ppc. I am using the mpc5200b
board. so for that do I have to write

make CPULIST=“ppc” ?

Yes, a straight ‘make’ will build for all cpus or you
can select a subset as above.

The following page explains how to check out the
source and build it.

http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source_Guide