aboutsummaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh38
1 files changed, 22 insertions, 16 deletions
diff --git a/update.sh b/update.sh
index 9636ee7..e8b0566 100755
--- a/update.sh
+++ b/update.sh
@@ -1,4 +1,19 @@
1#!/bin/sh 1#!/bin/sh
2#
3# Copyright (c) 2014 Brent Cook
4#
5# Permission to use, copy, modify, and distribute this software for any
6# purpose with or without fee is hereby granted, provided that the above
7# copyright notice and this permission notice appear in all copies.
8#
9# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
2set -e 17set -e
3 18
4openbsd_branch=`cat OPENBSD_BRANCH` 19openbsd_branch=`cat OPENBSD_BRANCH`
@@ -83,8 +98,6 @@ if [ -x /opt/csw/bin/ggrep ]; then
83 GREP='/opt/csw/bin/ggrep' 98 GREP='/opt/csw/bin/ggrep'
84fi 99fi
85 100
86$CP $libssl_src/LICENSE COPYING
87
88$CP $libcrypto_src/opensslfeatures.h include/openssl 101$CP $libcrypto_src/opensslfeatures.h include/openssl
89$CP $libssl_src/pqueue.h include 102$CP $libssl_src/pqueue.h include
90 103
@@ -166,6 +179,11 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do
166 fi 179 fi
167done 180done
168 181
182for arch in amd64 i386; do
183 $CP $libcrypto_src/aes/aes_${arch}.c crypto/aes/
184 $CP $libcrypto_src/modes/gcm128_${arch}.c crypto/modes/
185done
186
169for i in $libcrypto_src/arch/*; do 187for i in $libcrypto_src/arch/*; do
170 arch=`basename $i` 188 arch=`basename $i`
171 mkdir -p include/arch/$arch 189 mkdir -p include/arch/$arch
@@ -210,6 +228,7 @@ gen_asm_stdout() {
210 EOF 228 EOF
211 if [ $1 = "masm" ]; then 229 if [ $1 = "masm" ]; then
212 fixup_masm crypto/$3.tmp crypto/$3 230 fixup_masm crypto/$3.tmp crypto/$3
231 rm crypto/$3.tmp
213 else 232 else
214 $MV crypto/$3.tmp crypto/$3 233 $MV crypto/$3.tmp crypto/$3
215 fi 234 fi
@@ -238,6 +257,7 @@ gen_asm() {
238 EOF 257 EOF
239 if [ $1 = "masm" ]; then 258 if [ $1 = "masm" ]; then
240 fixup_masm crypto/$3.tmp crypto/$3 259 fixup_masm crypto/$3.tmp crypto/$3
260 rm crypto/$3.tmp
241 else 261 else
242 $MV crypto/$3.tmp crypto/$3 262 $MV crypto/$3.tmp crypto/$3
243 fi 263 fi
@@ -259,23 +279,10 @@ gen_asm_mips 64 sha sha1-mips sha1-mips64
259gen_asm_mips 64 sha sha512-mips sha256-mips64 279gen_asm_mips 64 sha sha512-mips sha256-mips64
260gen_asm_mips 64 sha sha512-mips sha512-mips64 280gen_asm_mips 64 sha sha512-mips sha512-mips64
261 281
262echo generating arm ASM source for elf
263gen_asm_stdout elf aes/asm/aes-armv4.pl aes/aes-elf-armv4.S
264gen_asm_stdout elf bn/asm/armv4-mont.pl bn/mont-elf-armv4.S
265gen_asm_stdout elf sha/asm/sha1-armv4-large.pl sha/sha1-elf-armv4.S
266gen_asm_stdout elf sha/asm/sha256-armv4.pl sha/sha256-elf-armv4.S
267gen_asm_stdout elf sha/asm/sha512-armv4.pl sha/sha512-elf-armv4.S
268gen_asm_stdout elf modes/asm/ghash-armv4.pl modes/ghash-elf-armv4.S
269$CP $libcrypto_src/arch/arm/armv4cpuid.S crypto
270$CP $libcrypto_src/arch/arm/armcap.c crypto
271$CP $libcrypto_src/arch/arm/arm_arch.h crypto
272
273for abi in elf macosx masm mingw64; do 282for abi in elf macosx masm mingw64; do
274 echo generating x86_64 ASM source for $abi 283 echo generating x86_64 ASM source for $abi
275 284
276 gen_asm_stdout $abi aes/asm/aes-x86_64.pl aes/aes-$abi-x86_64.S 285 gen_asm_stdout $abi aes/asm/aes-x86_64.pl aes/aes-$abi-x86_64.S
277 gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl aes/vpaes-$abi-x86_64.S
278 gen_asm_stdout $abi aes/asm/bsaes-x86_64.pl aes/bsaes-$abi-x86_64.S
279 gen_asm_stdout $abi aes/asm/aesni-x86_64.pl aes/aesni-$abi-x86_64.S 286 gen_asm_stdout $abi aes/asm/aesni-x86_64.pl aes/aesni-$abi-x86_64.S
280 gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl bn/modexp512-$abi-x86_64.S 287 gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl bn/modexp512-$abi-x86_64.S
281 gen_asm_stdout $abi bn/asm/x86_64-mont.pl bn/mont-$abi-x86_64.S 288 gen_asm_stdout $abi bn/asm/x86_64-mont.pl bn/mont-$abi-x86_64.S
@@ -376,7 +383,6 @@ done
376$CP $libssl_regress/unit/tests.h tests 383$CP $libssl_regress/unit/tests.h tests
377$CP $libssl_regress/certs/*.pem tests 384$CP $libssl_regress/certs/*.pem tests
378$CP $libssl_regress/certs/*.crl tests 385$CP $libssl_regress/certs/*.crl tests
379$CP $libssl_regress/pqueue/expected.txt tests/pq_expected.txt
380 386
381# copy libtls tests 387# copy libtls tests
382for i in `find $libtls_regress -name '*.c'`; do 388for i in `find $libtls_regress -name '*.c'`; do