Commit f36a8c20 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Include some fixes from 0.9.8-stable branch.

parent 90ac9ec2
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -1227,9 +1227,13 @@ $cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/);
#
if ($target =~ /\-icc$/)	# Intel C compiler
	{
	my($iccver)=`$cc -V 2>&1`;
	if ($iccver =~ /Version ([0-9]+)\./)	{ $iccver=$1; }
	else					{ $iccver=0;  }
	my $iccver=0;
	if (open(FD,"$cc -V 2>&1 |"))
		{
		while(<FD>) { $iccver=$1 if (/Version ([0-9]+)\./); }
		close(FD);
		}

	if ($iccver>=8)
		{
		# Eliminate unnecessary dependency from libirc.a. This is
@@ -1237,6 +1241,15 @@ if ($target =~ /\-icc$/) # Intel C compiler
		# apps/openssl can end up in endless loop upon startup...
		$cflags.=" -Dmemcpy=__builtin_memcpy -Dmemset=__builtin_memset";
		}
	if ($iccver>=9)
		{
		$cflags.=" -i-static";
		$cflags=~s/\-no_cpprt/-no-cpprt/;
		}
	if ($iccver>=10)
		{
		$cflags=~s/\-i\-static/-static-intel/;
		}
	}

# Unlike other OSes (like Solaris, Linux, Tru64, IRIX) BSD run-time
+2 −2
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ link_o.hpux:
	ALLSYMSFLAGS='-Wl,-Fl'; \
	NOALLSYMSFLAGS=''; \
	expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+cdp,../:,+cdp,./:"; \
	fi; \
	rm -f $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX || :; \
	$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
@@ -479,7 +479,7 @@ link_a.hpux:
	ALLSYMSFLAGS='-Wl,-Fl'; \
	NOALLSYMSFLAGS=''; \
	expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+cdp,../:,+cdp,./:"; \
	fi; \
	rm -f $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX || :; \
	$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
+58 −4
Original line number Diff line number Diff line
@@ -947,7 +947,7 @@ $arflags =

*** darwin-i386-cc
$cc           = cc
$cflags       = -O3 -fomit-frame-pointer -fno-common
$cflags       = -arch i386 -O3 -fomit-frame-pointer -fno-common
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = MACOSX
@@ -967,14 +967,14 @@ $rc5_obj =
$dso_scheme   = dlfcn
$shared_target= darwin-shared
$shared_cflag = -fPIC -fno-common
$shared_ldflag = -dynamiclib
$shared_ldflag = -arch i386 -dynamiclib
$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
$ranlib       = 
$arflags      = 

*** darwin-ppc-cc
$cc           = cc
$cflags       = -O3 -DB_ENDIAN
$cflags       = -arch ppc -O3 -DB_ENDIAN
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = MACOSX
@@ -994,7 +994,61 @@ $rc5_obj =
$dso_scheme   = dlfcn
$shared_target= darwin-shared
$shared_cflag = -fPIC -fno-common
$shared_ldflag = -dynamiclib
$shared_ldflag = -arch ppc -dynamiclib
$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
$ranlib       = 
$arflags      = 

*** darwin64-ppc-cc
$cc           = cc
$cflags       = -arch ppc64 -O3 -DB_ENDIAN
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = MACOSX
$lflags       = -Wl,-search_paths_first%
$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
$cpuid_obj    = ppccpuid_osx64.o
$bn_obj       = osx_ppc64.o osx_ppc64-mont.o
$des_obj      = 
$aes_obj      = 
$bf_obj       = 
$md5_obj      = 
$sha1_obj     = sha1-ppc_osx64.o sha256-ppc_osx64.o sha512-ppc_osx64.o
$cast_obj     = 
$rc4_obj      = 
$rmd160_obj   = 
$rc5_obj      = 
$dso_scheme   = 
$shared_target= 
$shared_cflag = dlfcn
$shared_ldflag = darwin-shared
$shared_extension = -fPIC -fno-common
$ranlib       = -arch ppc64 -dynamiclib
$arflags      = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib

*** darwin64-x86_64-cc
$cc           = cc
$cflags       = -arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall
$unistd       = 
$thread_cflag = -D_REENTRANT
$sys_id       = MACOSX
$lflags       = -Wl,-search_paths_first%
$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
$cpuid_obj    = 
$bn_obj       = 
$des_obj      = 
$aes_obj      = 
$bf_obj       = 
$md5_obj      = 
$sha1_obj     = 
$cast_obj     = 
$rc4_obj      = 
$rmd160_obj   = 
$rc5_obj      = 
$dso_scheme   = dlfcn
$shared_target= darwin-shared
$shared_cflag = -fPIC -fno-common
$shared_ldflag = -arch x86_64 -dynamiclib
$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
$ranlib       = 
$arflags      = 
+13 −9
Original line number Diff line number Diff line
@@ -256,29 +256,33 @@ ERR_load_crypto_strings();
		BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
#endif

		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm (default)\n",
			LN_md5,LN_md5);
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_md4,LN_md4);
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_md2,LN_md2);
#ifndef OPENSSL_NO_SHA
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_sha1,LN_sha1);
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_sha,LN_sha);
#ifndef OPENSSL_NO_SHA256
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_sha224,LN_sha224);
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_sha256,LN_sha256);
#endif
#ifndef OPENSSL_NO_SHA512
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_sha384,LN_sha384);
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_sha512,LN_sha512);
#endif
#endif
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_mdc2,LN_mdc2);
		BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
		BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
			LN_ripemd160,LN_ripemd160);
		err=1;
		goto end;
+7 −3
Original line number Diff line number Diff line
@@ -62,9 +62,11 @@ typedef struct {
/* XXX: probably some better way to do this */
#if defined(__i386__) || defined(__x86_64__)
#define UNALIGNED_MEMOPS_ARE_FAST 1
#else
#define UNALIGNED_MEMOPS_ARE_FAST 0
#endif

#ifdef UNALIGNED_MEMOPS_ARE_FAST
#if UNALIGNED_MEMOPS_ARE_FAST
#define load_block(d, s)        (d) = *(const aes_block_t *)(s)
#define store_block(d, s)       *(aes_block_t *)(d) = (s)
#else
@@ -89,7 +91,8 @@ void AES_ige_encrypt(const unsigned char *in, unsigned char *out,

	if (AES_ENCRYPT == enc)
		{
		if (in != out)
		if (in != out &&
		    (UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
			{
			aes_block_t *ivp = (aes_block_t *)ivec;
			aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
@@ -143,7 +146,8 @@ void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
		}
	else
		{
		if(in != out)
		if (in != out &&
		    (UNALIGNED_MEMOPS_ARE_FAST || ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(long)==0))
			{
			aes_block_t *ivp = (aes_block_t *)ivec;
			aes_block_t *iv2p = (aes_block_t *)(ivec + AES_BLOCK_SIZE);
Loading