Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
0.9.7e shared build 'make test' patch
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Moss  
View profile  
 More options Feb 14 2005, 3:01 pm
Newsgroups: mailing.openssl.dev
From: first...@gmail.com (Michael Moss)
Date: Tue, 15 Feb 2005 04:01:42 +0800 (CST)
Local: Mon, Feb 14 2005 3:01 pm
Subject: 0.9.7e shared build 'make test' patch
------=_Part_559_14433069.1108411238602
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

In case anybody is interested, I back-ported much of check-in 12871
(http://cvs.openssl.org/chngview?cn=12871) to apply to the 0.9.7e
release. This fixes 'make test' failures when building shared libs on
Linux (and perhaps other systems), and may be useful to people who are
somehow constrained from using the code in CVS.

Michael Moss
Google, Inc.

------=_Part_559_14433069.1108411238602
Content-Type: text/plain; name=buildshared_maketest.txt; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="buildshared_maketest.txt"

diff -ur --new-file openssl-0.9.7e/apps/CA.pl.in openssl-0.9.7e.mtm/apps/CA.pl.in
--- openssl-0.9.7e/apps/CA.pl.in        2004-04-22 05:19:47.000000000 -0700
+++ openssl-0.9.7e.mtm/apps/CA.pl.in    2005-02-04 10:12:19.000000000 -0800
@@ -36,13 +36,21 @@
 # default openssl.cnf file has setup as per the following
 # demoCA ... where everything is stored

+my $openssl;
+if(defined $ENV{OPENSSL}) {
+       $openssl = $ENV{OPENSSL};
+} else {
+       $openssl = "openssl";
+       $ENV{OPENSSL} = $openssl;
+}
+
 $SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"};
 $DAYS="-days 365";
-$REQ="openssl req $SSLEAY_CONFIG";
-$CA="openssl ca $SSLEAY_CONFIG";
-$VERIFY="openssl verify";
-$X509="openssl x509";
-$PKCS12="openssl pkcs12";
+$REQ="$openssl req $SSLEAY_CONFIG";
+$CA="$openssl ca $SSLEAY_CONFIG";
+$VERIFY="$openssl verify";
+$X509="$openssl x509";
+$PKCS12="$openssl pkcs12";

 $CATOP="./demoCA";
 $CAKEY="cakey.pem";
diff -ur --new-file openssl-0.9.7e/apps/CA.sh openssl-0.9.7e.mtm/apps/CA.sh
--- openssl-0.9.7e/apps/CA.sh   2000-02-03 15:22:15.000000000 -0800
+++ openssl-0.9.7e.mtm/apps/CA.sh       2005-02-04 10:12:51.000000000 -0800
@@ -30,11 +30,13 @@
 # default openssl.cnf file has setup as per the following
 # demoCA ... where everything is stored

+if [ -z "$OPENSSL" ]; then OPENSSL=openssl; fi
+
 DAYS="-days 365"
-REQ="openssl req $SSLEAY_CONFIG"
-CA="openssl ca $SSLEAY_CONFIG"
-VERIFY="openssl verify"
-X509="openssl x509"
+REQ="$OPENSSL req $SSLEAY_CONFIG"
+CA="$OPENSSL ca $SSLEAY_CONFIG"
+VERIFY="$OPENSSL verify"
+X509="$OPENSSL x509"

 CATOP=./demoCA
 CAKEY=./cakey.pem
diff -ur --new-file openssl-0.9.7e/apps/Makefile openssl-0.9.7e.mtm/apps/Makefile
--- openssl-0.9.7e/apps/Makefile        2004-08-10 02:09:07.000000000 -0700
+++ openssl-0.9.7e.mtm/apps/Makefile    2005-02-04 10:13:50.000000000 -0800
@@ -152,13 +152,8 @@
        if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
                TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \
        fi
-       -(cd ..; OPENSSL="`pwd`/apps/$(EXE)"; export OPENSSL; \
-               LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
-               DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
-               SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
-               LIBPATH="`pwd`:$$LIBPATH"; \
-               if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
+       -(cd ..; \
+         OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
                $(PERL) tools/c_rehash certs)

 progs.h: progs.pl
diff -ur --new-file openssl-0.9.7e/Makefile.org openssl-0.9.7e.mtm/Makefile.org
--- openssl-0.9.7e/Makefile.org 2004-09-28 13:52:14.000000000 -0700
+++ openssl-0.9.7e.mtm/Makefile.org     2005-02-04 10:44:31.000000000 -0800
@@ -679,29 +679,19 @@

 rehash: rehash.time
 rehash.time: certs
-       @(OPENSSL="`pwd`/apps/openssl$(EXE_EXT)"; OPENSSL_DEBUG_MEMORY=on; \
+       @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
+               OPENSSL_DEBUG_MEMORY=on; \
                export OPENSSL OPENSSL_DEBUG_MEMORY; \
-               LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
-               DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
-               SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
-               LIBPATH="`pwd`:$$LIBPATH"; \
-               if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
                $(PERL) tools/c_rehash certs)
        touch rehash.time

 test:   tests

 tests: rehash
-       @(cd test && echo "testing..." && \
+       @(chmod 750 util/shlib_wrap.sh util/opensslwrap.sh && \
+       cd test && echo "testing..." && \
        $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
-       @LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
-       DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
-       SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
-       LIBPATH="`pwd`:$$LIBPATH"; \
-       if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
-       export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
-       apps/openssl version -a
+       util/shlib_wrap.sh apps/openssl version -a

 report:
        @$(PERL) util/selftest.pl
diff -ur --new-file openssl-0.9.7e/test/Makefile openssl-0.9.7e.mtm/test/Makefile
--- openssl-0.9.7e/test/Makefile        2004-06-28 15:00:49.000000000 -0700
+++ openssl-0.9.7e.mtm/test/Makefile    2005-02-04 11:17:18.000000000 -0800
@@ -124,14 +124,6 @@
 apps:
        @(cd ..; $(MAKE) DIRS=apps all)

-SET_SO_PATHS=OSSL_LIBPATH="`cd ..; pwd`"; \
-               LD_LIBRARY_PATH="$$OSSL_LIBPATH:$$LD_LIBRARY_PATH"; \
-               DYLD_LIBRARY_PATH="$$OSSL_LIBPATH:$$DYLD_LIBRARY_PATH"; \
-               SHLIB_PATH="$$OSSL_LIBPATH:$$SHLIB_PATH"; \
-               LIBPATH="$$OSSL_LIBPATH:$$LIBPATH"; \
-               if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="$${LIBPATH}:$$PATH"; fi; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH
-
 alltests: \
        test_des test_idea test_sha test_md4 test_md5 test_hmac \
        test_md2 test_mdc2 \
@@ -145,145 +137,145 @@
 fips_test_aes:
        if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
          mkdir -p fips_aes_data/rsp; \
-         $(SET_SO_PATHS); ./$(FIPS_AESTEST) -d fips_aes_data/list; \
+         ../util/shlib_wrap.sh ./$(FIPS_AESTEST) -d fips_aes_data/list; \
        fi

 test_evp:
-       $(SET_SO_PATHS); ./$(EVPTEST) evptests.txt
+       ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt

 test_des:
-       $(SET_SO_PATHS); ./$(DESTEST)
+       ../util/shlib_wrap.sh ./$(DESTEST)

 test_idea:
-       $(SET_SO_PATHS); ./$(IDEATEST)
+       ../util/shlib_wrap.sh ./$(IDEATEST)

 test_sha:
-       $(SET_SO_PATHS); ./$(SHATEST)
-       $(SET_SO_PATHS); ./$(SHA1TEST)
+       ../util/shlib_wrap.sh ./$(SHATEST)
+       ../util/shlib_wrap.sh ./$(SHA1TEST)
        if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-         $(SET_SO_PATHS); ./$(FIPS_SHA1TEST) sha1vectors.txt | sed s/Strings/Hashes/ | cmp sha1hashes.txt - ; \
+         ../util/shlib_wrap.sh ./$(FIPS_SHA1TEST) sha1vectors.txt | sed s/Strings/Hashes/ | cmp sha1hashes.txt - ; \
        fi

 test_mdc2:
-       $(SET_SO_PATHS); ./$(MDC2TEST)
+       ../util/shlib_wrap.sh ./$(MDC2TEST)

 test_md5:
-       $(SET_SO_PATHS); ./$(MD5TEST)
+       ../util/shlib_wrap.sh ./$(MD5TEST)

 test_md4:
-       $(SET_SO_PATHS); ./$(MD4TEST)
+       ../util/shlib_wrap.sh ./$(MD4TEST)

 test_hmac:
-       $(SET_SO_PATHS); ./$(HMACTEST)
+       ../util/shlib_wrap.sh ./$(HMACTEST)

 test_md2:
-       $(SET_SO_PATHS); ./$(MD2TEST)
+       ../util/shlib_wrap.sh ./$(MD2TEST)

 test_rmd:
-       $(SET_SO_PATHS); ./$(RMDTEST)
+       ../util/shlib_wrap.sh ./$(RMDTEST)

 test_bf:
-       $(SET_SO_PATHS); ./$(BFTEST)
+       ../util/shlib_wrap.sh ./$(BFTEST)

 test_cast:
-       $(SET_SO_PATHS); ./$(CASTTEST)
+       ../util/shlib_wrap.sh ./$(CASTTEST)

 test_rc2:
-       $(SET_SO_PATHS); ./$(RC2TEST)
+       ../util/shlib_wrap.sh ./$(RC2TEST)

 test_rc4:
-       $(SET_SO_PATHS); ./$(RC4TEST)
+       ../util/shlib_wrap.sh ./$(RC4TEST)

 test_rc5:
-       $(SET_SO_PATHS); ./$(RC5TEST)
+       ../util/shlib_wrap.sh ./$(RC5TEST)

 test_rand:
-       $(SET_SO_PATHS); ./$(RANDTEST)
+       ../util/shlib_wrap.sh ./$(RANDTEST)
        if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-         $(SET_SO_PATHS); ./$(FIPS_RANDTEST); \
+         ../util/shlib_wrap.sh ./$(FIPS_RANDTEST); \
        fi

 test_enc:
-       @$(SET_SO_PATHS); sh ./testenc
+       @sh ./testenc

 test_x509:
        echo test normal x509v1 certificate
-       $(SET_SO_PATHS); sh ./tx509 2>/dev/null
+       sh ./tx509 2>/dev/null
        echo test first x509v3 certificate
-       $(SET_SO_PATHS); sh ./tx509 v3-cert1.pem 2>/dev/null
+       sh ./tx509 v3-cert1.pem 2>/dev/null
        echo test second x509v3 certificate
-       $(SET_SO_PATHS); sh ./tx509 v3-cert2.pem 2>/dev/null
+       sh ./tx509 v3-cert2.pem 2>/dev/null

 test_rsa:
-       @$(SET_SO_PATHS); sh ./trsa 2>/dev/null
-       $(SET_SO_PATHS); ./$(RSATEST)
+       sh ./trsa 2>/dev/null
+       ../util/shlib_wrap.sh ./$(RSATEST)

 test_crl:
-       @$(SET_SO_PATHS); sh ./tcrl 2>/dev/null
+       @sh ./tcrl 2>/dev/null

 test_sid:
-       @$(SET_SO_PATHS); sh ./tsid 2>/dev/null
+       @sh ./tsid 2>/dev/null

 test_req:
-       @$(SET_SO_PATHS); sh ./treq 2>/dev/null
-       @$(SET_SO_PATHS); sh ./treq testreq2.pem 2>/dev/null
+       @sh ./treq 2>/dev/null
+       @sh ./treq testreq2.pem 2>/dev/null

 test_pkcs7:
-       @$(SET_SO_PATHS); sh ./tpkcs7 2>/dev/null
-       @$(SET_SO_PATHS); sh ./tpkcs7d 2>/dev/null
+       @sh ./tpkcs7 2>/dev/null
+       @sh ./tpkcs7d 2>/dev/null

 test_bn:
        @echo starting big number library test, could take a while...
-       @$(SET_SO_PATHS); ./$(BNTEST) >tmp.bntest
+       @../util/shlib_wrap.sh ./$(BNTEST) >tmp.bntest
        @echo quit >>tmp.bntest
        @echo "running bc"
        @<tmp.bntest sh -c "`sh ./bctest ignore`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"'
        @echo 'test a^b%c implementations'
-       $(SET_SO_PATHS); ./$(EXPTEST)
+       ../util/shlib_wrap.sh ./$(EXPTEST)

 test_ec:
        @echo 'test elliptic curves'
-       $(SET_SO_PATHS); ./$(ECTEST)
+       ../util/shlib_wrap.sh ./$(ECTEST)

 test_verify:
        @echo "The following command should have some OK's and some failures"
        @echo "There are definitly a few expired certificates"
-       -$(SET_SO_PATHS); ../apps/openssl verify -CApath ../certs ../certs/*.pem
+       -../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs ../certs/*.pem

 test_dh:
        @echo "Generate a set of DH parameters"
-       $(SET_SO_PATHS); ./$(DHTEST)
+       ../util/shlib_wrap.sh ./$(DHTEST)

 test_dsa:
        @echo "Generate a set of DSA parameters"
-       $(SET_SO_PATHS); ./$(DSATEST)
-       $(SET_SO_PATHS); ./$(DSATEST) -app2_1
+       ../util/shlib_wrap.sh ./$(DSATEST)
+       ../util/shlib_wrap.sh ./$(DSATEST) -app2_1
        if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-         $(SET_SO_PATHS); ./$(FIPS_DSATEST); \
-         $(SET_SO_PATHS); ./$(FIPS_DSATEST) -app2_1; \
+         ../util/shlib_wrap.sh ./$(FIPS_DSATEST); \
+         ../util/shlib_wrap.sh ./$(FIPS_DSATEST) -app2_1; \
        fi

 test_gen:
        @echo "Generate and verify a certificate request"
-       @$(SET_SO_PATHS); sh ./testgen
+       @sh ./testgen

 test_ss keyU.ss certU.ss certCA.ss: testss
        @echo "Generate and certify a test certificate"
-       @$(SET_SO_PATHS); sh ./testss
+       @sh ./testss

 test_engine:
        @echo "Manipulate the ENGINE structures"
-       $(SET_SO_PATHS); ./$(ENGINETEST)
+       ../util/shlib_wrap.sh ./$(ENGINETEST)

 test_ssl: keyU.ss certU.ss certCA.ss
        @echo "test SSL protocol"
        @if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-         $(SET_SO_PATHS); sh ./testfipsssl keyU.ss certU.ss certCA.ss; \
+         sh ./testfipsssl keyU.ss certU.ss certCA.ss; \
        fi
-       @$(SET_SO_PATHS); sh ./testssl keyU.ss certU.ss certCA.ss
+       @sh ./testssl keyU.ss certU.ss certCA.ss

 test_ca:
-       @$(SET_SO_PATHS); if ../apps/openssl no-rsa; then \
+       @if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \
          echo "skipping CA.sh test -- requires RSA"; \
        else \
          echo "Generate and certify a test certificate via the 'ca' program"; \
@@ -292,7 +284,7 @@

 test_aes: #$(AESTEST)
 #      @echo "test Rijndael"
-#      $(SET_SO_PATHS); ./$(AESTEST)
+#      ../util/shlib_wrap.sh ./$(AESTEST)

 lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
diff -ur --new-file openssl-0.9.7e/test/tcrl openssl-0.9.7e.mtm/test/tcrl
--- openssl-0.9.7e/test/tcrl    2002-06-13 13:40:33.000000000 -0700
+++ openssl-0.9.7e.mtm/test/tcrl        2005-02-03 16:36:24.000000000 -0800
@@ -7,7 +7,7 @@
 fi
 export PATH

-cmd='../apps/openssl crl'
+cmd='../util/shlib_wrap.sh ../apps/openssl crl'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/test/testca openssl-0.9.7e.mtm/test/testca
--- openssl-0.9.7e/test/testca  2002-06-13 13:40:33.000000000 -0700
+++ openssl-0.9.7e.mtm/test/testca      2005-02-03 16:37:28.000000000 -0800
@@ -2,15 +2,18 @@

 SH="/bin/sh"
 if test "$OSTYPE" = msdosdjgpp; then
-    PATH=./apps\;../apps\;$PATH
+    PATH="./apps\;../apps\;$PATH"
 else
-    PATH=../apps:$PATH
+    PATH="../apps:$PATH"
 fi
 export SH PATH

 SSLEAY_CONFIG="-config CAss.cnf"
 export SSLEAY_CONFIG

+OPENSSL="`pwd`/../util/opensslwrap.sh"
+export OPENSSL
+
 /bin/rm -fr demoCA
 $SH ../apps/CA.sh -newca <<EOF
 EOF
diff -ur --new-file openssl-0.9.7e/test/testenc openssl-0.9.7e.mtm/test/testenc
--- openssl-0.9.7e/test/testenc 2004-05-11 05:46:15.000000000 -0700
+++ openssl-0.9.7e.mtm/test/testenc     2005-02-03 16:37:49.000000000 -0800
@@ -2,7 +2,7 @@

 testsrc=Makefile
 test=./p
-cmd=../apps/openssl
+cmd="../util/shlib_wrap.sh ../apps/openssl"

 cat $testsrc >$test;

diff -ur --new-file openssl-0.9.7e/test/testfipsssl openssl-0.9.7e.mtm/test/testfipsssl
--- openssl-0.9.7e/test/testfipsssl     2004-05-11 05:46:15.000000000 -0700
+++ openssl-0.9.7e.mtm/test/testfipsssl 2005-02-04 11:25:20.000000000 -0800
@@ -13,9 +13,9 @@

 ciphers="DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3- SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA :AES128-SHA:EXP1024-DHE-DSS-DES-CBC-SHA:EXP1024-DES-CBC-SHA:EDH-RSA-DES-CBC -SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DE S-CBC-SHA:EXP-DES-CBC-SHA"

-ssltest="./ssltest -F -key $key -cert $cert -c_key $key -c_cert $cert -cipher $ciphers"
+ssltest="../util/shlib_wrap.sh ./ssltest -F -key $key -cert $cert -c_key $key -c_cert $cert -cipher $ciphers"

-if ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then
+if ../util/shlib_wrap.sh ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then
   dsa_cert=YES
 else
   dsa_cert=NO
@@ -89,24 +89,24 @@

 ########################################################################### ##

-if ../apps/openssl no-dh; then
+if ../util/shlib_wrap.sh ../apps/openssl no-dh; then
   echo skipping anonymous DH tests
 else
   echo test tls1 with 1024bit anonymous DH, multiple handshakes
   $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1
 fi

-if ../apps/openssl no-rsa; then
+if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then
   echo skipping RSA tests
 else
   echo test tls1 with 1024bit RSA, no DHE, multiple handshakes
   ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1

-  if ../apps/openssl no-dh; then
+  if ../util/shlib_wrap.sh ../apps/openssl no-dh; then
     echo skipping RSA+DHE tests
   else
     echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes
-    ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1
+    ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1
   fi
 fi

diff -ur --new-file openssl-0.9.7e/test/testgen openssl-0.9.7e.mtm/test/testgen
--- openssl-0.9.7e/test/testgen 2003-01-10 02:55:01.000000000 -0800
+++ openssl-0.9.7e.mtm/test/testgen     2005-02-03 16:38:24.000000000 -0800
@@ -17,7 +17,7 @@

 echo "string to make the random number generator think it has entropy" >> ./.rnd

-if ../apps/openssl no-rsa; then
+if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then
   req_new='-newkey dsa:../apps/dsa512.pem'
 else
   req_new='-new'
@@ -29,13 +29,13 @@

 rm -f testkey.pem testreq.pem

-../apps/openssl req -config test.cnf $req_new -out testreq.pem
+../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem
 if [ $? != 0 ]; then
 echo problems creating request
 exit 1
 fi

-../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
+../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
 if [ $? != 0 ]; then
 echo signature on req is wrong
 exit 1
diff -ur --new-file openssl-0.9.7e/test/testss openssl-0.9.7e.mtm/test/testss
--- openssl-0.9.7e/test/testss  2001-10-15 10:58:00.000000000 -0700
+++ openssl-0.9.7e.mtm/test/testss      2005-02-04 11:26:26.000000000 -0800
@@ -1,9 +1,9 @@
 #!/bin/sh

 digest='-md5'
-reqcmd="../apps/openssl req"
-x509cmd="../apps/openssl x509 $digest"
-verifycmd="../apps/openssl verify"
+reqcmd="../util/shlib_wrap.sh ../apps/openssl req"
+x509cmd="../util/shlib_wrap.sh ../apps/openssl x509 $digest"
+verifycmd="../util/shlib_wrap.sh ../apps/openssl verify"
 dummycnf="../apps/openssl.cnf"

 CAkey="keyCA.ss"
@@ -22,7 +22,7 @@

 echo "string to make the random number generator think it has entropy" >> ./.rnd

-if ../apps/openssl no-rsa; then
+if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then
   req_new='-newkey dsa:../apps/dsa512.pem'
 else
   req_new='-new'
diff -ur --new-file openssl-0.9.7e/test/testssl openssl-0.9.7e.mtm/test/testssl
--- openssl-0.9.7e/test/testssl 2002-12-12 10:43:32.000000000 -0800
+++ openssl-0.9.7e.mtm/test/testssl     2005-02-03 16:40:59.000000000 -0800
@@ -10,9 +10,9 @@
 else
   cert="$2"
 fi
-ssltest="./ssltest -key $key -cert $cert -c_key $key -c_cert $cert"
+ssltest="../util/shlib_wrap.sh ./ssltest -key $key -cert $cert -c_key $key -c_cert $cert"

-if ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then
+if ../util/shlib_wrap.sh ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then
   dsa_cert=YES
 else
   dsa_cert=NO
@@ -121,24 +121,24 @@

 ########################################################################### ##

-if ../apps/openssl no-dh; then
+if ../util/shlib_wrap.sh ../apps/openssl no-dh; then
   echo skipping anonymous DH tests
 else
   echo test tls1 with 1024bit anonymous DH, multiple handshakes
   $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1
 fi

-if ../apps/openssl no-rsa; then
+if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then
   echo skipping RSA tests
 else
   echo test tls1 with 1024bit RSA, no DHE, multiple handshakes
-  ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1
+  ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1

-  if ../apps/openssl no-dh; then
+  if ../util/shlib_wrap.sh ../apps/openssl no-dh; then
     echo skipping RSA+DHE tests
   else
     echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes
-    ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1
+    ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1
   fi
 fi

diff -ur --new-file openssl-0.9.7e/test/tpkcs7 openssl-0.9.7e.mtm/test/tpkcs7
--- openssl-0.9.7e/test/tpkcs7  2002-06-13 13:40:34.000000000 -0700
+++ openssl-0.9.7e.mtm/test/tpkcs7      2005-02-03 16:41:18.000000000 -0800
@@ -7,7 +7,7 @@
 fi
 export PATH

-cmd='../apps/openssl pkcs7'
+cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/test/tpkcs7d openssl-0.9.7e.mtm/test/tpkcs7d
--- openssl-0.9.7e/test/tpkcs7d 2002-06-13 13:40:34.000000000 -0700
+++ openssl-0.9.7e.mtm/test/tpkcs7d     2005-02-03 16:41:46.000000000 -0800
@@ -7,7 +7,7 @@
 fi
 export PATH

-cmd='../apps/openssl pkcs7'
+cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/test/treq openssl-0.9.7e.mtm/test/treq
--- openssl-0.9.7e/test/treq    2002-06-13 13:40:35.000000000 -0700
+++ openssl-0.9.7e.mtm/test/treq        2005-02-03 16:42:09.000000000 -0800
@@ -7,7 +7,7 @@
 fi
 export PATH

-cmd='../apps/openssl req -config ../apps/openssl.cnf'
+cmd='../util/shlib_wrap.sh ../apps/openssl req -config ../apps/openssl.cnf'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/test/trsa openssl-0.9.7e.mtm/test/trsa
--- openssl-0.9.7e/test/trsa    2002-06-13 13:40:36.000000000 -0700
+++ openssl-0.9.7e.mtm/test/trsa        2005-02-03 16:42:36.000000000 -0800
@@ -7,12 +7,12 @@
 fi
 export PATH

-if ../apps/openssl no-rsa; then
+if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then
   echo skipping rsa conversion test
   exit 0
 fi

-cmd='../apps/openssl rsa'
+cmd='../util/shlib_wrap.sh ../apps/openssl rsa'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/test/tsid openssl-0.9.7e.mtm/test/tsid
--- openssl-0.9.7e/test/tsid    2002-06-13 13:40:36.000000000 -0700
+++ openssl-0.9.7e.mtm/test/tsid        2005-02-03 16:42:48.000000000 -0800
@@ -7,7 +7,7 @@
 fi
 export PATH

-cmd='../apps/openssl sess_id'
+cmd='../util/shlib_wrap.sh ../apps/openssl sess_id'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/test/tx509 openssl-0.9.7e.mtm/test/tx509
--- openssl-0.9.7e/test/tx509   2002-06-13 13:40:36.000000000 -0700
+++ openssl-0.9.7e.mtm/test/tx509       2005-02-03 16:43:05.000000000 -0800
@@ -7,7 +7,7 @@
 fi
 export PATH

-cmd='../apps/openssl x509'
+cmd='../util/shlib_wrap.sh ../apps/openssl x509'

 if [ "$1"x != "x" ]; then
        t=$1
diff -ur --new-file openssl-0.9.7e/util/opensslwrap.sh openssl-0.9.7e.mtm/util/opensslwrap.sh
--- openssl-0.9.7e/util/opensslwrap.sh  1969-12-31 16:00:00.000000000 -0800
+++ openssl-0.9.7e.mtm/util/opensslwrap.sh      2005-02-03 16:45:41.000000000 -0800
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+HERE="`echo $0 | sed -e 's|[^/]*$||'`"
+OPENSSL="${HERE}../apps/openssl"
+
+if [ -x "${OPENSSL}.exe" ]; then
+       # The original reason for this script existence is to work around
+       # certain caveats in run-time linker behaviour. On Windows platforms
+       # adjusting $PATH used to be sufficient, but with introduction of
+       # SafeDllSearchMode in XP/2003 the only way to get it right in
+       # *all* possible situations is to copy newly built .DLLs to apps/
+       # and test/, which is now done elsewhere... The $PATH is adjusted
+       # for backward compatibility (and nostagical reasons:-).
+       if [ "$OSTYPE" != msdosdjgpp ]; then
+               PATH="${HERE}..:$PATH"; export PATH
+       fi
+       exec "${OPENSSL}.exe" "$@"
+elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then
+       exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@"
+else
+       exec "${OPENSSL}" "$@"      # hope for the best...
+fi
diff -ur --new-file openssl-0.9.7e/util/shlib_wrap.sh openssl-0.9.7e.mtm/util/shlib_wrap.sh
--- openssl-0.9.7e/util/shlib_wrap.sh   1969-12-31 16:00:00.000000000 -0800
+++ openssl-0.9.7e.mtm/util/shlib_wrap.sh       2005-02-03 16:45:34.000000000 -0800
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+[ $# -ne 0 ] || set -x         # debug mode without arguments:-)
+
+THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.."
+[ -d "${THERE}" ] || exec "$@"     # should never happen...
+
+# Alternative to this is to parse ${THERE}/Makefile...
+LIBCRYPTOSO="${THERE}/libcrypto.so"
+if [ -f "$LIBCRYPTOSO" ]; then
+    while [ -h "$LIBCRYPTOSO" ]; do
+       LIBCRYPTOSO="${THERE}/`ls -l "$LIBCRYPTOSO" | sed -e 's|.*\-> ||'`"
+    done
+    SOSUFFIX=`echo ${LIBCRYPTOSO} | sed -e 's|.*\.so||' 2>/dev/null`
+    LIBSSLSO="${THERE}/libssl.so${SOSUFFIX}"
+fi
+
+case "`(uname -s) 2>/dev/null`" in
+SunOS|IRIX*)
+       # SunOS and IRIX run-time linkers evaluate alternative
+       # variables depending on target ABI...
+       rld_var=LD_LIBRARY_PATH
+       case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in
+       *ELF\ 64*SPARC*)
+               [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64
+               ;;
+       *ELF\ N32*MIPS*)
+               [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH
+               _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST
+               ;;
+       *ELF\ 64*MIPS*)
+               [ -n "$LD_LIBRARY64_PATH"  ] && rld_var=LD_LIBRARY64_PATH
+               _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST
+               ;;
+       esac
+       eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var
+       unset rld_var
+       ;;
+*)     LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH"   # Linux, ELF HP-UX
+       DYLD_LIBRARY_PATH="${THERE}:$DYLD_LIBRARY_PATH"       # MacOS X
+       SHLIB_PATH="${THERE}:$SHLIB_PATH"             # legacy HP-UX
+       LIBPATH="${THERE}:$LIBPATH"                   # AIX, OS/2
+       export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH
+       # Even though $PATH is adjusted [for Windows sake], it doesn't
+       # necessarily does the trick. Trouble is that with introduction
+       # of SafeDllSearchMode in XP/2003 it's more appropriate to copy
+       # .DLLs in vicinity of executable, which is done elsewhere...
+       if [ "$OSTYPE" != msdosdjgpp ]; then
+               PATH="${THERE}:$PATH"; export PATH
+       fi
+       ;;
+esac
+
+if [ -f "$LIBCRYPTOSO" ]; then
+       # Following three lines are major excuse for isolating them into
+       # this wrapper script. Original reason for setting LD_PRELOAD
+       # was to make it possible to pass 'make test' when user linked
+       # with -rpath pointing to previous version installation. Wrapping
+       # it into a script makes it possible to do so on multi-ABI
+       # platforms.
+       LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO"       # SunOS, Linux, ELF HP-UX
+       _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"  # Tru64, o32 IRIX
+       export LD_PRELOAD _RLD_LIST
+fi
+
+exec "$@"

------=_Part_559_14433069.1108411238602--
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-...@openssl.org
Automated List Manager                           majord...@openssl.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »