Recent changes from 0.9.6-stable.
authorRichard Levitte <levitte@openssl.org>
Thu, 6 Jun 2002 08:59:22 +0000 (08:59 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 6 Jun 2002 08:59:22 +0000 (08:59 +0000)
16 files changed:
Configure
Makefile.org
TABLE
apps/Makefile.ssl
config
crypto/Makefile.ssl
crypto/asn1/a_enum.c
crypto/asn1/a_int.c
crypto/asn1/a_utctm.c
crypto/objects/Makefile.ssl
crypto/pem/pem_lib.c
demos/maurice/loadkeys.c
doc/crypto/BN_rand.pod
doc/ssl/SSL_CTX_set_cert_store.pod
test/Makefile.ssl
util/domd

index c76747b039e5e7202d7f4a02a39ebf68213eb4ae..edaa80478be7553fbdf63ffa891de2d2931e2353 100755 (executable)
--- 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 <ray.miller@computing-services.oxford.ac.uk> 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";
index 8bd0e23e6fc4878cce37c3b89cf4ce5cc164b73e..f545b11595a14d971c9c871ff6affca4c0958788 100644 (file)
@@ -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 41ff62f615f7f698d5a28d77906dd2961be6f947..66c54c51b46255804971dce1e8fb45b1e544a340 100644 (file)
--- 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
index 526e9720021ec831f0202abb46800b3266a1a1a3..b09ff68ee2f31e88c5cb73cb774449d1d6ea2e77 100644 (file)
@@ -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 b95af94c7a3b0476f0120f8377f04192fc182b89..f619e3463b8d941d2a4d242e2e708eeb9173560c 100755 (executable)
--- 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
index f4fe47e260afe388949b09004e6ab798fc32b681..0cc666b73de9ae915e26bb419f54f135f7813cd0 100644 (file)
@@ -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 '; \
index 74b1414a91b21ee11c4626914bc3c7f8f7b5088b..105717128b3e54aab57a25f970b20d682f9d91c9 100644 (file)
@@ -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);
index 7b39519e5cb9ec8e5f167537145e48ca605a6d6b..0a24bef68504b38e4da96669ae641411af451ebb 100644 (file)
@@ -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);
index 3ae7432cb20aef77a7c4ecebb37ea2dcdd2215ba..dd5955ac9fdd778095bb23252cc6ed332c367831 100644 (file)
@@ -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
index 7b1c51cdb128c50ae63671cd08499d45a66b5b0a..562b127467c6d534fe5116d225eaddd804741dd3 100644 (file)
@@ -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)
 
index e00af7c0184211ed59811d48b26c2f1e6320ed6d..01759f75c3b548135055602b777ec57dd3b6bc21 100644 (file)
@@ -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) {
index 0f3464753af1f92b6fdbd27b484811e16cd06b5f..792371c26419af4629c95fb508b2c409112a06bc 100644 (file)
@@ -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);
 
index ecd410f7f252400f41cd2ca14c99206bd92cbe34..9cec238f9e24b9d8808ce50f558bdd188892c3e1 100644 (file)
@@ -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
 
index 81286ee650f7df7d9c95ff0c3c8fd5c191837023..3a240c4d37476a596392c118af489fd2f1cb7db6 100644 (file)
@@ -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<ctx> to/with B<store>. If another X505_STORE object is currently
+of B<ctx> to/with B<store>. If another X509_STORE object is currently
 set in B<ctx>, it will be X509_STORE_free()ed.
 
 SSL_CTX_get_cert_store() returns a pointer to the current certificate
index deacb72c9169c27c3e0410fccfec620852448a8e..bb91b9c595c000b32b3cfa5cd51eaa17109b17ae 100644 (file)
@@ -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
index 9f75131f221ea3b8334269878a81f83a8de5442f..51c59bd1726e3e5be70c6e61f0617042fe4be144 100755 (executable)
--- 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