diff options
author | Brent Cook <bcook@openbsd.org> | 2014-12-04 22:37:22 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-12-06 09:13:56 -0600 |
commit | b3270494f043104b7d63d5b30f47464b5bf253db (patch) | |
tree | 92ce7ca11ef5f583bb5524e524e5febab08865e3 /update.sh | |
parent | fc5e43c32b886510660c17ebfb7d78b450ceb2a3 (diff) | |
download | portable-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-x | update.sh | 49 |
1 files changed, 41 insertions, 8 deletions
@@ -16,21 +16,26 @@ fi | |||
16 | git pull --rebase) | 16 | git pull --rebase) |
17 | 17 | ||
18 | dir=`pwd` | 18 | dir=`pwd` |
19 | libssl_src=$dir/openbsd/src/lib/libssl | ||
20 | libssl_regress=$dir/openbsd/src/regress/lib/libssl | ||
21 | libc_src=$dir/openbsd/src/lib/libc | 19 | libc_src=$dir/openbsd/src/lib/libc |
22 | libc_regress=$dir/openbsd/src/regress/lib/libc | 20 | libc_regress=$dir/openbsd/src/regress/lib/libc |
23 | libcrypto_src=$dir/openbsd/src/lib/libcrypto | 21 | libcrypto_src=$dir/openbsd/src/lib/libcrypto |
24 | openssl_cmd_src=$dir/openbsd/src/usr.bin/openssl | ||
25 | libcrypto_regress=$dir/openbsd/src/regress/lib/libcrypto | 22 | libcrypto_regress=$dir/openbsd/src/regress/lib/libcrypto |
23 | libssl_src=$dir/openbsd/src/lib/libssl | ||
24 | libssl_regress=$dir/openbsd/src/regress/lib/libssl | ||
25 | libtls_src=$dir/openbsd/src/lib/libtls | ||
26 | openssl_cmd_src=$dir/openbsd/src/usr.bin/openssl | ||
27 | |||
28 | source $libcrypto_src/crypto/shlib_version | ||
29 | libcrypto_version=$major:$minor:0 | ||
30 | echo "libcrypto version $libcrypto_version" | ||
26 | 31 | ||
27 | source $libssl_src/ssl/shlib_version | 32 | source $libssl_src/ssl/shlib_version |
28 | libssl_version=$major:$minor:0 | 33 | libssl_version=$major:$minor:0 |
29 | echo libssl version $libssl_version | 34 | echo "libssl version $libssl_version" |
30 | 35 | ||
31 | source $libcrypto_src/crypto/shlib_version | 36 | source $libtls_src/shlib_version |
32 | libcrypto_version=$major:$minor:0 | 37 | libtls_version=$major:$minor:0 |
33 | echo libcrypto version $libcrypto_version | 38 | echo "libtls version $libtls_version" |
34 | 39 | ||
35 | CP='cp -p' | 40 | CP='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 | ||
67 | for i in explicit_bzero.c strlcpy.c strlcat.c strndup.c strnlen.c \ | 73 | for 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 | ||
395 | rm -f tls/*.c tls/*.h | ||
396 | for 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 | ||
399 | done | ||
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 |
390 | crypto_excludes=( | 413 | crypto_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 | ) |