Commit 1ba5b1b5 authored by Richard Levitte's avatar Richard Levitte
Browse files

Merge from main trunk, conflicts resolved

parent d7861121
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11,3 +11,5 @@ maketest.log
cctest
cctest.c
cctest.a
libcrypto.so.*
libssl.so.*
+61 −0
Original line number Diff line number Diff line
@@ -4,6 +4,67 @@

 Changes between 0.9.5a and 0.9.6  [xx XXX 2000]

  *) Fix SSL 2.0 rollback checking: Due to an off-by-one error in
     RSA_padding_check_SSLv23(), special padding was never detected
     and thus the SSL 3.0/TLS 1.0 countermeasure against protocol
     version rollback attacks was not effective.

     In s23_clnt.c, don't use special rollback-attack detection padding
     (RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the
     client; similarly, in s23_srvr.c, don't do the rollback check if
     SSL 2.0 is the only protocol enabled in the server.
     [Bodo Moeller]

  *) Make it possible to get hexdumps of unprintable data with 'openssl
     asn1parse'.  By implication, the functions ASN1_parse_dump() and
     BIO_dump_indent() are added.
     [Richard Levitte]

  *) New functions ASN1_STRING_print_ex() and X509_NAME_print_ex()
     these print out strings and name structures based on various
     flags including RFC2253 support and proper handling of
     multibyte characters. Added options to the 'x509' utility 
     to allow the various flags to be set.
     [Steve Henson]

  *) Various fixes to use ASN1_TIME instead of ASN1_UTCTIME.
     Also change the functions X509_cmp_current_time() and
     X509_gmtime_adj() work with an ASN1_TIME structure,
     this will enable certificates using GeneralizedTime in validity
     dates to be checked.
     [Steve Henson]

  *) Make the NEG_PUBKEY_BUG code (which tolerates invalid
     negative public key encodings) on by default,
     NO_NEG_PUBKEY_BUG can be set to disable it.
     [Steve Henson]

  *) New function c2i_ASN1_OBJECT() which acts on ASN1_OBJECT
     content octets. An i2c_ASN1_OBJECT is unnecessary because
     the encoding can be trivially obtained from the structure.
     [Steve Henson]

  *) crypto/err.c locking bugfix: Use write locks (CRYPTO_w_[un]lock),
     not read locks (CRYPTO_r_[un]lock).
     [Bodo Moeller]

  *) A first attempt at creating official support for shared
     libraries through configuration.  I've kept it so the
     default is static libraries only, and the OpenSSL programs
     are always statically linked for now, but there are
     preparations for dynamic linking in place.
     This has been tested on Linux and True64.
     [Richard Levitte]

  *) Randomness polling function for Win9x, as described in:
     Peter Gutmann, Software Generation of Practically Strong
     Random Numbers.
     [Ulf Möller]

  *) Fix so PRNG is seeded in req if using an already existing
     DSA key.
     [Steve Henson]

  *) New options to smime application. -inform and -outform
     allow alternative formats for the S/MIME message including
     PEM and DER. The -content option allows the content to be
+51 −8
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
# [no-]threads  [don't] try to create a library that is suitable for
#               multithreaded applications (default is "threads" if we
#               know how to do it)
# [no-]shared	[don't] try to create shared libraries instead of static
#		ones when possible.
# no-asm        do not use assembler
# no-dso        do not compile in any native shared-library methods. This
#               will ensure that all methods just return NULL.
@@ -96,7 +98,7 @@ my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:as
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
# So the md5_locl.h file has an undef B_ENDIAN if sun is defined

#config-string	$cc : $cflags : $unistd : $thread_cflag : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme
#config-string	$cc : $cflags : $unistd : $thread_cflag : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag

