[Damn.  Forgot the patches for ssl.c and crypto.c the first time I sent this.]

There were some files left out of crypto/crypto.c and ssl/ssl.c (used
when building shared libs).

There's a conflict in the defines for the round functions in DES when
building the shared lib with crypto.c.  fcrypt_b.c needs the defines
its way for crypt() to work, and the real des code needs the defines
the other way.  But there's no easy way to change the defines on the fly
in crypto.c.  (You can exercise this bug by building with shared libs
then running test/destest.  destest is conveniently commented out in
the SSLeay-0.9.0 test/Makefile.)
My fix is to exclude fcrypt_b.c from crypto.c and build it separately.
Here's my shlib/solaris.sh that does that.  Porting it to other platforms
and fixing the FLAGS for a generic Solaris machine is left as an exercise
for the maintainers.
I'm also including my shlib/Makefile.hpux and shlib/Makefile.solaris in
the hope that someone will get rid of the shell scripts and integrate the
shared libs into the top-level Makefile.

*** shlib/solaris.sh.orig       Mon Dec 21 03:52:46 1998
--- shlib/solaris.sh    Wed Jan  6 09:46:03 1999
***************
*** 4,17 ****
  
! major="0"
! minor="8.0"
  slib=libssl
  clib=libcrypto
! CC=gcc
! CPP='gcc -E'
  AS=as
  #FLAGS='-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall'
! FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG'
  INCLUDE='-Iinclude -Icrypto -Issl'
! SHFLAGS='-DPIC -fpic'
  
  CFLAGS="$FLAGS $INCLUDE $SHFLAGS"
--- 4,19 ----
  
! major="2"
! minor="9"
  slib=libssl
  clib=libcrypto
! CC=cc
! CPP='cc -E'
  AS=as
  #FLAGS='-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall'
! #FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG'
! FLAGS='-xtarget=ultra -xarch=v8plus -Xa -xO5 -DB_ENDIAN'
! 
  INCLUDE='-Iinclude -Icrypto -Issl'
! SHFLAGS='-Kpic'
  
  CFLAGS="$FLAGS $INCLUDE $SHFLAGS"
***************
*** 23,36 ****
  ASM_OBJ="$ASM_OBJ bn_asm.o"
  
! echo compiling $clib
! $CC -c $CFLAGS -DCFLAGS="\"$FLAGS\"" -o crypto.o crypto/crypto.c
  
- echo linking $clib.so
- gcc $CFLAGS -shared -o $clib.so.$major.$minor crypto.o $ASM_OBJ -lnsl -lsocket
- 
- echo compiling $slib.so
- $CC -c $CFLAGS -o ssl.o ssl/ssl.c
- 
  echo building $slib.so
! gcc $CFLAGS -shared -o $slib.so ssl.o -L. -lcrypto
  
--- 25,33 ----
  ASM_OBJ="$ASM_OBJ bn_asm.o"
  
! echo building $clib.so
! $CC $CFLAGS -DCFLAGS="\"$FLAGS\"" -G -h $clib.so.$major -o $clib.so.$major.$minor 
crypto/crypto.c crypto/des/fcrypt_b.c $ASM_OBJ -lnsl -lsocket
! rm crypto.o fcrypt_b.o $ASM_OBJ
  
  echo building $slib.so
! $CC $CFLAGS -G -h $slib.so.$major -o $slib.so.$major.$minor ssl/ssl.c -L. -lcrypto
  
