aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--configure.ac45
-rw-r--r--crypto/Makefile.am28
-rw-r--r--crypto/Makefile.am.elf-x86_6441
-rw-r--r--crypto/Makefile.am.macosx-x86_6441
-rwxr-xr-xupdate.sh34
6 files changed, 168 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index 03ff4da..e964021 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,10 @@
9# C stuff 9# C stuff
10*.o 10*.o
11 11
12# Assembly stuff
13*.S
14*.s
15
12# Windows stuff 16# Windows stuff
13*.obj 17*.obj
14*.exe 18*.exe
diff --git a/configure.ac b/configure.ac
index 2cc7477..4b3d209 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,22 +14,21 @@ CFLAGS="$CFLAGS -Wall -std=gnu99 -g"
14 14
15case $host_os in 15case $host_os in
16 *darwin*) 16 *darwin*)
17 HOST_OS=darwin; 17 HOST_OS=darwin
18 HOST_ABI=macosx
18 ;; 19 ;;
19 *freebsd*) 20 *freebsd*)
20 HOST_OS=freebsd; 21 HOST_OS=freebsd
22 HOST_ABI=elf
21 AC_SUBST([PROG_LDADD], ['-lthr']) 23 AC_SUBST([PROG_LDADD], ['-lthr'])
22 ;; 24 ;;
23 *linux*) 25 *linux*)
24 HOST_OS=linux; 26 HOST_OS=linux
27 HOST_ABI=elf
25 CFLAGS="$CFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE" 28 CFLAGS="$CFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE"
26 ;; 29 ;;
27 *solaris*)
28 HOST_OS=solaris;
29 CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP"
30 AC_SUBST([PLATFORM_LDADD], ['-lnsl -lsocket'])
31 ;;
32 *openbsd*) 30 *openbsd*)
31 HOST_ABI=elf
33 AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has bounded]) 32 AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has bounded])
34 ;; 33 ;;
35 *mingw*) 34 *mingw*)
@@ -37,14 +36,20 @@ case $host_os in
37 CFLAGS="$CFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600 -DOPENSSL_NO_SPEED -D__USE_MINGW_ANSI_STDIO" 36 CFLAGS="$CFLAGS -D_GNU_SOURCE -D_POSIX -D_POSIX_SOURCE -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600 -DOPENSSL_NO_SPEED -D__USE_MINGW_ANSI_STDIO"
38 AC_SUBST([PLATFORM_LDADD], ['-lws2_32']) 37 AC_SUBST([PLATFORM_LDADD], ['-lws2_32'])
39 ;; 38 ;;
39 *solaris*)
40 HOST_OS=solaris
41 HOST_ABI=elf
42 CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP"
43 AC_SUBST([PLATFORM_LDADD], ['-lnsl -lsocket'])
44 ;;
40 *) ;; 45 *) ;;
41esac 46esac
42 47
43AM_CONDITIONAL(HOST_DARWIN, test x$HOST_OS = xdarwin) 48AM_CONDITIONAL([HOST_DARWIN], [test x$HOST_OS = xdarwin])
44AM_CONDITIONAL(HOST_FREEBSD, test x$HOST_OS = xfreebsd) 49AM_CONDITIONAL([HOST_FREEBSD], [test x$HOST_OS = xfreebsd])
45AM_CONDITIONAL(HOST_LINUX, test x$HOST_OS = xlinux) 50AM_CONDITIONAL([HOST_LINUX], [test x$HOST_OS = xlinux])
46AM_CONDITIONAL(HOST_SOLARIS, test x$HOST_OS = xsolaris) 51AM_CONDITIONAL([HOST_SOLARIS], [test x$HOST_OS = xsolaris])
47AM_CONDITIONAL(HOST_WIN, test x$HOST_OS = xwin) 52AM_CONDITIONAL([HOST_WIN], [test x$HOST_OS = xwin])
48 53
49AC_CHECK_FUNC([clock_gettime],, 54AC_CHECK_FUNC([clock_gettime],,
50 [AC_SEARCH_LIBS([clock_gettime],[rt posix4])]) 55 [AC_SEARCH_LIBS([clock_gettime],[rt posix4])])
@@ -52,6 +57,7 @@ AC_CHECK_FUNC([clock_gettime],,
52AC_CHECK_FUNC([dl_iterate_phdr],, 57AC_CHECK_FUNC([dl_iterate_phdr],,
53 [AC_SEARCH_LIBS([dl_iterate_phdr],[dl])]) 58 [AC_SEARCH_LIBS([dl_iterate_phdr],[dl])])
54 59
60AM_PROG_AS
55AC_PROG_CC 61AC_PROG_CC
56AC_PROG_LIBTOOL 62AC_PROG_LIBTOOL
57AC_PROG_CC_STDC 63AC_PROG_CC_STDC
@@ -134,18 +140,25 @@ fi
134AC_CHECK_HEADERS([sys/sysctl.h err.h]) 140AC_CHECK_HEADERS([sys/sysctl.h err.h])
135 141
136AC_ARG_WITH([openssldir], 142AC_ARG_WITH([openssldir],
137 AS_HELP_STRING([--with-openssldir], [Set the default openssl directory]), 143 AS_HELP_STRING([--with-openssldir],
144 [Set the default openssl directory]),
138 AC_DEFINE_UNQUOTED(OPENSSLDIR, "$withval") 145 AC_DEFINE_UNQUOTED(OPENSSLDIR, "$withval")
139) 146)
140 147
141AC_ARG_WITH([enginesdir], 148AC_ARG_WITH([enginesdir],
142 AS_HELP_STRING([--with-enginesdir], [Set the default engines directory (use with openssldir)]), 149 AS_HELP_STRING([--with-enginesdir],
150 [Set the default engines directory (use with openssldir)]),
143 AC_DEFINE_UNQUOTED(ENGINESDIR, "$withval") 151 AC_DEFINE_UNQUOTED(ENGINESDIR, "$withval")
144) 152)
145 153
146AC_ARG_ENABLE([asm], 154AC_ARG_ENABLE([asm],
147 AS_HELP_STRING([--disable-asm], [Disable assembly])) 155 AS_HELP_STRING([--disable-asm], [Disable assembly]))
148AS_IF([test "x$enable_asm" = "xno"], [CFLAGS="$CFLAGS -DOPENSSL_NO_ASM"]) 156AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"])
157
158AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
159 [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
160AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],
161 [test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
149 162
150AC_ARG_ENABLE([libtls], 163AC_ARG_ENABLE([libtls],
151 AS_HELP_STRING([--enable-libtls], [Enable building the libtls library])) 164 AS_HELP_STRING([--enable-libtls], [Enable building the libtls library]))
diff --git a/crypto/Makefile.am b/crypto/Makefile.am
index 39b143d..91c58db 100644
--- a/crypto/Makefile.am
+++ b/crypto/Makefile.am
@@ -10,7 +10,11 @@ EXTRA_DIST = VERSION
10 10
11libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ 11libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@
12libcrypto_la_LIBADD = libcompat.la libcompatnoopt.la 12libcrypto_la_LIBADD = libcompat.la libcompatnoopt.la
13libcrypto_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) -DOPENSSL_NO_HW_PADLOCK 13libcrypto_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS)
14libcrypto_la_CFLAGS += -DOPENSSL_NO_HW_PADLOCK
15if OPENSSL_NO_ASM
16libcrypto_la_CFLAGS += -DOPENSSL_NO_ASM
17endif
14 18
15noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la 19noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la
16 20
@@ -103,6 +107,21 @@ noinst_HEADERS += compat/chacha_private.h
103libcrypto_la_SOURCES = 107libcrypto_la_SOURCES =
104EXTRA_libcrypto_la_SOURCES = 108EXTRA_libcrypto_la_SOURCES =
105 109
110include Makefile.am.elf-x86_64
111include Makefile.am.macosx-x86_64
112
113if !HOST_ASM_ELF_X86_64
114if !HOST_ASM_MACOSX_X86_64
115libcrypto_la_SOURCES += aes/aes_cbc.c
116libcrypto_la_SOURCES += aes/aes_core.c
117libcrypto_la_SOURCES += camellia/camellia.c
118libcrypto_la_SOURCES += camellia/cmll_cbc.c
119libcrypto_la_SOURCES += rc4/rc4_enc.c
120libcrypto_la_SOURCES += rc4/rc4_skey.c
121libcrypto_la_SOURCES += whrlpool/wp_block.c
122endif
123endif
124
106libcrypto_la_SOURCES += cpt_err.c 125libcrypto_la_SOURCES += cpt_err.c
107libcrypto_la_SOURCES += cryptlib.c 126libcrypto_la_SOURCES += cryptlib.c
108libcrypto_la_SOURCES += cversion.c 127libcrypto_la_SOURCES += cversion.c
@@ -118,9 +137,7 @@ noinst_HEADERS += md32_common.h
118noinst_HEADERS += o_time.h 137noinst_HEADERS += o_time.h
119 138
120# aes 139# aes
121libcrypto_la_SOURCES += aes/aes_cbc.c
122libcrypto_la_SOURCES += aes/aes_cfb.c 140libcrypto_la_SOURCES += aes/aes_cfb.c
123libcrypto_la_SOURCES += aes/aes_core.c
124libcrypto_la_SOURCES += aes/aes_ctr.c 141libcrypto_la_SOURCES += aes/aes_ctr.c
125libcrypto_la_SOURCES += aes/aes_ecb.c 142libcrypto_la_SOURCES += aes/aes_ecb.c
126libcrypto_la_SOURCES += aes/aes_ige.c 143libcrypto_la_SOURCES += aes/aes_ige.c
@@ -284,8 +301,6 @@ libcrypto_la_SOURCES += buffer/buf_str.c
284libcrypto_la_SOURCES += buffer/buffer.c 301libcrypto_la_SOURCES += buffer/buffer.c
285 302
286# camellia 303# camellia
287libcrypto_la_SOURCES += camellia/camellia.c
288libcrypto_la_SOURCES += camellia/cmll_cbc.c
289libcrypto_la_SOURCES += camellia/cmll_cfb.c 304libcrypto_la_SOURCES += camellia/cmll_cfb.c
290libcrypto_la_SOURCES += camellia/cmll_ctr.c 305libcrypto_la_SOURCES += camellia/cmll_ctr.c
291libcrypto_la_SOURCES += camellia/cmll_ecb.c 306libcrypto_la_SOURCES += camellia/cmll_ecb.c
@@ -666,8 +681,6 @@ libcrypto_la_SOURCES += rc2/rc2ofb64.c
666noinst_HEADERS += rc2/rc2_locl.h 681noinst_HEADERS += rc2/rc2_locl.h
667 682
668# rc4 683# rc4
669libcrypto_la_SOURCES += rc4/rc4_enc.c
670libcrypto_la_SOURCES += rc4/rc4_skey.c
671noinst_HEADERS += rc4/rc4_locl.h 684noinst_HEADERS += rc4/rc4_locl.h
672 685
673# ripemd 686# ripemd
@@ -739,7 +752,6 @@ libcrypto_la_SOURCES += ui/ui_util.c
739noinst_HEADERS += ui/ui_locl.h 752noinst_HEADERS += ui/ui_locl.h
740 753
741# whrlpool 754# whrlpool
742libcrypto_la_SOURCES += whrlpool/wp_block.c
743libcrypto_la_SOURCES += whrlpool/wp_dgst.c 755libcrypto_la_SOURCES += whrlpool/wp_dgst.c
744noinst_HEADERS += whrlpool/wp_locl.h 756noinst_HEADERS += whrlpool/wp_locl.h
745 757
diff --git a/crypto/Makefile.am.elf-x86_64 b/crypto/Makefile.am.elf-x86_64
new file mode 100644
index 0000000..6257c40
--- /dev/null
+++ b/crypto/Makefile.am.elf-x86_64
@@ -0,0 +1,41 @@
1
2ASM_X86_64_ELF = aes/aes-elf-x86_64.s
3ASM_X86_64_ELF += aes/bsaes-elf-x86_64.s
4ASM_X86_64_ELF += aes/vpaes-elf-x86_64.s
5ASM_X86_64_ELF += aes/aesni-elf-x86_64.s
6ASM_X86_64_ELF += aes/aesni-sha1-elf-x86_64.s
7ASM_X86_64_ELF += bn/modexp512-elf-x86_64.s
8ASM_X86_64_ELF += bn/mont-elf-x86_64.s
9ASM_X86_64_ELF += bn/mont5-elf-x86_64.s
10ASM_X86_64_ELF += bn/gf2m-elf-x86_64.s
11ASM_X86_64_ELF += camellia/cmll-elf-x86_64.s
12ASM_X86_64_ELF += md5/md5-elf-x86_64.s
13ASM_X86_64_ELF += modes/ghash-elf-x86_64.s
14ASM_X86_64_ELF += rc4/rc4-elf-x86_64.s
15ASM_X86_64_ELF += rc4/rc4-md5-elf-x86_64.s
16ASM_X86_64_ELF += sha/sha1-elf-x86_64.s
17ASM_X86_64_ELF += sha/sha256-elf-x86_64.S
18ASM_X86_64_ELF += sha/sha512-elf-x86_64.S
19ASM_X86_64_ELF += whrlpool/wp-elf-x86_64.s
20ASM_X86_64_ELF += cpuid-elf-x86_64.S
21
22EXTRA_DIST += $(ASM_X86_64_ELF)
23
24if HOST_ASM_ELF_X86_64
25libcrypto_la_CFLAGS += -DAES_ASM
26libcrypto_la_CFLAGS += -DBSAES_ASM
27libcrypto_la_CFLAGS += -DVPAES_ASM
28libcrypto_la_CFLAGS += -DOPENSSL_IA32_SSE2
29libcrypto_la_CFLAGS += -DOPENSSL_BN_ASM_MONT
30libcrypto_la_CFLAGS += -DOPENSSL_BN_ASM_MONT5
31libcrypto_la_CFLAGS += -DOPENSSL_BN_ASM_GF2m
32libcrypto_la_CFLAGS += -DMD5_ASM
33libcrypto_la_CFLAGS += -DGHASH_ASM
34libcrypto_la_CFLAGS += -DRSA_ASM
35libcrypto_la_CFLAGS += -DSHA1_ASM
36libcrypto_la_CFLAGS += -DSHA256_ASM
37libcrypto_la_CFLAGS += -DSHA512_ASM
38libcrypto_la_CFLAGS += -DWHIRLPOOL_ASM
39libcrypto_la_CFLAGS += -DOPENSSL_CPUID_OBJ
40libcrypto_la_SOURCES += $(ASM_X86_64_ELF)
41endif
diff --git a/crypto/Makefile.am.macosx-x86_64 b/crypto/Makefile.am.macosx-x86_64
new file mode 100644
index 0000000..e361aae
--- /dev/null
+++ b/crypto/Makefile.am.macosx-x86_64
@@ -0,0 +1,41 @@
1
2ASM_X86_64_MACOSX = aes/aes-macosx-x86_64.s
3ASM_X86_64_MACOSX += aes/bsaes-macosx-x86_64.s
4ASM_X86_64_MACOSX += aes/vpaes-macosx-x86_64.s
5ASM_X86_64_MACOSX += aes/aesni-macosx-x86_64.s
6ASM_X86_64_MACOSX += aes/aesni-sha1-macosx-x86_64.s
7ASM_X86_64_MACOSX += bn/modexp512-macosx-x86_64.s
8ASM_X86_64_MACOSX += bn/mont-macosx-x86_64.s
9ASM_X86_64_MACOSX += bn/mont5-macosx-x86_64.s
10ASM_X86_64_MACOSX += bn/gf2m-macosx-x86_64.s
11ASM_X86_64_MACOSX += camellia/cmll-macosx-x86_64.s
12ASM_X86_64_MACOSX += md5/md5-macosx-x86_64.s
13ASM_X86_64_MACOSX += modes/ghash-macosx-x86_64.s
14ASM_X86_64_MACOSX += rc4/rc4-macosx-x86_64.s
15ASM_X86_64_MACOSX += rc4/rc4-md5-macosx-x86_64.s
16ASM_X86_64_MACOSX += sha/sha1-macosx-x86_64.s
17ASM_X86_64_MACOSX += sha/sha256-macosx-x86_64.S
18ASM_X86_64_MACOSX += sha/sha512-macosx-x86_64.S
19ASM_X86_64_MACOSX += whrlpool/wp-macosx-x86_64.s
20ASM_X86_64_MACOSX += cpuid-macosx-x86_64.S
21
22EXTRA_DIST += $(ASM_X86_64_MACOSX)
23
24if HOST_ASM_MACOSX_X86_64
25libcrypto_la_CFLAGS += -DAES_ASM
26libcrypto_la_CFLAGS += -DBSAES_ASM
27libcrypto_la_CFLAGS += -DVPAES_ASM
28libcrypto_la_CFLAGS += -DOPENSSL_IA32_SSE2
29libcrypto_la_CFLAGS += -DOPENSSL_BN_ASM_MONT
30libcrypto_la_CFLAGS += -DOPENSSL_BN_ASM_MONT5
31libcrypto_la_CFLAGS += -DOPENSSL_BN_ASM_GF2m
32libcrypto_la_CFLAGS += -DMD5_ASM
33libcrypto_la_CFLAGS += -DGHASH_ASM
34libcrypto_la_CFLAGS += -DRSA_ASM
35libcrypto_la_CFLAGS += -DSHA1_ASM
36libcrypto_la_CFLAGS += -DSHA256_ASM
37libcrypto_la_CFLAGS += -DSHA512_ASM
38libcrypto_la_CFLAGS += -DWHIRLPOOL_ASM
39libcrypto_la_CFLAGS += -DOPENSSL_CPUID_OBJ
40libcrypto_la_SOURCES += $(ASM_X86_64_MACOSX)
41endif
diff --git a/update.sh b/update.sh
index 47e2e22..348616f 100755
--- a/update.sh
+++ b/update.sh
@@ -5,6 +5,7 @@ openbsd_branch=`cat OPENBSD_BRANCH`
5libressl_version=`cat VERSION` 5libressl_version=`cat VERSION`
6 6
7# pull in latest upstream code 7# pull in latest upstream code
8echo "pulling upstream openbsd source"
8if [ ! -d openbsd ]; then 9if [ ! -d openbsd ]; then
9 if [ -z "$LIBRESSL_GIT" ]; then 10 if [ -z "$LIBRESSL_GIT" ]; then
10 git clone https://github.com/libressl-portable/openbsd.git 11 git clone https://github.com/libressl-portable/openbsd.git
@@ -16,7 +17,7 @@ fi
16 git checkout $openbsd_branch 17 git checkout $openbsd_branch
17 git pull --rebase) 18 git pull --rebase)
18 19
19# setup source paths 20# setup source paths
20dir=`pwd` 21dir=`pwd`
21libc_src=$dir/openbsd/src/lib/libc 22libc_src=$dir/openbsd/src/lib/libc
22libc_regress=$dir/openbsd/src/regress/lib/libc 23libc_regress=$dir/openbsd/src/regress/lib/libc
@@ -93,6 +94,7 @@ copy_hdrs crypto "stack/stack.h lhash/lhash.h stack/safestack.h opensslv.h
93copy_hdrs ssl "srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h" 94copy_hdrs ssl "srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h"
94 95
95# copy libcrypto source 96# copy libcrypto source
97echo copying libcrypto source
96rm -f crypto/*.c crypto/*.h 98rm -f crypto/*.c crypto/*.h
97for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do 99for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do
98 dir=`dirname $i` 100 dir=`dirname $i`
@@ -106,13 +108,40 @@ done
106$CP crypto/compat/b_win.c crypto/bio 108$CP crypto/compat/b_win.c crypto/bio
107$CP crypto/compat/ui_openssl_win.c crypto/ui 109$CP crypto/compat/ui_openssl_win.c crypto/ui
108 110
111# generate assembly crypto algorithms
112asm_src=$libssl_src/src/crypto
113for abi in elf macosx; do
114 echo generating ASM source for $abi
115 perl $asm_src/aes/asm/aes-x86_64.pl $abi > crypto/aes/aes-${abi}-x86_64.s
116 perl $asm_src/aes/asm/vpaes-x86_64.pl $abi > crypto/aes/vpaes-${abi}-x86_64.s
117 perl $asm_src/aes/asm/bsaes-x86_64.pl $abi > crypto/aes/bsaes-${abi}-x86_64.s
118 perl $asm_src/aes/asm/aesni-x86_64.pl $abi > crypto/aes/aesni-${abi}-x86_64.s
119 perl $asm_src/aes/asm/aesni-sha1-x86_64.pl $abi > crypto/aes/aesni-sha1-${abi}-x86_64.s
120 perl $asm_src/bn/asm/modexp512-x86_64.pl $abi > crypto/bn/modexp512-${abi}-x86_64.s
121 perl $asm_src/bn/asm/x86_64-mont.pl $abi > crypto/bn/mont-${abi}-x86_64.s
122 perl $asm_src/bn/asm/x86_64-mont5.pl $abi > crypto/bn/mont5-${abi}-x86_64.s
123 perl $asm_src/bn/asm/x86_64-gf2m.pl $abi > crypto/bn/gf2m-${abi}-x86_64.s
124 perl $asm_src/camellia/asm/cmll-x86_64.pl $abi > crypto/camellia/cmll-${abi}-x86_64.s
125 perl $asm_src/md5/asm/md5-x86_64.pl $abi > crypto/md5/md5-${abi}-x86_64.s
126 perl $asm_src/modes/asm/ghash-x86_64.pl $abi > crypto/modes/ghash-${abi}-x86_64.s
127 perl $asm_src/rc4/asm/rc4-x86_64.pl $abi > crypto/rc4/rc4-${abi}-x86_64.s
128 perl $asm_src/rc4/asm/rc4-md5-x86_64.pl $abi > crypto/rc4/rc4-md5-${abi}-x86_64.s
129 perl $asm_src/sha/asm/sha1-x86_64.pl $abi > crypto/sha/sha1-${abi}-x86_64.s
130 perl $asm_src/sha/asm/sha512-x86_64.pl $abi crypto/sha/sha256-${abi}-x86_64.S
131 perl $asm_src/sha/asm/sha512-x86_64.pl $abi crypto/sha/sha512-${abi}-x86_64.S
132 perl $asm_src/whrlpool/asm/wp-x86_64.pl $abi > crypto/whrlpool/wp-${abi}-x86_64.s
133 perl $asm_src/x86_64cpuid.pl $abi crypto/cpuid-${abi}-x86_64.S
134done
135
109# copy libtls source 136# copy libtls source
137echo copying libtls source
110rm -f tls/*.c tls/*.h 138rm -f tls/*.c tls/*.h
111for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do 139for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do
112 cp $libtls_src/$i tls 140 cp $libtls_src/$i tls
113done 141done
114 142
115# copy openssl(1) source 143# copy openssl(1) source
144echo "copying openssl(1) source"
116$CP $libc_src/stdlib/strtonum.c apps 145$CP $libc_src/stdlib/strtonum.c apps
117$CP $libcrypto_src/openssl.cnf apps 146$CP $libcrypto_src/openssl.cnf apps
118for i in `awk '/SOURCES|HEADERS/ { print $3 }' apps/Makefile.am` ; do 147for i in `awk '/SOURCES|HEADERS/ { print $3 }' apps/Makefile.am` ; do
@@ -122,12 +151,14 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' apps/Makefile.am` ; do
122done 151done
123 152
124# copy libssl source 153# copy libssl source
154echo "copying libssl source"
125rm -f ssl/*.c ssl/*.h 155rm -f ssl/*.c ssl/*.h
126for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do 156for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do
127 cp $libssl_src/src/ssl/$i ssl 157 cp $libssl_src/src/ssl/$i ssl
128done 158done
129 159
130# copy libcrypto tests 160# copy libcrypto tests
161echo "copying tests"
131rm -f tests/biotest.c 162rm -f tests/biotest.c
132for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \ 163for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \
133 bn/general/bntest.c bn/mont/mont.c \ 164 bn/general/bntest.c bn/mont/mont.c \
@@ -223,6 +254,7 @@ echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am
223 done 254 done
224) 255)
225 256
257echo "copying manpages"
226# copy manpages 258# copy manpages
227(cd man 259(cd man
228 $CP Makefile.am.tpl Makefile.am 260 $CP Makefile.am.tpl Makefile.am