diff options
author | djm <> | 2005-04-29 05:37:32 +0000 |
---|---|---|
committer | djm <> | 2005-04-29 05:37:32 +0000 |
commit | 411d389aff1d4ca3241d9d89edb4110c1cf05035 (patch) | |
tree | 26769b736e0df1e96e60b36db36c918dd42746be /src/lib/libcrypto/util | |
parent | f958f59ed2b1b93fadf25a4c8bd7d1f3c655a229 (diff) | |
parent | 588543a0946f1dbf0f1dd5135f8f6447486dc183 (diff) | |
download | openbsd-411d389aff1d4ca3241d9d89edb4110c1cf05035.tar.gz openbsd-411d389aff1d4ca3241d9d89edb4110c1cf05035.tar.bz2 openbsd-411d389aff1d4ca3241d9d89edb4110c1cf05035.zip |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/util')
-rw-r--r-- | src/lib/libcrypto/util/extract-names.pl | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/util/fixNT.sh | 6 | ||||
-rwxr-xr-x | src/lib/libcrypto/util/opensslwrap.sh | 22 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pl/VC-CE.pl | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pod2mantest | 2 | ||||
-rwxr-xr-x | src/lib/libcrypto/util/shlib_wrap.sh | 70 |
6 files changed, 109 insertions, 10 deletions
diff --git a/src/lib/libcrypto/util/extract-names.pl b/src/lib/libcrypto/util/extract-names.pl index 744a8e2324..35bd6ed843 100644 --- a/src/lib/libcrypto/util/extract-names.pl +++ b/src/lib/libcrypto/util/extract-names.pl | |||
@@ -9,9 +9,11 @@ while(<STDIN>) { | |||
9 | } elsif ($name) { | 9 | } elsif ($name) { |
10 | if (/ - /) { | 10 | if (/ - /) { |
11 | s/ - .*//; | 11 | s/ - .*//; |
12 | s/,[ \t]+/,/g; | 12 | s/,\s+/,/g; |
13 | s/^[ \t]+//g; | 13 | s/\s+,/,/g; |
14 | s/[ \t]+$//g; | 14 | s/^\s+//g; |
15 | s/\s+$//g; | ||
16 | s/\s/_/g; | ||
15 | push @words, split ','; | 17 | push @words, split ','; |
16 | } | 18 | } |
17 | } | 19 | } |
diff --git a/src/lib/libcrypto/util/fixNT.sh b/src/lib/libcrypto/util/fixNT.sh index ce4f19299b..ab9e766b86 100644 --- a/src/lib/libcrypto/util/fixNT.sh +++ b/src/lib/libcrypto/util/fixNT.sh | |||
@@ -3,12 +3,12 @@ | |||
3 | # clean up the mess that NT makes of my source tree | 3 | # clean up the mess that NT makes of my source tree |
4 | # | 4 | # |
5 | 5 | ||
6 | if [ -f makefile.ssl -a ! -f Makefile.ssl ]; then | 6 | if [ -f makefile -a ! -f Makefile ]; then |
7 | /bin/mv makefile.ssl Makefile.ssl | 7 | /bin/mv makefile Makefile |
8 | fi | 8 | fi |
9 | chmod +x Configure util/* | 9 | chmod +x Configure util/* |
10 | echo cleaning | 10 | echo cleaning |
11 | /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null | 11 | /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null |
12 | echo 'removing those damn ^M' | 12 | echo 'removing those damn ^M' |
13 | perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` | 13 | perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` |
14 | make -f Makefile.ssl links | 14 | make -f Makefile links |
diff --git a/src/lib/libcrypto/util/opensslwrap.sh b/src/lib/libcrypto/util/opensslwrap.sh new file mode 100755 index 0000000000..91d29e2b87 --- /dev/null +++ b/src/lib/libcrypto/util/opensslwrap.sh | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | HERE="`echo $0 | sed -e 's|[^/]*$||'`" | ||
4 | OPENSSL="${HERE}../apps/openssl" | ||
5 | |||
6 | if [ -x "${OPENSSL}.exe" ]; then | ||
7 | # The original reason for this script existence is to work around | ||
8 | # certain caveats in run-time linker behaviour. On Windows platforms | ||
9 | # adjusting $PATH used to be sufficient, but with introduction of | ||
10 | # SafeDllSearchMode in XP/2003 the only way to get it right in | ||
11 | # *all* possible situations is to copy newly built .DLLs to apps/ | ||
12 | # and test/, which is now done elsewhere... The $PATH is adjusted | ||
13 | # for backward compatibility (and nostagical reasons:-). | ||
14 | if [ "$OSTYPE" != msdosdjgpp ]; then | ||
15 | PATH="${HERE}..:$PATH"; export PATH | ||
16 | fi | ||
17 | exec "${OPENSSL}.exe" "$@" | ||
18 | elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then | ||
19 | exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" | ||
20 | else | ||
21 | exec "${OPENSSL}" "$@" # hope for the best... | ||
22 | fi | ||
diff --git a/src/lib/libcrypto/util/pl/VC-CE.pl b/src/lib/libcrypto/util/pl/VC-CE.pl index 1805ef9d97..2fd0c4dd32 100644 --- a/src/lib/libcrypto/util/pl/VC-CE.pl +++ b/src/lib/libcrypto/util/pl/VC-CE.pl | |||
@@ -47,7 +47,7 @@ $shlibp=($shlib)?".dll":".lib"; | |||
47 | $lfile='/out:'; | 47 | $lfile='/out:'; |
48 | 48 | ||
49 | $shlib_ex_obj=""; | 49 | $shlib_ex_obj=""; |
50 | #$app_ex_obj="setargv.obj"; | 50 | $app_ex_obj=""; |
51 | $app_ex_obj=""; | 51 | $app_ex_obj=""; |
52 | 52 | ||
53 | $bn_asm_obj=''; | 53 | $bn_asm_obj=''; |
@@ -97,14 +97,19 @@ sub do_lib_rule | |||
97 | 97 | ||
98 | sub do_link_rule | 98 | sub do_link_rule |
99 | { | 99 | { |
100 | local($target,$files,$dep_libs,$libs)=@_; | 100 | local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; |
101 | local($ret,$_); | 101 | local($ret,$_); |
102 | 102 | ||
103 | $file =~ s/\//$o/g if $o ne '/'; | 103 | $file =~ s/\//$o/g if $o ne '/'; |
104 | $n=&bname($targer); | 104 | $n=&bname($targer); |
105 | $ret.="$target: $files $dep_libs\n"; | 105 | $ret.="$target: $files $dep_libs\n"; |
106 | $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; | 106 | $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; |
107 | $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; | 107 | $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; |
108 | if (defined $sha1file) | ||
109 | { | ||
110 | $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; | ||
111 | } | ||
112 | $ret.="\n"; | ||
108 | return($ret); | 113 | return($ret); |
109 | } | 114 | } |
110 | 115 | ||
diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest index 412ca8d6d8..384e683df4 100644 --- a/src/lib/libcrypto/util/pod2mantest +++ b/src/lib/libcrypto/util/pod2mantest | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # This script is used by test/Makefile.ssl to check whether a sane 'pod2man' | 3 | # This script is used by test/Makefile to check whether a sane 'pod2man' |
4 | # is installed. | 4 | # is installed. |
5 | # ('make install' should not try to run 'pod2man' if it does not exist or if | 5 | # ('make install' should not try to run 'pod2man' if it does not exist or if |
6 | # it is a broken 'pod2man' version that is known to cause trouble. if we find | 6 | # it is a broken 'pod2man' version that is known to cause trouble. if we find |
diff --git a/src/lib/libcrypto/util/shlib_wrap.sh b/src/lib/libcrypto/util/shlib_wrap.sh new file mode 100755 index 0000000000..dc5f5b1ce4 --- /dev/null +++ b/src/lib/libcrypto/util/shlib_wrap.sh | |||
@@ -0,0 +1,70 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | [ $# -ne 0 ] || set -x # debug mode without arguments:-) | ||
4 | |||
5 | THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." | ||
6 | [ -d "${THERE}" ] || exec "$@" # should never happen... | ||
7 | |||
8 | # Alternative to this is to parse ${THERE}/Makefile... | ||
9 | LIBCRYPTOSO="${THERE}/libcrypto.so" | ||
10 | if [ -f "$LIBCRYPTOSO" ]; then | ||
11 | while [ -h "$LIBCRYPTOSO" ]; do | ||
12 | LIBCRYPTOSO="${THERE}/`ls -l "$LIBCRYPTOSO" | sed -e 's|.*\-> ||'`" | ||
13 | done | ||
14 | SOSUFFIX=`echo ${LIBCRYPTOSO} | sed -e 's|.*\.so||' 2>/dev/null` | ||
15 | LIBSSLSO="${THERE}/libssl.so${SOSUFFIX}" | ||
16 | fi | ||
17 | |||
18 | SYSNAME=`(uname -s) 2>/dev/null`; | ||
19 | case "$SYSNAME" in | ||
20 | SunOS|IRIX*) | ||
21 | # SunOS and IRIX run-time linkers evaluate alternative | ||
22 | # variables depending on target ABI... | ||
23 | rld_var=LD_LIBRARY_PATH | ||
24 | case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in | ||
25 | *ELF\ 64*SPARC*) | ||
26 | [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64 | ||
27 | ;; | ||
28 | *ELF\ N32*MIPS*) | ||
29 | [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH | ||
30 | _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST | ||
31 | ;; | ||
32 | *ELF\ 64*MIPS*) | ||
33 | [ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH | ||
34 | _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST | ||
35 | ;; | ||
36 | esac | ||
37 | eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var | ||
38 | unset rld_var | ||
39 | ;; | ||
40 | *) LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH" # Linux, ELF HP-UX | ||
41 | DYLD_LIBRARY_PATH="${THERE}:$DYLD_LIBRARY_PATH" # MacOS X | ||
42 | SHLIB_PATH="${THERE}:$SHLIB_PATH" # legacy HP-UX | ||
43 | LIBPATH="${THERE}:$LIBPATH" # AIX, OS/2 | ||
44 | export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH | ||
45 | # Even though $PATH is adjusted [for Windows sake], it doesn't | ||
46 | # necessarily does the trick. Trouble is that with introduction | ||
47 | # of SafeDllSearchMode in XP/2003 it's more appropriate to copy | ||
48 | # .DLLs in vicinity of executable, which is done elsewhere... | ||
49 | if [ "$OSTYPE" != msdosdjgpp ]; then | ||
50 | PATH="${THERE}:$PATH"; export PATH | ||
51 | fi | ||
52 | ;; | ||
53 | esac | ||
54 | |||
55 | if [ -f "$LIBCRYPTOSO" ]; then | ||
56 | # Following three lines are major excuse for isolating them into | ||
57 | # this wrapper script. Original reason for setting LD_PRELOAD | ||
58 | # was to make it possible to pass 'make test' when user linked | ||
59 | # with -rpath pointing to previous version installation. Wrapping | ||
60 | # it into a script makes it possible to do so on multi-ABI | ||
61 | # platforms. | ||
62 | case "$SYSNAME" in | ||
63 | *BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD | ||
64 | *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX | ||
65 | esac | ||
66 | _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX | ||
67 | export LD_PRELOAD _RLD_LIST | ||
68 | fi | ||
69 | |||
70 | exec "$@" | ||