From: Richard Levitte Date: Thu, 6 Jun 2002 08:59:22 +0000 (+0000) Subject: Recent changes from 0.9.6-stable. X-Git-Tag: OpenSSL-engine-0_9_6e~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=64ed18ef201683b809f8630ebea81b3969151848;p=oweals%2Fopenssl.git Recent changes from 0.9.6-stable. --- diff --git a/Configure b/Configure index c76747b039..edaa80478b 100755 --- a/Configure +++ b/Configure @@ -154,6 +154,7 @@ my %table=( "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8 # but keep the assembler modules. "solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -179,10 +180,10 @@ my %table=( "linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::", # Ray Miller has patiently # assisted with debugging of following two configs. -"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::::", +"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # it's a real mess with -mcpu=ultrasparc option under Linux, but # -Wa,-Av8plus should do the trick no matter what. -"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # !!!Folowing can't be even tested yet!!! # We have to wait till 64-bit glibc for SPARC is operational!!! #"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:", @@ -921,6 +922,10 @@ if ($rmd160_obj =~ /\.o$/) $cflags.=" -DRMD160_ASM"; } +# "Stringify" the C flags string. This permits it to be made part of a string +# and works as well on command lines. +$cflags =~ s/([\\\"])/\\\1/g; + my $version = "unknown"; my $major = "unknown"; my $minor = "unknown"; diff --git a/Makefile.org b/Makefile.org index 8bd0e23e6f..f545b11595 100644 --- a/Makefile.org +++ b/Makefile.org @@ -681,7 +681,7 @@ install_docs: fn=`basename $$i .pod`; \ if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \ echo "installing man$$sec/`basename $$i .pod`.$$sec"; \ - (cd `dirname $$i`; \ + (cd `$(PERL) util/dirname.pl $$i`; \ sh -c "`cd ../../util; ./pod2mantest ignore` \ --section=$$sec --center=OpenSSL \ --release=$(VERSION) `basename $$i`") \ @@ -691,7 +691,7 @@ install_docs: fn=`basename $$i .pod`; \ if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \ echo "installing man$$sec/`basename $$i .pod`.$$sec"; \ - (cd `dirname $$i`; \ + (cd `$(PERL) util/dirname.pl $$i`; \ sh -c "`cd ../../util; ./pod2mantest ignore` \ --section=$$sec --center=OpenSSL \ --release=$(VERSION) `basename $$i`") \ diff --git a/TABLE b/TABLE index 41ff62f615..66c54c51b4 100644 --- a/TABLE +++ b/TABLE @@ -2443,7 +2443,7 @@ $cc = gcc $cflags = -mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W $unistd = $thread_cflag = -D_REENTRANT -$lflags = +$lflags = -ldl $bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR $bn_obj = asm/sparcv8.o $des_obj = @@ -2454,11 +2454,11 @@ $cast_obj = $rc4_obj = $rmd160_obj = $rc5_obj = -$dso_scheme = -$shared_target= -$shared_cflag = +$dso_scheme = dlfcn +$shared_target= linux-shared +$shared_cflag = -fPIC $shared_ldflag = -$shared_extension = +$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = *** linux-sparcv9 @@ -2466,7 +2466,7 @@ $cc = gcc $cflags = -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W $unistd = $thread_cflag = -D_REENTRANT -$lflags = +$lflags = -ldl $bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR $bn_obj = asm/sparcv8plus.o $des_obj = @@ -3059,6 +3059,29 @@ $shared_ldflag = -xarch=v9 $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = /usr/ccs/bin/ar rs +*** solaris64-sparcv9-gcc31 +$cc = gcc +$cflags = -mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DULTRASPARC +$unistd = +$thread_cflag = -D_REENTRANT +$lflags = -lsocket -lnsl -ldl +$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR +$bn_obj = +$des_obj = +$bf_obj = +$md5_obj = asm/md5-sparcv9.o +$sha1_obj = +$cast_obj = +$rc4_obj = +$rmd160_obj = +$rc5_obj = +$dso_scheme = dlfcn +$shared_target= solaris-shared +$shared_cflag = -fPIC +$shared_ldflag = +$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) +$ranlib = + *** sunos-gcc $cc = gcc $cflags = -O3 -mv8 -Dssize_t=int diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl index 526e972002..b09ff68ee2 100644 --- a/apps/Makefile.ssl +++ b/apps/Makefile.ssl @@ -13,7 +13,6 @@ OPENSSLDIR= /usr/local/ssl MAKE= make -f Makefile.ssl MAKEDEPEND= $(TOP)/util/domd $(TOP) MAKEFILE= Makefile.ssl -PERL=/usr/local/bin/perl RM= rm -f PEX_LIBS= diff --git a/config b/config index b95af94c7a..f619e3463b 100755 --- a/config +++ b/config @@ -381,11 +381,13 @@ done # figure out if gcc is available and if so we use it otherwise # we fallback to whatever cc does on the system -GCCVER=`(gcc --version) 2>/dev/null` +GCCVER=`(gcc --version) 2>/dev/null | head -1` if [ "$GCCVER" != "" ]; then CC=gcc - # then strip off whatever prefix Cygnus prepends the number with... - GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'` + # then strip off whatever prefix Cygnus as well as GCC 3.1 prepends + # the number with... Hopefully, this will work for any future prefixes + # as well. + GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z ()]*\-//'` # peak single digit before and after first dot, e.g. 2.95.1 gives 29 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` else diff --git a/crypto/Makefile.ssl b/crypto/Makefile.ssl index f4fe47e260..0cc666b73d 100644 --- a/crypto/Makefile.ssl +++ b/crypto/Makefile.ssl @@ -51,11 +51,11 @@ all: buildinf.h lib subdirs buildinf.h: ../Makefile.ssl ( echo "#ifndef MK1MF_BUILD"; \ - echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ - echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \ - echo " #define PLATFORM \"$(PLATFORM)\""; \ + echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \ + echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \ + echo ' #define PLATFORM "$(PLATFORM)"'; \ echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ - echo "#endif" ) >buildinf.h + echo '#endif' ) >buildinf.h testapps: if echo ${SDIRS} | fgrep ' des '; \ diff --git a/crypto/asn1/a_enum.c b/crypto/asn1/a_enum.c index 74b1414a91..105717128b 100644 --- a/crypto/asn1/a_enum.c +++ b/crypto/asn1/a_enum.c @@ -207,7 +207,8 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) len=((j == 0)?0:((j/8)+1)); if (ret->length < len+4) { - char *new_data=(char *)OPENSSL_realloc(ret->data, len+4); + unsigned char *new_data= + OPENSSL_realloc(ret->data, len+4); if (!new_data) { ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE); diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c index 7b39519e5c..0a24bef685 100644 --- a/crypto/asn1/a_int.c +++ b/crypto/asn1/a_int.c @@ -453,7 +453,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai) len=((j == 0)?0:((j/8)+1)); if (ret->length < len+4) { - char *new_data=(char *)OPENSSL_realloc(ret->data, len+4); + unsigned char *new_data= OPENSSL_realloc(ret->data, len+4); if (!new_data) { ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE); diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c index 3ae7432cb2..dd5955ac9f 100644 --- a/crypto/asn1/a_utctm.c +++ b/crypto/asn1/a_utctm.c @@ -270,6 +270,9 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) { struct tm *tm; +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) + struct tm data; +#endif int offset; int year; @@ -287,7 +290,8 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) t -= offset*60; /* FIXME: may overflow in extreme cases */ #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) - { struct tm data; gmtime_r(&t, &data); tm = &data; } + gmtime_r(&t, &data); + tm = &data; #else tm = gmtime(&t); #endif diff --git a/crypto/objects/Makefile.ssl b/crypto/objects/Makefile.ssl index 7b1c51cdb1..562b127467 100644 --- a/crypto/objects/Makefile.ssl +++ b/crypto/objects/Makefile.ssl @@ -14,7 +14,6 @@ MAKE= make -f Makefile.ssl MAKEDEPEND= $(TOP)/util/domd $(TOP) MAKEFILE= Makefile.ssl AR= ar r -PERL= perl CFLAGS= $(INCLUDES) $(CFLAG) diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index e00af7c018..01759f75c3 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -258,6 +258,7 @@ char *PEM_ASN1_read_bio(char *(*d2i)(), const char *name, BIO *bp, char **x, PKCS8_PRIV_KEY_INFO *p8inf; p8inf=d2i_PKCS8_PRIV_KEY_INFO( (PKCS8_PRIV_KEY_INFO **) x, &p, len); + if(!p8inf) goto p8err; ret = (char *)EVP_PKCS82PKEY(p8inf); PKCS8_PRIV_KEY_INFO_free(p8inf); } else if (strcmp(nm,PEM_STRING_PKCS8) == 0) { diff --git a/demos/maurice/loadkeys.c b/demos/maurice/loadkeys.c index 0f3464753a..792371c264 100644 --- a/demos/maurice/loadkeys.c +++ b/demos/maurice/loadkeys.c @@ -33,7 +33,7 @@ EVP_PKEY * ReadPublicKey(const char *certfile) x509 = (X509 *)PEM_ASN1_read ((char *(*)())d2i_X509, PEM_STRING_X509, - fp, NULL, NULL); + fp, NULL, NULL, NULL); if (x509 == NULL) { @@ -64,7 +64,7 @@ EVP_PKEY *ReadPrivateKey(const char *keyfile) pkey = (EVP_PKEY*)PEM_ASN1_read ((char *(*)())d2i_PrivateKey, PEM_STRING_EVP_PKEY, fp, - NULL, NULL); + NULL, NULL, NULL); fclose (fp); diff --git a/doc/crypto/BN_rand.pod b/doc/crypto/BN_rand.pod index ecd410f7f2..9cec238f9e 100644 --- a/doc/crypto/BN_rand.pod +++ b/doc/crypto/BN_rand.pod @@ -14,7 +14,7 @@ BN_rand, BN_pseudo_rand - generate pseudo-random number int BN_rand_range(BIGNUM *rnd, BIGNUM *range); - int BN_pseudo_rand_range(BIGNUM *rnd, int bits, int top, int bottom); + int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); =head1 DESCRIPTION diff --git a/doc/ssl/SSL_CTX_set_cert_store.pod b/doc/ssl/SSL_CTX_set_cert_store.pod index 81286ee650..3a240c4d37 100644 --- a/doc/ssl/SSL_CTX_set_cert_store.pod +++ b/doc/ssl/SSL_CTX_set_cert_store.pod @@ -14,7 +14,7 @@ SSL_CTX_set_cert_store, SSL_CTX_get_cert_store - manipulate X509 certificate ver =head1 DESCRIPTION SSL_CTX_set_cert_store() sets/replaces the certificate verification storage -of B to/with B. If another X505_STORE object is currently +of B to/with B. If another X509_STORE object is currently set in B, it will be X509_STORE_free()ed. SSL_CTX_get_cert_store() returns a pointer to the current certificate diff --git a/test/Makefile.ssl b/test/Makefile.ssl index deacb72c91..bb91b9c595 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -13,7 +13,6 @@ INSTALLTOP= /usr/local/ssl MAKEFILE= Makefile.ssl MAKE= make -f $(MAKEFILE) MAKEDEPEND= $(TOP)/util/domd $(TOP) -PERL= perl PEX_LIBS= EX_LIBS= #-lnsl -lsocket diff --git a/util/domd b/util/domd index 9f75131f22..51c59bd172 100755 --- a/util/domd +++ b/util/domd @@ -7,5 +7,5 @@ shift cp Makefile.ssl Makefile.save makedepend -f Makefile.ssl $@ -perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new +${PERL} $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new mv Makefile.new Makefile.ssl