diff options
author | 2005-04-29 05:36:57 +0000 | |
---|---|---|
committer | 2005-04-29 05:36:57 +0000 | |
commit | 9f93b617b0dfd35e8a6c7bdafd5ceb0c4f598802 (patch) | |
tree | d40545e143b8d4b6786e65eee7d019efe7f1d738 /lib/libssl/src/util | |
parent | sync (diff) | |
download | wireguard-openbsd-9f93b617b0dfd35e8a6c7bdafd5ceb0c4f598802.tar.xz wireguard-openbsd-9f93b617b0dfd35e8a6c7bdafd5ceb0c4f598802.zip |
import of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@
Diffstat (limited to 'lib/libssl/src/util')
-rw-r--r-- | lib/libssl/src/util/extract-names.pl | 8 | ||||
-rw-r--r-- | lib/libssl/src/util/fixNT.sh | 6 | ||||
-rwxr-xr-x | lib/libssl/src/util/opensslwrap.sh | 22 | ||||
-rw-r--r-- | lib/libssl/src/util/pl/VC-CE.pl | 11 | ||||
-rw-r--r-- | lib/libssl/src/util/pl/ultrix.pl | 11 | ||||
-rw-r--r-- | lib/libssl/src/util/pod2mantest | 2 | ||||
-rwxr-xr-x | lib/libssl/src/util/shlib_wrap.sh | 70 |
7 files changed, 117 insertions, 13 deletions
diff --git a/lib/libssl/src/util/extract-names.pl b/lib/libssl/src/util/extract-names.pl index 744a8e2324e..35bd6ed8432 100644 --- a/lib/libssl/src/util/extract-names.pl +++ b/lib/libssl/src/util/extract-names.pl @@ -9,9 +9,11 @@ while(<STDIN>) { } elsif ($name) { if (/ - /) { s/ - .*//; - s/,[ \t]+/,/g; - s/^[ \t]+//g; - s/[ \t]+$//g; + s/,\s+/,/g; + s/\s+,/,/g; + s/^\s+//g; + s/\s+$//g; + s/\s/_/g; push @words, split ','; } } diff --git a/lib/libssl/src/util/fixNT.sh b/lib/libssl/src/util/fixNT.sh index ce4f19299ba..ab9e766b869 100644 --- a/lib/libssl/src/util/fixNT.sh +++ b/lib/libssl/src/util/fixNT.sh @@ -3,12 +3,12 @@ # clean up the mess that NT makes of my source tree # -if [ -f makefile.ssl -a ! -f Makefile.ssl ]; then - /bin/mv makefile.ssl Makefile.ssl +if [ -f makefile -a ! -f Makefile ]; then + /bin/mv makefile Makefile fi chmod +x Configure util/* echo cleaning /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null echo 'removing those damn ^M' perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` -make -f Makefile.ssl links +make -f Makefile links diff --git a/lib/libssl/src/util/opensslwrap.sh b/lib/libssl/src/util/opensslwrap.sh new file mode 100755 index 00000000000..91d29e2b870 --- /dev/null +++ b/lib/libssl/src/util/opensslwrap.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +HERE="`echo $0 | sed -e 's|[^/]*$||'`" +OPENSSL="${HERE}../apps/openssl" + +if [ -x "${OPENSSL}.exe" ]; then + # The original reason for this script existence is to work around + # certain caveats in run-time linker behaviour. On Windows platforms + # adjusting $PATH used to be sufficient, but with introduction of + # SafeDllSearchMode in XP/2003 the only way to get it right in + # *all* possible situations is to copy newly built .DLLs to apps/ + # and test/, which is now done elsewhere... The $PATH is adjusted + # for backward compatibility (and nostagical reasons:-). + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${HERE}..:$PATH"; export PATH + fi + exec "${OPENSSL}.exe" "$@" +elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then + exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" +else + exec "${OPENSSL}" "$@" # hope for the best... +fi diff --git a/lib/libssl/src/util/pl/VC-CE.pl b/lib/libssl/src/util/pl/VC-CE.pl index 1805ef9d976..2fd0c4dd32d 100644 --- a/lib/libssl/src/util/pl/VC-CE.pl +++ b/lib/libssl/src/util/pl/VC-CE.pl @@ -47,7 +47,7 @@ $shlibp=($shlib)?".dll":".lib"; $lfile='/out:'; $shlib_ex_obj=""; -#$app_ex_obj="setargv.obj"; +$app_ex_obj=""; $app_ex_obj=""; $bn_asm_obj=''; @@ -97,14 +97,19 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; - $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; + $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/lib/libssl/src/util/pl/ultrix.pl b/lib/libssl/src/util/pl/ultrix.pl index ea370c71f96..447b8547080 100644 --- a/lib/libssl/src/util/pl/ultrix.pl +++ b/lib/libssl/src/util/pl/ultrix.pl @@ -17,7 +17,7 @@ else $cflags.=" -std1 -DL_ENDIAN"; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='$(OBJ_D)/mips1.o'; $bn_asm_src='crypto/bn/asm/mips1.s'; @@ -25,13 +25,18 @@ if (!$no_asm) sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/lib/libssl/src/util/pod2mantest b/lib/libssl/src/util/pod2mantest index 412ca8d6d88..384e683df4c 100644 --- a/lib/libssl/src/util/pod2mantest +++ b/lib/libssl/src/util/pod2mantest @@ -1,6 +1,6 @@ #!/bin/sh -# This script is used by test/Makefile.ssl to check whether a sane 'pod2man' +# This script is used by test/Makefile to check whether a sane 'pod2man' # is installed. # ('make install' should not try to run 'pod2man' if it does not exist or if # it is a broken 'pod2man' version that is known to cause trouble. if we find diff --git a/lib/libssl/src/util/shlib_wrap.sh b/lib/libssl/src/util/shlib_wrap.sh new file mode 100755 index 00000000000..dc5f5b1ce48 --- /dev/null +++ b/lib/libssl/src/util/shlib_wrap.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +[ $# -ne 0 ] || set -x # debug mode without arguments:-) + +THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." +[ -d "${THERE}" ] || exec "$@" # should never happen... + +# Alternative to this is to parse ${THERE}/Makefile... +LIBCRYPTOSO="${THERE}/libcrypto.so" +if [ -f "$LIBCRYPTOSO" ]; then + while [ -h "$LIBCRYPTOSO" ]; do + LIBCRYPTOSO="${THERE}/`ls -l "$LIBCRYPTOSO" | sed -e 's|.*\-> ||'`" + done + SOSUFFIX=`echo ${LIBCRYPTOSO} | sed -e 's|.*\.so||' 2>/dev/null` + LIBSSLSO="${THERE}/libssl.so${SOSUFFIX}" +fi + +SYSNAME=`(uname -s) 2>/dev/null`; +case "$SYSNAME" in +SunOS|IRIX*) + # SunOS and IRIX run-time linkers evaluate alternative + # variables depending on target ABI... + rld_var=LD_LIBRARY_PATH + case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in + *ELF\ 64*SPARC*) + [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64 + ;; + *ELF\ N32*MIPS*) + [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH + _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST + ;; + *ELF\ 64*MIPS*) + [ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH + _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST + ;; + esac + eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var + unset rld_var + ;; +*) LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH" # Linux, ELF HP-UX + DYLD_LIBRARY_PATH="${THERE}:$DYLD_LIBRARY_PATH" # MacOS X + SHLIB_PATH="${THERE}:$SHLIB_PATH" # legacy HP-UX + LIBPATH="${THERE}:$LIBPATH" # AIX, OS/2 + export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH + # Even though $PATH is adjusted [for Windows sake], it doesn't + # necessarily does the trick. Trouble is that with introduction + # of SafeDllSearchMode in XP/2003 it's more appropriate to copy + # .DLLs in vicinity of executable, which is done elsewhere... + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${THERE}:$PATH"; export PATH + fi + ;; +esac + +if [ -f "$LIBCRYPTOSO" ]; then + # Following three lines are major excuse for isolating them into + # this wrapper script. Original reason for setting LD_PRELOAD + # was to make it possible to pass 'make test' when user linked + # with -rpath pointing to previous version installation. Wrapping + # it into a script makes it possible to do so on multi-ABI + # platforms. + case "$SYSNAME" in + *BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD + *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX + esac + _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX + export LD_PRELOAD _RLD_LIST +fi + +exec "$@" |