Merge in changes from the 0.9.6-stable branch.

This commit is contained in:
Richard Levitte 2001-04-04 16:34:38 +00:00
parent 11f3f9f4a1
commit 9aef355cf0
13 changed files with 61 additions and 16 deletions

10
CHANGES
View File

@ -4,6 +4,13 @@
Changes between 0.9.6 and 0.9.6a [xx XXX 2001] Changes between 0.9.6 and 0.9.6a [xx XXX 2001]
*) Change Configure and Makefiles to provide EXE_EXT, which will contain
the default extension for executables, if any. Also, make the perl
scripts that use symlink() to test if it really exists and use "cp"
if it doesn't. All this made OpenSSL compilable and installable in
CygWin.
[Richard Levitte]
*) Fix for asn1_GetSequence() for indefinite length constructed data. *) Fix for asn1_GetSequence() for indefinite length constructed data.
If SEQUENCE is length is indefinite just set c->slen to the total If SEQUENCE is length is indefinite just set c->slen to the total
amount of data available. amount of data available.
@ -28,6 +35,9 @@
*) MIPS assembler BIGNUM division bug fix. *) MIPS assembler BIGNUM division bug fix.
[Andy Polyakov] [Andy Polyakov]
*) Disabled incorrect Alpha assembler code.
[Richard Levitte]
*) Fix PKCS#7 decode routines so they correctly update the length *) Fix PKCS#7 decode routines so they correctly update the length
after reading an EOC for the EXPLICIT tag. after reading an EOC for the EXPLICIT tag.
[Steve Henson] [Steve Henson]

View File