*** shlib/Makefile.hpux.orig    Wed Jan  6 09:49:37 1999
--- shlib/Makefile.hpux Wed Jan  6 09:49:37 1999
***************
*** 0 ****
--- 1,37 ----
+ #!/bin/sh
+ 
+ major=2
+ minor=9
+ slib=libssl
+ clib=libcrypto
+ CC=cc
+ CPP=cc -E
+ AS=as
+ #FLAGS=-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall
+ #FLAGS=-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG
+ FLAGS=-DB_ENDIAN -Ae +ESlit +O4 +DA1.1b +DS1.1b -z
+ 
+ INCLUDE=-Iinclude -Icrypto -Issl
+ SHFLAGS=+z
+ 
+ #CFLAGS=$(FLAGS) $(INCLUDE) $(SHFLAGS) -DBN_ASM
+ #ASM_OBJ=crypto/bn/asm/pa-risc2.o
+ CFLAGS=$(FLAGS) $(INCLUDE) $(SHFLAGS)
+ ASM_OBJ=
+ 
+ all : $(slib).so.$(major).$(minor)
+ 
+ $(clib).so.$(major).$(minor) : crypto/crypto.c crypto/des/fcrypt_b.c
+       #echo "#define DATE      \"`date`\"" >crypto/date.h
+       $(CC) $(CFLAGS) -DCFLAGS="\"$(CFLAGS)\"" -c -o fcrypt_b.o crypto/des/fcrypt_b.c
+       $(CC) $(CFLAGS) -DCFLAGS="\"$(CFLAGS)\"" -c -o crypto.o crypto/crypto.c
+       ld -b -z +h $@ -o $@ crypto.o fcrypt_b.o $(ASM_OBJ) -lc
+       -ln -s $@ $(clib).sl
+       rm crypto.o fcrypt_b.o
+ 
+ $(slib).so.$(major).$(minor) : ssl/ssl.c $(clib).so.$(major).$(minor)
+       $(CC) $(CFLAGS) -c -o ssl.o ssl/ssl.c
+       ld -b -z +b /lib:/usr/local/ssl/lib +h $@ -o $@ ssl.o $(clib).sl -lc
+       -ln -s $@ $(slib).sl
+       rm ssl.o
+ 
*** shlib/Makefile.solaris.orig Wed Jan  6 09:49:37 1999
--- shlib/Makefile.solaris      Wed Jan  6 09:49:37 1999
***************
*** 0 ****
--- 1,30 ----
+ #!/bin/sh
+ 
+ major=2
+ minor=9
+ slib=libssl
+ clib=libcrypto
+ CC=cc
+ CPP=cc -E
+ AS=as
+ #FLAGS=-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall
+ #FLAGS=-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG
+ FLAGS=-xtarget=ultra -xarch=v8plus -Xa -xO5 -DB_ENDIAN
+ 
+ INCLUDE=-Iinclude -Icrypto -Issl
+ SHFLAGS=-Kpic
+ 
+ CFLAGS=$(FLAGS) $(INCLUDE) $(SHFLAGS) -DBN_ASM
+ ASM_OBJ=bn_asm.o
+ 
+ all : $(clib).so.$(major).$(minor) $(slib).so.$(major).$(minor)
+ 
+ $(clib).so.$(major).$(minor) : $(clib).a crypto/crypto.c crypto/des/fcrypt_b.c
+       echo "#define DATE      \"`date`\"" >crypto/date.h
+       $(AS) -o bn_asm.o crypto/bn/asm/sparc.s
+       $(CC) $(CFLAGS) -DCFLAGS="\"$(FLAGS)\"" -G -h $@ -o $@ crypto/crypto.c 
+crypto/des/fcrypt_b.c $(ASM_OBJ) -Wl,-R,/lib -lnsl -lsocket
+       rm crypto.o fcrypt_b.o $(ASM_OBJ)
+ 
+ $(slib).so.$(major).$(minor) : $(slib).a ssl/ssl.c
+       $(CC) $(CFLAGS) -G -h $@ -o $@ ssl/ssl.c -Wl,-R,/usr/local/ssl/lib:/lib 
+-L/usr/local/ssl/lib -lcrypto
+ 
*** crypto.c.orig       Mon Dec 21 03:54:25 1998
--- crypto.c    Wed Jan  6 08:40:53 1999
***************
*** 103,106 ****
--- 103,107 ----
  #define CRYPTO_HMAC_SUBSET
  #define CRYPTO_SHA1_SUBSET
+ #define CRYPTO_RIPEMD_SUBSET
  #define CRYPTO_STACK_SUBSET
  #define CRYPTO_TXT_DB_SUBSET
***************
*** 140,143 ****
--- 141,146 ----
  #include "mem.c"
  #include "cversion.c"
+ #include "cpt_err.c"
+ #include "ex_data.c"
  #endif
  
