Mark,
Yeah, I've run patchck but there is nothing listed concerning SSH.
I have downloaded openssh-6.7p1.tar, openssl-0.9.8i.tar, openssl-0.9.8zc.tar,
and openssl-1.0.1j.tar.
I'm not sure why I started with openssl-0.9.8i.tar (done several days ago
when .config in /iso/openssh-6.7p1 failed with:
> checking whether snprintf can declare const char *fmt... yes
> checking whether system supports SO_PEERCRED getsockopt... no
> checking whether getpgrp requires zero arguments... yes
> checking OpenSSL header version... 0090709f (OpenSSL 0.9.7i 14 Oct 2005)
> checking OpenSSL library version... configure: error: OpenSSL >= 0.9.8f required
So at the time, I found openssl-0.9.8i and noted that it is > 0.9.8f and so started
there.
I worked through the errors thrown by make in openssl-0.9.8i so that it compiles:
> ./configure
>
> ...
> ssltest.c => ../test/ssltest.c
> making links in engines...
> making links in apps...
> making links in test...
> making links in tools...
> generating dummy tests (if needed)...
>
> Configured for sco5-gcc.
>
> The library could not be configured for supporting multi-threaded
> applications as the compiler options required on this system are not known.
> See file INSTALL for details if you need multi-threading.
> #
And then make:
> * ./make
> ...
> gcc -I.. -I../.. -I../../include -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-f
> rame-pointer -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_AS
> M -DRMD160_ASM -DAES_ASM -c ui_lib.c
> gcc -I.. -I../.. -I../../include -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-f
> rame-pointer -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_AS
> M -DRMD160_ASM -DAES_ASM -c ui_openssl.c
> In file included from /usr/include/posix/signal.h:35,
> from /usr/include/signal.h:11,
> from ui_openssl.c:126:
> /usr/include/sys/signal.h:175: syntax error before `siginfo_t'
> *** Error code 1 (bu21)
> *** Error code 1 (bu21)
> *** Error code 1 (bu21)
> #
Googling on "/usr/include/sys/signal.h:175: syntax error before `siginfo_t'"
found at
http://preview.tinyurl.com/ngpxmrl
> Instead of patching sys/signal.h you could patch crypto/ui/ui_openssl.c
> to comment out the "#define _POSIX_C_SOURCE 1" line.
> That will allow OpenServer 5 to include sys/siginfo.h where siginfo_t is.
> I don't have time right now to come up with a "correct" solution that
> will not break other platforms.
...
> I just tried gcc. (don't need no-sha512 w/ gcc)
> All tests pass
>
> --
> Tim Rice Multitalents
(707) 887-1469
After the above hack to crypto/ui/ui_openssl.c ./make finished with:
H -O3 -fomit-frame-pointer -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA
1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM}"; \
LIBPATH=`for x in $LIBDEPS; do if echo $x | grep '^ *-L' > /dev/null
2>&1; then echo $x | sed -e 's/^ *-L//'; fi; done | uniq`; \
LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; \
LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH \
${LDCMD} ${LDFLAGS} -o ${APPNAME:=dummytest} dummytest.o ${LIBDEPS}
)
making all in tools...
#
Then run "make test"
# make test
...
DONE via BIO pair: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
DONE via BIO pair: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
DONE via BIO pair: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
DONE via BIO pair: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
DONE via BIO pair: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
DONE via BIO pair: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
10 handshakes of 256 bytes done
Approximate total server time: 0.61 s
Approximate total client time: 1.51 s
Test IGE mode
../util/shlib_wrap.sh ./igetest
util/opensslwrap.sh version -a
OpenSSL 0.9.8i 15 Sep 2008
built on: Wed Dec 24 08:41:48 CST 2014
platform: sco5-gcc
options: bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int) blowf
ish(idx)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-frame-pointer -DOPENSSL_BN_A
SM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
OPENSSLDIR: "/usr/local/ssl"
#
# cd apps
# ./openssl
OpenSSL> version
OpenSSL 0.9.8i 15 Sep 2008
OpenSSL>
Make install populates /usr/local/ssl:
# ls -lt /usr/local/ssl
total 34
drwxr-xr-x 2 root sys 512 Dec 27 02:31 bin
drwxr-xr-x 4 root sys 512 Dec 27 02:31 lib
drwxr-xr-x 2 root sys 512 Dec 27 02:31 misc
-rw-r--r-- 1 root sys 9374 Dec 27 02:31 openssl.cnf
drwxr-xr-x 2 root sys 512 Dec 27 02:31 certs
drwxr-xr-x 3 root sys 512 Dec 27 02:31 include
drwxr-xr-x 2 root sys 512 Dec 27 02:31 private
drwxr-xr-x 6 root sys 512 Dec 27 02:26 man
#
Then with openssl.0.9.8i installed you can run ./config in ../openssl-6.7p1
as ./configure --with-ssl-dir=/usr/local/ssl
and see:
...
checking whether snprintf correctly terminates long strings... yes
checking whether vsnprintf returns correct values on overflow... no
configure: WARNING: ****** Your vsnprintf() function is broken, complain to your
checking whether snprintf can declare const char *fmt... yes
checking whether system supports SO_PEERCRED getsockopt... no
checking whether getpgrp requires zero arguments... yes
checking OpenSSL header version... 0090809f (OpenSSL 0.9.8i 15 Sep 2008)
checking OpenSSL library version... 0090809f (OpenSSL 0.9.8i 15 Sep 2008)
checking whether OpenSSL's headers match the library... yes
checking if programs using OpenSSL functions will link... yes
...
OpenSSH has been configured with the following options:
User binaries: /usr/local/bin
System binaries: /usr/local/sbin
Configuration files: /usr/local/etc
Askpass program: /usr/local/libexec/ssh-askpass
Manual pages: /usr/local/share/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
(If PATH is set in /etc/default/login it will be used instead. If
used, ensure the path to scp is present, otherwise scp will not work.)
Manpage format: man
PAM support: no
OSF SIA support: no
KerberosV support: no
SELinux support: no
Smartcard support:
S/KEY support: no
MD5 password support: no
libedit support: no
Solaris process contract support: no
Solaris project support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: no
BSD Auth support: no
Random number source: OpenSSL internal ONLY
Privsep sandbox style: rlimit
Host: i686-pc-sco3.2v5.0.7
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare
Preprocessor flags: -I/usr/local/ssl/include
Linker flags: -L/usr/local/ssl/lib
Libraries: -lcrypto -lz -lsocket -lprot -lx -ltinfo -lm
SVR4 style packages are supported with "make package"
WARNING: the operating system that you are using does not
appear to support getpeereid(), getpeerucred() or the
SO_PEERCRED getsockopt() option. These facilities are used to
enforce security checks to prevent unauthorised connections to
ssh-agent. Their absence increases the risk that a malicious
user can connect to your agent.
$ /usr/local/bin/ssh -V
OpenSSH_6.7p1, OpenSSL 0.9.8i 15 Sep 2008
$
And thats where I stopped. I tested the installed /usr/local/bin/ssh and it works to
connect to the sshd running on localhost (standard OpenSSH_4.3p2).
Where I'm having trouble is how to replace the standard SCO 5.0.7 sshd with the one
I compiled without having custom -> verify software stomp all over and put the system
back to using the 5.0.7 distributed sshd and ssh.
Here is another odd part: The compiled OpenSSD_6.7p1 /usr/local/bin/ssh does not seem
to depend upon any openSSL libraries.
# ls -lt /usr/local/bin/ssh
-rwxr-xr-x 1 root sys 1450336 Dec 28 17:07 /usr/local/bin/ssh
#
# ldd /usr/local/bin/ssh
/usr/local/bin/ssh needs:
/usr/lib/libz.so.1
/usr/lib/libsocket.so.2
/lib/libprot.so.1
/usr/lib/libcurses.so.1
/usr/lib/libm.so.1
/usr/lib/libc.so.1
#
# ls -l /usr/lib/libz.so.1 /usr/lib/libsocket.so.2 /lib/libprot.so.1 \
/usr/lib/libcurses.so.1 /usr/lib/libm.so.1 /usr/lib/libc.so.1
lrwxrwxrwx 1 root root 40 Apr 12 2012 /lib/libprot.so.1 -> /opt/K/SCO/Unix/5.0.7Hw/lib/libprot.so.1
lrwxrwxrwx 1 root root 41 Apr 12 2012 /usr/lib/libc.so.1 -> /opt/K/SCO/Unix/5.0.7Hw/usr/lib/libc.so.1
lrwxrwxrwx 1 root root 46 Apr 12 2012 /usr/lib/libcurses.so.1 -> /opt/K/SCO/Unix/5.0.7Hw/usr/lib/libcurses.so.1
lrwxrwxrwx 1 root root 41 Apr 12 2012 /usr/lib/libm.so.1 -> /opt/K/SCO/Unix/5.0.7Hw/usr/lib/libm.so.1
lrwxrwxrwx 1 root root 46 Apr 12 2012 /usr/lib/libsocket.so.2 -> /opt/K/SCO/Unix/5.0.7Hw/usr/lib/libsocket.so.2
lrwxrwxrwx 1 root sys 44 Apr 12 2012 /usr/lib/libz.so.1 -> /opt/K/SCO/gwxlibs/2.1.0Ce/usr/lib/libz.so.1
# ls -lt /usr/bin/ssh
lrwxrwxrwx 1 root sys 34 Apr 12 2012 /usr/bin/ssh -> /opt/K/SCO/ssh/6.0.0Ha/usr/bin/ssh
# l -l /usr/bin/ssh
-rwxr-xr-x 1 bin bin 258752 Aug 22 2006 /usr/bin/ssh@
# ldd /usr/bin/ssh
/usr/bin/ssh needs:
/usr/lib/libcrypto.so.0.9.7
/usr/lib/libz.so.1
/usr/lib/libsocket.so.2
/lib/libprot.so.1
/usr/lib/libc.so.1
So the size of the 5.0.7 /usr/bin/ssh is 258,752 while my compiled /usr/local/bin/ssh is 1,450,336.
Looks like the libcrypto functions provided by OpenSSL is statically linked into the elf? (WTF)
# file /usr/bin/ssh /usr/local/bin/ssh
/usr/bin/ssh: ELF 32-bit LSB executable 80386, dynamically linked, stripped, no debug
/usr/local/bin/ssh: ELF 32-bit LSB executable 80386, dynamically linked, stripped, no debug
# ls -lt /etc/sshd
lrwxrwxrwx 1 root sys 31 Apr 12 2012 /etc/sshd -> /opt/K/SCO/ssh/6.0.0Ha/etc/sshd
# l -l /etc/sshd /usr/local/sbin/sshd
-rwxr-xr-x 1 bin bin 308640 Aug 22 2006 /etc/sshd@
-rwxr-xr-x 1 root sys 1519632 Dec 28 17:07 /usr/local/sbin/sshd
--
Steve Fabac
S.M. Fabac & Associates
816/765-1670