@ -374,7 +374,7 @@ my %table=(
# DGUX, 88100. # DGUX, 88100.
"dgux-R3-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::RC4_INDEX DES_UNROLL:::", "dgux-R3-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::RC4_INDEX DES_UNROLL:::",
"dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lnsl -lsocket:RC4_INDEX:RC4_INDEX DES_UNROLL:::", "dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lnsl -lsocket:RC4_INDEX DES_UNROLL:::",
"dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown):-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown):-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
# SCO 3 - Tim Rice <tim@multitalents.net> # SCO 3 - Tim Rice <tim@multitalents.net>
@ -441,6 +441,7 @@ my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
my $prefix=""; my $prefix="";
my $openssldir=""; my $openssldir="";
my $exe_ext="";
my $install_prefix=""; my $install_prefix="";
my $no_threads=0; my $no_threads=0;
my $no_shared=1; my $no_shared=1;
@ -657,6 +658,7 @@ print "Configuring for $target\n";
my $IsWindows=scalar grep /^$target$/,@WinTargets; my $IsWindows=scalar grep /^$target$/,@WinTargets;
$exe_ext=".exe" if ($target eq "CygWin32");
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
$prefix=$openssldir if $prefix eq ""; $prefix=$openssldir if $prefix eq "";
@ -859,6 +861,7 @@ while (<IN>)
s/^CFLAG=.*$/CFLAG= $cflags/; s/^CFLAG=.*$/CFLAG= $cflags/;
s/^DEPFLAG=.*$/DEPFLAG= $depflags/; s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
s/^EX_LIBS=.*$/EX_LIBS= $lflags/; s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
s/^BN_ASM=.*$/BN_ASM= $bn_obj/; s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
s/^DES_ENC=.*$/DES_ENC= $des_obj/; s/^DES_ENC=.*$/DES_ENC= $des_obj/;
s/^BF_ENC=.*$/BF_ENC= $bf_obj/; s/^BF_ENC=.*$/BF_ENC= $bf_obj/;

View File

@ -59,6 +59,7 @@ CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD
DEPFLAG= DEPFLAG=
PEX_LIBS= PEX_LIBS=
EX_LIBS= EX_LIBS=
EXE_EXT=
AR=ar r AR=ar r
RANLIB= ranlib RANLIB= ranlib
PERL= perl PERL= perl
@ -201,7 +202,7 @@ sub_all:
do \ do \
if [ -d "$$i" ]; then \ if [ -d "$$i" ]; then \
(cd $$i && echo "making all in $$i..." && \ (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; \ $(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}' EXE_EXT='${EXE_EXT}' all ) || exit 1; \
else \ else \
$(MAKE) $$i; \ $(MAKE) $$i; \
fi; \ fi; \
@ -250,7 +251,7 @@ link-shared:
build-shared: clean-shared do_$(SHLIB_TARGET) link-shared build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
do_bsd-gcc-shared: linux-shared do_bsd-gcc-shared: do_gnu-shared
do_linux-shared: do_gnu-shared do_linux-shared: do_gnu-shared
do_gnu-shared: do_gnu-shared:
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
@ -349,7 +350,7 @@ test: tests
tests: rehash tests: rehash
@(cd test && echo "testing..." && \ @(cd test && echo "testing..." && \
$(MAKE) CC='${CC}' 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}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' tests ); $(MAKE) CC='${CC}' 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}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' EXE_EXT='${EXE_EXT}' tests );
@apps/openssl version -a @apps/openssl version -a
report: report:
@ -440,7 +441,7 @@ install: all install_docs
do \ do \
if [ -d "$$i" ]; then \ if [ -d "$$i" ]; then \
(cd $$i; echo "installing $$i..."; \ (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 ); \ $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
fi; \ fi; \
done done
@for i in $(LIBS) ;\ @for i in $(LIBS) ;\

View File

@ -18,6 +18,7 @@ RM= rm -f
PEX_LIBS= PEX_LIBS=
EX_LIBS= EX_LIBS=
EXE_EXT=
CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG) CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
@ -32,7 +33,7 @@ PROGRAM= openssl
SCRIPTS=CA.sh CA.pl der_chop SCRIPTS=CA.sh CA.pl der_chop
EXE= $(PROGRAM) EXE= $(PROGRAM)$(EXE_EXT)
E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \ E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
ca crl rsa rsautl dsa dsaparam \ ca crl rsa rsautl dsa dsaparam \
@ -77,7 +78,7 @@ top:
all: exe all: exe
exe: $(EXE) exe: $(PROGRAM)
req: sreq.o $(A_OBJ) $(DLIBCRYPTO) req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
$(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) $(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)

View File

@ -1432,9 +1432,11 @@ static int www_body(char *hostname, int s, unsigned char *context)
break; break;
} }
#if 0
/* append if a directory lookup */ /* append if a directory lookup */
if (e[-1] == '/') if (e[-1] == '/')
strcat(p,"index.html"); strcat(p,"index.html");
#endif
/* if a directory, do the index thang */ /* if a directory, do the index thang */
if (stat(p,&st_buf) < 0) if (stat(p,&st_buf) < 0)
@ -1446,7 +1448,13 @@ static int www_body(char *hostname, int s, unsigned char *context)
} }
if (S_ISDIR(st_buf.st_mode)) if (S_ISDIR(st_buf.st_mode))
{ {
#if 0 /* must check buffer size */
strcat(p,"/index.html"); strcat(p,"/index.html");
#else
BIO_puts(io,text);
BIO_printf(io,"'%s' is a directory\r\n",p);
break;
#endif
} }
if ((file=BIO_new_file(p,"r")) == NULL) if ((file=BIO_new_file(p,"r")) == NULL)

View File

@ -62,7 +62,6 @@
#ifdef VMS #ifdef VMS
#pragma message disable DOLLARID #pragma message disable DOLLARID
#include <lib$routines.h> #include <lib$routines.h>
#include <libfisdef.h>
#include <stsdef.h> #include <stsdef.h>
#include <descrip.h> #include <descrip.h>
#include <starlet.h> #include <starlet.h>
@ -260,7 +259,8 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym)
{ {
DSO_VMS_INTERNAL *ptr; DSO_VMS_INTERNAL *ptr;
int status; int status;
int flags = LIB$M_FIS_MIXEDCASE; int flags = (1<<4); /* LIB$M_FIS_MIXEDCASE, but this symbol isn't
defined in VMS older than 7.0 or so */
struct dsc$descriptor_s symname_dsc; struct dsc$descriptor_s symname_dsc;
*sym = NULL; *sym = NULL;

View File

@ -211,7 +211,7 @@ ascii2ebcdic(void *dest, const void *srce, size_t count)
} }
#else /*CHARSET_EBCDIC*/ #else /*CHARSET_EBCDIC*/
#ifdef PEDANTIC #if defined(PEDANTIC) || defined(VMS) || defined(__VMS)
static void *dummy=&dummy; static void *dummy=&dummy;
#endif #endif
#endif #endif