my %table=(
#"b",		"${tcc}:${tflags}::${tlib}:${bits1}:${tbn_mul}::",
@@ -250,9 +252,9 @@ my %table=(
# Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with
# the new compiler
# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o:::::::::dlfcn",
"alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn",
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o::",
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o:::::::::dlfcn:true64-shared",
"alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared",
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared",
"FreeBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2:::",

#### Alpha Linux with GNU C and Compaq C setups
@@ -278,7 +280,7 @@ my %table=(

# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
# bn86-elf.o file file since it is hand tweaked assembler.
"linux-elf",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
"linux-elf",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
"debug-linux-elf","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
"debug-linux-elf-noefence","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
"linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
@@ -299,7 +301,7 @@ my %table=(
"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",

# Linux on ARM
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn",
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC",

# UnixWare 2.0
"unixware-2.0","cc:-O -DFILIO_H::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
@@ -399,6 +401,7 @@ my $prefix="";
my $openssldir="";
my $install_prefix="";
my $no_threads=0;
my $no_shared=1;
my $threads=0;
my $no_asm=0;
my $no_dso=0;
@@ -456,6 +459,10 @@ foreach (@ARGV)
		{ $no_threads=1; }
	elsif (/^threads$/)
		{ $threads=1; }
	elsif (/^no-shared$/)
		{ $no_shared=1; }
	elsif (/^shared$/)
		{ $no_shared=0; }
	elsif (/^no-symlinks$/)
		{ $symlink=0; }
	elsif (/^no-(.+)$/)
@@ -574,8 +581,8 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
print "IsWindows=$IsWindows\n";

(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
 $md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj,my $dso_scheme)=
	split(/\s*:\s*/,$table{$target} . ":" x 20 , -1);
 $md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag)=
	split(/\s*:\s*/,$table{$target} . ":" x 21 , -1);
$cflags="$flags$cflags" if ($flags ne "");

# The DSO code currently always implements all functions so that no
@@ -649,6 +656,19 @@ if ($threads)
		$openssl_thread_defines .= $thread_defines;
	}

# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
my $shared_mark1 = "";
my $shared_mark2 = "";
if ($shared_cflag ne "")
	{
	$cflags = "$shared_cflag $cflags";
	if (!$no_shared)
		{
		$shared_mark1 = ".shlib-clean.";
		$shared_mark2 = ".shlib.";
		}
	}

#my ($bn1)=split(/\s+/,$bn_obj);
#$bn1 = "" unless defined $bn1;
#$bn1=$bn_asm unless ($bn1 =~ /\.o$/);
@@ -680,13 +700,20 @@ if ($rmd160_obj =~ /\.o$/)
my $version = "unknown";
my $major = "unknown";
my $minor = "unknown";
my $shlib_version_number = "unknown";
my $shlib_version_history = "unknown";
my $shlib_major = "unknown";
my $shlib_minor = "unknown";

open(IN,'<crypto/opensslv.h') || die "unable to read opensslv.h:$!\n";
while (<IN>)
	{
	$version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /;
	$shlib_version_number=$1 if /SHLIB_VERSION_NUMBER *"([^"]+)"/;
	$shlib_version_history=$1 if /SHLIB_VERSION_HISTORY *"([^"]*)"/;
	}
close(IN);
if ($shlib_version_history ne "") { $shlib_version_history .= ":"; }

if ($version =~ /(^[0-9]*)\.([0-9\.]*)/)
	{
@@ -694,6 +721,12 @@ if ($version =~ /(^[0-9]*)\.([0-9\.]*)/)
	$minor=$2;
	}

if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
	{
	$shlib_major=$1;
	$shlib_minor=$2;
	}

open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n";
print OUT "### Generated automatically from Makefile.org by Configure.\n\n";
@@ -712,6 +745,10 @@ while (<IN>)
	s/^VERSION=.*/VERSION=$version/;
	s/^MAJOR=.*/MAJOR=$major/;
	s/^MINOR=.*/MINOR=$minor/;
	s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/;
	s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/;
	s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/;
	s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/;
	s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
	s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
	s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
@@ -733,6 +770,10 @@ while (<IN>)
	s/^PROCESSOR=.*/PROCESSOR= $processor/;
	s/^RANLIB=.*/RANLIB= $ranlib/;
	s/^PERL=.*/PERL= $perl/;
	s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
	s/^SHLIB_MARK1=.*/SHLIB_MARK1=$shared_mark1/;
	s/^SHLIB_MARK2=.*/SHLIB_MARK2=$shared_mark2/;
	s/^LIBS=.*/LIBS=libcrypto\.so\* libssl\.so\*/ if (!$no_shared);
	print OUT $_."\n";
	}
close(IN);
@@ -1041,5 +1082,7 @@ sub print_table_entry
\$rmd160_obj   = $rmd160_obj
\$rc5_obj      = $rc5_obj
\$dso_scheme   = $dso_scheme
\$shared_target= $shared_target
\$shared_cflag = $shared_cflag
EOF
	}
