summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2014-12-04 22:37:22 -0600
committerBrent Cook <bcook@openbsd.org>2014-12-06 09:13:56 -0600
commitb3270494f043104b7d63d5b30f47464b5bf253db (patch)
tree92ce7ca11ef5f583bb5524e524e5febab08865e3 /update.sh
parentfc5e43c32b886510660c17ebfb7d78b450ceb2a3 (diff)
downloadportable-b3270494f043104b7d63d5b30f47464b5bf253db.tar.gz
portable-b3270494f043104b7d63d5b30f47464b5bf253db.tar.bz2
portable-b3270494f043104b7d63d5b30f47464b5bf253db.zip
add support for building libtls
Use './configure --enable-libtls' to build the library and install the associated manpages. Note that the API and ABI of this library may change still, though feedback is welcome. ok deraadt@ jsing@ tedu@
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh49
1 files changed, 41 insertions, 8 deletions
diff --git a/update.sh b/update.sh
index 14823f5..bb651a4 100755
--- a/update.sh
+++ b/update.sh
@@ -16,21 +16,26 @@ fi
16 git pull --rebase) 16 git pull --rebase)
17 17
18dir=`pwd` 18dir=`pwd`
19libssl_src=$dir/openbsd/src/lib/libssl
20libssl_regress=$dir/openbsd/src/regress/lib/libssl
21libc_src=$dir/openbsd/src/lib/libc 19libc_src=$dir/openbsd/src/lib/libc
22libc_regress=$dir/openbsd/src/regress/lib/libc 20libc_regress=$dir/openbsd/src/regress/lib/libc
23libcrypto_src=$dir/openbsd/src/lib/libcrypto 21libcrypto_src=$dir/openbsd/src/lib/libcrypto
24openssl_cmd_src=$dir/openbsd/src/usr.bin/openssl
25libcrypto_regress=$dir/openbsd/src/regress/lib/libcrypto 22libcrypto_regress=$dir/openbsd/src/regress/lib/libcrypto
23libssl_src=$dir/openbsd/src/lib/libssl
24libssl_regress=$dir/openbsd/src/regress/lib/libssl
25libtls_src=$dir/openbsd/src/lib/libtls
26openssl_cmd_src=$dir/openbsd/src/usr.bin/openssl
27
28source $libcrypto_src/crypto/shlib_version
29libcrypto_version=$major:$minor:0
30echo "libcrypto version $libcrypto_version"
26 31
27source $libssl_src/ssl/shlib_version 32source $libssl_src/ssl/shlib_version
28libssl_version=$major:$minor:0 33libssl_version=$major:$minor:0
29echo libssl version $libssl_version 34echo "libssl version $libssl_version"
30 35
31source $libcrypto_src/crypto/shlib_version 36source $libtls_src/shlib_version
32libcrypto_version=$major:$minor:0 37libtls_version=$major:$minor:0
33echo libcrypto version $libcrypto_version 38echo "libtls version $libtls_version"
34 39
35CP='cp -p' 40CP='cp -p'
36 41
@@ -63,6 +68,7 @@ $CP $libcrypto_src/crypto/arch/amd64/opensslconf.h include/openssl
63$CP $libssl_src/src/crypto/opensslfeatures.h include/openssl 68$CP $libssl_src/src/crypto/opensslfeatures.h include/openssl
64$CP $libssl_src/src/e_os2.h include/openssl 69$CP $libssl_src/src/e_os2.h include/openssl
65$CP $libssl_src/src/ssl/pqueue.h include 70$CP $libssl_src/src/ssl/pqueue.h include
71$CP $libtls_src/tls.h include
66 72
67for i in explicit_bzero.c strlcpy.c strlcat.c strndup.c strnlen.c \ 73for i in explicit_bzero.c strlcpy.c strlcat.c strndup.c strnlen.c \
68 timingsafe_bcmp.c timingsafe_memcmp.c; do 74 timingsafe_bcmp.c timingsafe_memcmp.c; do
@@ -386,6 +392,23 @@ echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am
386 done 392 done
387) 393)
388 394
395rm -f tls/*.c tls/*.h
396for i in tls_internal.h tls.c tls_server.c tls_client.c tls_util.c \
397 tls_config.c tls_verify.c; do
398 cp $libtls_src/$i tls
399done
400(cd tls
401 sed -e "s/libtls-version/${libtls_version}/" Makefile.am.tpl > Makefile.am
402 echo "if ENABLE_LIBTLS" >> Makefile.am
403 for i in `ls -1 *.c|sort`; do
404 echo "libtls_la_SOURCES += $i" >> Makefile.am
405 done
406 for i in `ls -1 *.h|sort`; do
407 echo "noinst_HEADERS += $i" >> Makefile.am
408 done
409 echo "endif" >> Makefile.am
410)
411
389# do not directly compile C files that are included in other C files 412# do not directly compile C files that are included in other C files
390crypto_excludes=( 413crypto_excludes=(
391 des/ncbc_enc.c 414 des/ncbc_enc.c
@@ -478,6 +501,10 @@ apps_win32_only=(
478 done 501 done
479 $CP $openssl_cmd_src/openssl.1 . 502 $CP $openssl_cmd_src/openssl.1 .
480 echo "dist_man_MANS += openssl.1" >> Makefile.am 503 echo "dist_man_MANS += openssl.1" >> Makefile.am
504 $CP $libtls_src/tls_init.3 .
505 echo "if ENABLE_LIBTLS" >> Makefile.am
506 echo "dist_man_MANS += tls_init.3" >> Makefile.am
507 echo "endif" >> Makefile.am
481 508
482 # convert remaining POD manpages 509 # convert remaining POD manpages
483 for i in `ls -1 $libssl_src/src/doc/crypto/*.pod | sort`; do 510 for i in `ls -1 $libssl_src/src/doc/crypto/*.pod | sort`; do
@@ -494,8 +521,14 @@ apps_win32_only=(
494 521
495 echo "install-data-hook:" >> Makefile.am 522 echo "install-data-hook:" >> Makefile.am
496 source ./links 523 source ./links
497 for i in $MLINKS; do 524 for i in $SSL_MLINKS; do
525 IFS=","; set $i; unset IFS
526 echo " ln -f \$(DESTDIR)\$(mandir)/man3/$1 \$(DESTDIR)\$(mandir)/man3/$2" >> Makefile.am
527 done
528 echo "if ENABLE_LIBTLS" >> Makefile.am
529 for i in $TLS_MLINKS; do
498 IFS=","; set $i; unset IFS 530 IFS=","; set $i; unset IFS
499 echo " ln -f \$(DESTDIR)\$(mandir)/man3/$1 \$(DESTDIR)\$(mandir)/man3/$2" >> Makefile.am 531 echo " ln -f \$(DESTDIR)\$(mandir)/man3/$1 \$(DESTDIR)\$(mandir)/man3/$2" >> Makefile.am
500 done 532 done
533 echo "endif" >> Makefile.am
501) 534)