***************
*** 216,219 ****
--- 219,224 ----
  #include "asn1/x_val.c"
  #include "asn1/x_x509.c"
+ #include "asn1/evp_asn1.c"
+ #include "evp/evp_lib.c"
  #endif
  
***************
*** 278,282 ****
--- 283,289 ----
  #ifndef NO_DES
  #ifndef DES_ASM
+ #if 0
  #include "des/fcrypt_b.c"
+ #endif
  #include "des/des_enc.c"
  #endif
***************
*** 377,380 ****
--- 384,393 ----
  #include "evp/e_rc4.c"
  #endif
+ #ifndef NO_RC5
+ #include "evp/e_cbc_r5.c"
+ #include "evp/e_cfb_r5.c"
+ #include "evp/e_ecb_r5.c"
+ #include "evp/e_ofb_r5.c"
+ #endif
  #include "evp/names.c"
  #include "evp/e_null.c"
***************
*** 388,391 ****
--- 401,406 ----
  #include "evp/p_open.c"
  #include "evp/p_seal.c"
+ #include "evp/p_enc.c"
+ #include "evp/p_dec.c"
  #endif
  #include "evp/p_sign.c"
***************
*** 489,493 ****
--- 504,515 ----
  #endif
  #endif
+ #ifndef NO_RC5
+ #include "rc5/rc5_ecb.c"
+ #include "rc5/rc5_enc.c"
+ #include "rc5/rc5_skey.c"
+ #include "rc5/rc5cfb64.c"
+ #include "rc5/rc5ofb64.c"
  #endif
+ #endif
  
  #ifdef CRYPTO_HMAC_SUBSET
***************
*** 503,506 ****
--- 525,531 ----
  #include "rsa/rsa_sign.c"
  #include "rsa/rsa_saos.c"
+ #include "rsa/rsa_none.c"
+ #include "rsa/rsa_pk1.c"
+ #include "rsa/rsa_ssl.c"
  #endif
  #endif
***************
*** 524,527 ****
--- 549,558 ----
  #endif
  
+ #ifdef CRYPTO_RIPEMD_SUBSET
+ #include "ripemd/rmd_dgst.c"
+ #include "ripemd/rmd_one.c"
+ #include "evp/m_ripemd.c"
+ #endif
+ 
  #ifdef CRYPTO_STACK_SUBSET
  #include "stack/stack.c"

*** ssl/ssl.c.orig      Mon Dec 21 03:55:50 1998
--- ssl/ssl.c   Tue Jan  5 22:35:25 1999
***************
*** 88,95 ****
  #include "ssl_locl.h"
  
! #if !(BUILD_SSLV23) && !defined(BUILD_SSLV2) && !defined(BUILD_SSLV3) && 
!defined(BUILD_SSL_COMMON) && !defined(BUILD_SSL_BIO) && !defined(BUILD_SSL_OPTIONAL)
  #define BUILD_SSLV23
  #define BUILD_SSLV2
  #define BUILD_SSLV3
  #define BUILD_SSL_COMMON
  #define BUILD_SSL_BIO
--- 88,96 ----
  #include "ssl_locl.h"
  
! #if !(BUILD_SSLV23) && !defined(BUILD_SSLV2) && !defined(BUILD_SSLV3) && 
!defined(BUILD_TLS1) && !defined(BUILD_SSL_COMMON) && !defined(BUILD_SSL_BIO) && 
!defined(BUILD_SSL_OPTIONAL)
  #define BUILD_SSLV23
  #define BUILD_SSLV2
  #define BUILD_SSLV3
+ #define BUILD_TLS1
  #define BUILD_SSL_COMMON
  #define BUILD_SSL_BIO
***************
*** 139,142 ****
--- 140,151 ----
  #endif
  
+ #ifdef BUILD_TLS1
+ #include "t1_clnt.c"
+ #include "t1_enc.c"
+ #include "t1_lib.c"
+ #include "t1_meth.c"
+ #include "t1_srvr.c"
+ #endif
+ 
  #ifdef BUILD_SSL_COMMON
  #include "ssl_lib.c"
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to