+29 −0
Original line number Diff line number Diff line
@@ -180,6 +180,35 @@
 desired, GNU bc can be built with CygWin32 without change.


 Installation
 ------------

 There's currently no real installation procedure for Win32.  There are,
 however, some suggestions:

    - do nothing.  The include files are found in the inc32/ subdirectory,
      all binaries are found in out32dll/ or out32/ depending if you built
      dynamic or static libraries.

    - do as is written in INSTALL.Win32 that comes with modssl:

	$ md c:\openssl 
	$ md c:\openssl\bin
	$ md c:\openssl\lib
	$ md c:\openssl\include
	$ md c:\openssl\include\openssl
	$ copy /b inc32\*               c:\openssl\include\openssl
	$ copy /b out32dll\ssleay32.lib c:\openssl\lib
	$ copy /b out32dll\libeay32.lib c:\openssl\lib
	$ copy /b out32dll\ssleay32.dll c:\openssl\bin
	$ copy /b out32dll\libeay32.dll c:\openssl\bin
	$ copy /b out32dll\openssl.exe  c:\openssl\bin

      Of course, you can choose another device than c:.  C: is used here
      because that's usually the first (and often only) harddisk device.
      Note: in the modssl INSTALL.Win32, p: is used rather than c:.


 Troubleshooting
 ---------------

+149 −43
Original line number Diff line number Diff line
@@ -5,8 +5,14 @@
VERSION=
MAJOR=
MINOR=
SHLIB_VERSION_NUMBER=
SHLIB_VERSION_HISTORY=
SHLIB_MAJOR=
SHLIB_MINOR=
PLATFORM=dist
OPTIONS=
SHLIB_TARGET=

# INSTALL_PREFIX is for package builders so that they can configure
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
# Normally it is left empty.
@@ -142,7 +148,14 @@ RMD160_ASM_OBJ= asm/rm86-out.o
#RMD160_ASM_OBJ= asm/rm86-out.o       # a.out, FreeBSD
#RMD160_ASM_OBJ= asm/rm86bsdi.o       # bsdi

DIRS=   crypto ssl rsaref apps test tools
# To do special treatment, use "directory names" starting with a period.
# When we're prepared to use shared libraries in the programs we link here
# we might have SHLIB_MARK1 get the value ".shlib." and SHLIB_MARK2 be empty,
# or have that configurable.
SHLIB_MARK1=.shlib-clean.
SHLIB_MARK2=.shlib.

DIRS=   crypto ssl rsaref $(SHLIB_MARK1) apps test tools $(SHLIB_MARK2)
SHLIBDIRS= crypto ssl

# dirs in crypto to build
@@ -166,6 +179,7 @@ ONEDIRS=out tmp
EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
WDIRS=  windows
LIBS=   libcrypto.a libssl.a
SHARED_LIBS=libcrypto.so libssl.so

GENERAL=        Makefile
BASENAME=       openssl
@@ -176,36 +190,110 @@ EXHEADER= e_os.h e_os2.h
HEADER=         e_os.h

