[openssl-users] Minor portability fix for Solaris-11.1

Karl Vogel vogelke at pobox.com
Thu Jul 2 04:37:40 UTC 2015


Greetings:

I ran into a minor test problem when building OpenSSL-1.0.2c.
Host:
    me% uname -a
    SunOS myname 5.11 11.1 i86pc i386 i86pc Solaris

Compiler:
    me% gcc -v
    Target: i386-pc-solaris2.11
    Thread model: posix
    gcc version 4.5.2 (GCC) 

Configuration:
    CC=gcc;                          export CC
    CFLAGS='-m64';                   export CFLAGS
    CPPFLAGS='-I/usr/local/include'; export CPPFLAGS
    LDFLAGS='-m64 -L/usr/local/lib'; export LDFLAGS
    Configuring for solaris64-x86_64-gcc

The build worked, but running "make test" gave these messages:

    [...]
    Testing ciphersuites
    Testing ciphersuites for TLSv1.2
    ./testssl[149]: local: not found [No such file or directory]
    ./testssl[150]: local: not found [No such file or directory]
    Testing AES256-GCM-SHA384
    Available compression methods:
      NONE
    TLSv1.2, cipher TLSv1/SSLv3 AES256-GCM-SHA384, 2048 bit RSA
    1 handshakes of 256 bytes done
    ./testssl[149]: local: not found [No such file or directory]
    ./testssl[150]: local: not found [No such file or directory]
    Testing AES256-SHA256
    [...]

On Solaris-11.1, /bin/sh links to /usr/bin/i86/ksh93, which doesn't handle
local variables properly.  Using "typeset" fixes it; the patch is below.

-- 
Karl Vogel                      I don't speak for the USAF or my company
vogelke at pobox dot com                   http://www.pobox.com/~vogelke

=========================================================================

*** testssl.orig        Fri Jun 12 10:51:21 2015
--- testssl     Wed Jul  1 00:38:52 2015
***************
*** 148,151 ****
  test_cipher() {
!   local cipher=$1
!   local protocol=$2
      echo "Testing $cipher"
--- 148,151 ----
  test_cipher() {
!   typeset cipher=$1
!   typeset protocol=$2
      echo "Testing $cipher"


More information about the openssl-users mailing list