Changes between 0.9.2b and 0.9.3
+ *) New config option to avoid instructions that are illegal on the 80386.
+ The default code is faster, but requires at least a 486.
+ [Ulf Möller]
+
*) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and
SSL2_SERVER_VERSION (not used at all) macros, which are now the
same as SSL2_VERSION anyway.
my $md5_obj="";
my $sha1_obj="";
my $rmd160_obj="";
+my $processor="";
if ($#ARGV < 0)
{
{
if ($_ =~ /^no-asm$/)
{ $no_asm=1; }
+ elsif ($_ =~ /^386$/)
+ { $processor=386; }
elsif ($_ =~ /^-/)
{
if ($_ =~ /^-[lL](.*)$/)
s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
+ s/^PROCESSOR=.*/PROCESSOR= $processor/;
print OUT $_."\n";
}
close(IN);
print "MD5_OBJ_ASM =$md5_obj\n";
print "SHA1_OBJ_ASM =$sha1_obj\n";
print "RMD160_OBJ_ASM=$rmd160_obj\n";
+print "PROCESSOR =$processor\n";
my $des_ptr=0;
my $des_risc1=0;
This will build and install OpenSSL in the default location, which is (for
historical reasons) /usr/local/ssl. If you want to install it anywhere else,
- do this after running `sh config':
+ do this after running `./config':
$ perl util/ssldir.pl /new/install/path
+ There are several options to ./config to customize the build:
+
+ -DRSAref Build with RSADSI's RSAREF toolkit.
+ no-asm Build with no assembler code.
+ 386 Use the 80386 instruction set only (the default x86 code is
+ more efficient, but requires at least a 486).
+
If anything goes wrong, follow the detailed instructions below. If your
operating system is not (yet) supported by OpenSSL, see the section on
porting to a new system.
#BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
#BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1
+# For x86 assembler: Set PROCESSOR to 386 if you want to support
+# the 80386.
+PROCESSOR=
+
# Set DES_ENC to des_enc.o if you want to use the C version
#There are 4 x86 assember options.
DES_ENC= asm/dx86-out.o asm/yx86-out.o
@for i in $(DIRS) ;\
do \
(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}' all ) || exit 1; \
+ $(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)' all ) || exit 1; \
done;
sub_all:
@for i in $(DIRS) ;\
do \
(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}' all ) || exit 1; \
+ $(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)' all ) || exit 1; \
done;
Makefile.ssl: Makefile.org
$(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o
asm/bx86unix.cpp:
- (cd asm; perl bf-586.pl cpp >bx86unix.cpp)
+ (cd asm; perl bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
files:
perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
require "x86asm.pl";
require "cbc.pl";
-&asm_init($ARGV[0],"bf-586.pl");
+&asm_init($ARGV[0],"bf-586.pl",$ARGV[$#ARGV] eq "386");
$BF_ROUNDS=16;
$BF_OFF=($BF_ROUNDS+2)*4;
$(CPP) -DBSDI asm/cx86unix.cpp | sed 's/ :/:/' | as -o asm/cx86bsdi.o
asm/cx86unix.cpp: asm/cast-586.pl
- (cd asm; perl cast-586.pl cpp >cx86unix.cpp)
+ (cd asm; perl cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp)
files:
perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
require "x86asm.pl";
require "cbc.pl";
-&asm_init($ARGV[0],"cast-586.pl");
+&asm_init($ARGV[0],"cast-586.pl",$ARGV[$#ARGV] eq "386");
$CAST_ROUNDS=16;
$L="edi";
&xor( $L, $tmp1);
# XXX
}
+
sub main'asm_init
{
- ($type,$fn)=@_;
+ ($type,$fn,$i386)=@_;
$filename=$fn;
- if ($ARGV[$#ARGV] eq "386")
- {
- $i386=1;
- }
-
$cpp=$sol=$aout=$win32=0;
if ( ($type eq "elf"))
{ require "x86unix.pl"; }
else
{
print STDERR <<"EOF";
-Usage: $filename <target> [386]
-
Pick one target type from
elf - linux, FreeBSD etc
a.out - old linux
$(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
asm/sx86unix.cpp:
- (cd asm; perl sha1-586.pl cpp >sx86unix.cpp)
+ (cd asm; perl sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
files:
perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
push(@INC,"perlasm","../../perlasm");
require "x86asm.pl";
-&asm_init($ARGV[0],"sha1-586.pl");
+&asm_init($ARGV[0],"sha1-586.pl",$ARGV[$#ARGV] eq "386");
$A="eax";
$B="ebx";