all: Makefile.ssl
	@for i in $(DIRS) ;\
	@need_shlib=true; \
	for i in $(DIRS) ;\
	do \
	if [ "$$i" = ".shlib-clean." ]; then \
		if [ "$(SHLIB_TARGET)" != "" ]; then \
			$(MAKE) clean-shared; \
		fi; \
	elif [ "$$i" = ".shlib." ]; then \
		if [ "$(SHLIB_TARGET)" != "" ]; then \
			$(MAKE) $(SHARED_LIBS); \
		fi; \
		need_shlib=false; \
	else \
		(cd $$i && echo "making all in $$i..." && \
		$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
	done
	-@# cd crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps
	-@# cd perl; $(PERL) Makefile.PL; make
	fi; \
	done; \
	if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \
		$(MAKE) $(SHARED_LIBS); \
	fi

sub_all:
	@for i in $(DIRS) ;\
	@need_shlib=true; \
	for i in $(DIRS) ;\
	do \
	if [ "$$i" = ".shlib-clean." ]; then \
		if [ "$(SHLIB_TARGET)" != "" ]; then \
			$(MAKE) clean-shared; \
		fi; \
	elif [ "$$i" = ".shlib." ]; then \
		if [ "$(SHLIB_TARGET)" != "" ]; then \
			$(MAKE) $(SHARED_LIBS); \
		fi; \
		need_shlib=false; \
	else \
		(cd $$i && echo "making all in $$i..." && \
		$(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}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
	done;
	fi; \
	done; \
	if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \
		$(MAKE) $(SHARED_LIBS); \
	fi

libcrypto.so: libcrypto.a
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
		$(MAKE) SHLIBDIRS=crypto $(SHLIB_TARGET); \
	else \
		echo "There's no support for shared libraries on this platform" >&2; \
	fi
libssl.so: libcrypto.so libssl.a
	@if [ "$(SHLIB_TARGET)" != "" ]; then \
		$(MAKE) SHLIBDIRS=ssl $(SHLIB_TARGET); \
	else \
		echo "There's no support for shared libraries on this platform" >&2; \
	fi

clean-shared:
	for i in ${SHLIBDIRS}; do \
	rm -f lib$$i.so \
		lib$$i.so.${SHLIB_MAJOR} \
		lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
	done

linux-shared:
	for i in ${SHLIBDIRS}; do \
	rm -f lib$$i.a lib$$i.so \
		lib$$i.so.${MAJOR} lib$$i.so.${MAJOR}.${MINOR}; \
	${MAKE} CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='-fPIC ${CFLAG}' SDIRS='${SDIRS}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' DIRS=$$i clean all || exit 1; \
	( set -x; ${CC}  -shared -o lib$$i.so.${MAJOR}.${MINOR} \
		-Wl,-S,-soname=lib$$i.so.${MAJOR} \
	libs=; for i in ${SHLIBDIRS}; do \
	rm -f lib$$i.so \
		lib$$i.so.${SHLIB_MAJOR} \
		lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
	( set -x; ${CC}  -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
		-Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
		-Wl,--whole-archive lib$$i.a \
		-Wl,--no-whole-archive -lc ) || exit 1; \
	rm -f lib$$i.a; make -C $$i clean || exit 1 ;\
		-Wl,--no-whole-archive -lc $$libs ) || exit 1; \
	libs="$$libs -L. -l$$i"; \
	( set -x; \
		ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
			lib$$i.so.${SHLIB_MAJOR}; \
		ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \
	done;

# This assumes that GNU utilities are *not* used
true64-shared:
	libs=; for i in ${SHLIBDIRS}; do \
	( set -x; ${CC}  -shared -no_archive -o lib$$i.so \
		-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
		-all lib$$i.a -none -lc $$libs ) || exit 1; \
	libs="$$libs -L. -l$$i"; \
	done;

# This assumes that GNU utilities are *not* used
solaris-shared:
	libs=; for i in ${SHLIBDIRS}; do \
	rm -f lib$$i.so \
		lib$$i.so.${SHLIB_MAJOR} \
		lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
	( set -x; ${CC}  -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
		-h lib$$i.so.${SHLIB_MAJOR} \
		-z allextract lib$$i.a $$libs ) || exit 1; \
	libs="$$libs -L. -l$$i"; \
	ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
		lib$$i.so.${SHLIB_MAJOR}; \
	ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \
	done; \
	@set -x; \
	for i in ${SHLIBDIRS}; do \
	ln -s lib$$i.so.${MAJOR}.${MINOR} lib$$i.so.${MAJOR}; \
	ln -s lib$$i.so.${MAJOR} lib$$i.so; \
	done;

Makefile.ssl: Makefile.org
@@ -220,9 +308,11 @@ clean:
	rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making clean in $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
		rm -f $(LIBS); \
	fi; \
	done;
	rm -f *.a *.o speed.* *.map *.so .pure core
	rm -f $(TARFILE)
@@ -239,8 +329,10 @@ files:
	$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making 'files' in $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
	fi; \
	done;

links:
@@ -248,16 +340,20 @@ links:
	@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
	@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
	@for i in $(DIRS); do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making links in $$i..." && \
		$(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}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \
	fi; \
	done;

dclean:
	rm -f *.bak
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making dclean in $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
	fi; \
	done;

rehash: rehash.time
@@ -278,22 +374,28 @@ report:
depend:
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making dependencies $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
	fi; \
	done;

lint:
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making lint $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
	fi; \
	done;

tags:
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i && echo "making tags $$i..." && \
		$(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
	fi; \
	done;

errors:
@@ -352,15 +454,19 @@ install: all install_docs
	done;
	@for i in $(DIRS) ;\
	do \
	if echo "$$i" | grep -v '^\.'; then \
		(cd $$i; echo "installing $$i..."; \
		$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
	fi; \
	done
	@for i in $(LIBS) ;\
	do \
		if [ -f "$$i" ]; then \
		(       echo installing $$i; \
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
			$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
			chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
		fi \
	done

install_docs:
Loading