View File

@ -264,6 +264,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
if (lkey) { if (lkey) {
*keymatch |= MATCH_CERT; *keymatch |= MATCH_CERT;
if (cert) *cert = x509; if (cert) *cert = x509;
else X509_free(x509);
} else { } else {
if(ca) sk_X509_push (*ca, x509); if(ca) sk_X509_push (*ca, x509);
else X509_free(x509); else X509_free(x509);

View File

@ -504,7 +504,10 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send)
EVP_DigestFinal( &md_ctx,md,&md_size); EVP_DigestFinal( &md_ctx,md,&md_size);
for (i=7; i>=0; i--) for (i=7; i>=0; i--)
if (++seq[i]) break; {
++seq[i];
if (seq[i] != 0) break;
}
return(md_size); return(md_size);
} }

View File

@ -572,7 +572,10 @@ printf("rec=");
#endif #endif
for (i=7; i>=0; i--) for (i=7; i>=0; i--)
if (++seq[i]) break; {
++seq[i];
if (seq[i] != 0) break;
}
#ifdef TLS_DEBUG #ifdef TLS_DEBUG
{unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",md[z]); printf("\n"); } {unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",md[z]); printf("\n"); }

View File

@ -192,7 +192,7 @@ test_bn:
@./$(BNTEST) >tmp.bntest @./$(BNTEST) >tmp.bntest
@echo quit >>tmp.bntest @echo quit >>tmp.bntest
@echo "running bc" @echo "running bc"
@<tmp.bntest sh -c "`sh ./bctest`" | $(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"' @<tmp.bntest sh -c "`sh ./bctest || true`" | $(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' @echo 'test a^b%c implementations'
./$(EXPTEST) ./$(EXPTEST)

View File

@ -117,7 +117,12 @@ sub link_hash_cert {
} }
$hash .= ".$suffix"; $hash .= ".$suffix";
print "$fname => $hash\n"; print "$fname => $hash\n";
$symlink_exists=eval {symlink("",""); 1};
if ($symlink_exists) {
symlink $fname, $hash; symlink $fname, $hash;
} else {
system ("cp", $fname, $hash);
}
$hashlist{$hash} = $fprint; $hashlist{$hash} = $fprint;
} }
@ -142,7 +147,12 @@ sub link_hash_crl {
} }
$hash .= ".r$suffix"; $hash .= ".r$suffix";
print "$fname => $hash\n"; print "$fname => $hash\n";
$symlink_exists=eval {symlink("",""); 1};
if ($symlink_exists) {
symlink $fname, $hash; symlink $fname, $hash;
} else {
system ("cp", $fname, $hash);
}
$hashlist{$hash} = $fprint; $hashlist{$hash} = $fprint;
} }

View File

@ -48,8 +48,13 @@ foreach $dirname (@from_path) {
my $to = join('/', @to_path); my $to = join('/', @to_path);
my $file; my $file;
$symlink_exists=eval {symlink("",""); 1};
foreach $file (@files) { foreach $file (@files) {
my $err = ""; my $err = "";
if ($symlink_exists) {
symlink("$to/$file", "$from/$file") or $err = " [$!]"; symlink("$to/$file", "$from/$file") or $err = " [$!]";
} else {
system ("cp", "$file", "$from/$file") and $err = " [$!]";
}
print $file . " => $from/$file$err\n"; print $file . " => $from/$file$err\n";
} }