aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
-rw-r--r--Makefile.am33
-rw-r--r--apps/ocspcheck/Makefile.am5
-rw-r--r--apps/openssl/CMakeLists.txt10
-rw-r--r--apps/openssl/Makefile.am36
-rw-r--r--configure.ac23
-rw-r--r--crypto/Makefile.am8
-rw-r--r--include/openssl/Makefile.am.tpl1
-rw-r--r--m4/check-os-options.m418
-rw-r--r--ssl/Makefile.am4
-rwxr-xr-xupdate.sh10
11 files changed, 91 insertions, 68 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eca97b3..4183499 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -368,6 +368,17 @@ if(NOT MSVC)
368 DESTINATION ${CMAKE_INSTALL_LIBDIR}) 368 DESTINATION ${CMAKE_INSTALL_LIBDIR})
369endif() 369endif()
370 370
371if(NOT "${OPENSSLDIR}" STREQUAL "")
372 set(CONF_DIR "${OPENSSLDIR}")
373else()
374 set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl")
375endif()
376
377if(ENABLE_LIBRESSL_INSTALL)
378 install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR})
379 install(DIRECTORY DESTINATION ${CONF_DIR}/certs)
380endif(ENABLE_LIBRESSL_INSTALL)
381
371if(NOT TARGET uninstall) 382if(NOT TARGET uninstall)
372 configure_file( 383 configure_file(
373 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" 384 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
diff --git a/Makefile.am b/Makefile.am
index 6499f07..ed59df0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,10 +5,41 @@ endif
5ACLOCAL_AMFLAGS = -I m4 5ACLOCAL_AMFLAGS = -I m4
6 6
7pkgconfigdir = $(libdir)/pkgconfig 7pkgconfigdir = $(libdir)/pkgconfig
8pkgconfig_DATA = libcrypto.pc libssl.pc libtls.pc openssl.pc 8pkgconfig_DATA = libtls.pc
9if !ENABLE_LIBTLS_ONLY
10pkgconfig_DATA += libcrypto.pc libssl.pc openssl.pc
11endif
9 12
10EXTRA_DIST = README.md README.windows VERSION config scripts 13EXTRA_DIST = README.md README.windows VERSION config scripts
11EXTRA_DIST += CMakeLists.txt cmake_export_symbol.cmake cmake_uninstall.cmake.in FindLibreSSL.cmake 14EXTRA_DIST += CMakeLists.txt cmake_export_symbol.cmake cmake_uninstall.cmake.in FindLibreSSL.cmake
15EXTRA_DIST += cert.pem openssl.cnf x509v3.cnf
12 16
13.PHONY: install_sw 17.PHONY: install_sw
14install_sw: install 18install_sw: install
19
20install-exec-hook:
21 @if [ "@OPENSSLDIR@x" != "x" ]; then \
22 OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
23 else \
24 OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
25 fi; \
26 mkdir -p "$$OPENSSLDIR/certs"; \
27 for i in cert.pem openssl.cnf x509v3.cnf; do \
28 if [ ! -f "$$OPENSSLDIR/$i" ]; then \
29 $(INSTALL) -m 644 "$(srcdir)/$$i" "$$OPENSSLDIR/$$i"; \
30 else \
31 echo " $$OPENSSLDIR/$$i already exists, install will not overwrite"; \
32 fi \
33 done
34
35uninstall-local:
36 @if [ "@OPENSSLDIR@x" != "x" ]; then \
37 OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
38 else \
39 OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
40 fi; \
41 for i in cert.pem openssl.cnf x509v3.cnf; do \
42 if cmp -s "$$OPENSSLDIR/$$i" "$(srcdir)/$$i"; then \
43 rm -f "$$OPENSSLDIR/$$i"; \
44 fi \
45 done
diff --git a/apps/ocspcheck/Makefile.am b/apps/ocspcheck/Makefile.am
index e3f7971..71a73ea 100644
--- a/apps/ocspcheck/Makefile.am
+++ b/apps/ocspcheck/Makefile.am
@@ -1,8 +1,11 @@
1include $(top_srcdir)/Makefile.am.common 1include $(top_srcdir)/Makefile.am.common
2 2
3if !ENABLE_LIBTLS_ONLY
3bin_PROGRAMS = ocspcheck 4bin_PROGRAMS = ocspcheck
4
5dist_man_MANS = ocspcheck.8 5dist_man_MANS = ocspcheck.8
6else
7noinst_PROGRAMS = ocspcheck
8endif
6 9
7EXTRA_DIST = ocspcheck.8 10EXTRA_DIST = ocspcheck.8
8EXTRA_DIST += CMakeLists.txt 11EXTRA_DIST += CMakeLists.txt
diff --git a/apps/openssl/CMakeLists.txt b/apps/openssl/CMakeLists.txt
index 752f3ec..b9cd222 100644
--- a/apps/openssl/CMakeLists.txt
+++ b/apps/openssl/CMakeLists.txt
@@ -83,13 +83,3 @@ if(ENABLE_LIBRESSL_INSTALL)
83 install(TARGETS openssl DESTINATION ${CMAKE_INSTALL_BINDIR}) 83 install(TARGETS openssl DESTINATION ${CMAKE_INSTALL_BINDIR})
84 install(FILES openssl.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) 84 install(FILES openssl.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
85endif(ENABLE_LIBRESSL_INSTALL) 85endif(ENABLE_LIBRESSL_INSTALL)
86
87if(NOT "${OPENSSLDIR}" STREQUAL "")
88 set(CONF_DIR "${OPENSSLDIR}")
89else()
90 set(CONF_DIR "${CMAKE_INSTALL_PREFIX}/etc/ssl")
91endif()
92if(ENABLE_LIBRESSL_INSTALL)
93 install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR})
94 install(DIRECTORY DESTINATION ${CONF_DIR}/certs)
95endif(ENABLE_LIBRESSL_INSTALL)
diff --git a/apps/openssl/Makefile.am b/apps/openssl/Makefile.am
index 0bd8ca4..b98e08d 100644
--- a/apps/openssl/Makefile.am
+++ b/apps/openssl/Makefile.am
@@ -1,8 +1,11 @@
1include $(top_srcdir)/Makefile.am.common 1include $(top_srcdir)/Makefile.am.common
2 2
3if !ENABLE_LIBTLS_ONLY
3bin_PROGRAMS = openssl 4bin_PROGRAMS = openssl
4
5dist_man_MANS = openssl.1 5dist_man_MANS = openssl.1
6else
7noinst_PROGRAMS = openssl
8endif
6 9
7openssl_LDADD = $(abs_top_builddir)/ssl/libssl.la 10openssl_LDADD = $(abs_top_builddir)/ssl/libssl.la
8openssl_LDADD += $(abs_top_builddir)/crypto/libcrypto.la 11openssl_LDADD += $(abs_top_builddir)/crypto/libcrypto.la
@@ -92,34 +95,5 @@ noinst_HEADERS += testdsa.h
92noinst_HEADERS += testrsa.h 95noinst_HEADERS += testrsa.h
93noinst_HEADERS += timeouts.h 96noinst_HEADERS += timeouts.h
94 97
95EXTRA_DIST = cert.pem 98EXTRA_DIST = CMakeLists.txt
96EXTRA_DIST += openssl.cnf
97EXTRA_DIST += x509v3.cnf
98EXTRA_DIST += CMakeLists.txt
99
100install-exec-hook:
101 @if [ "@OPENSSLDIR@x" != "x" ]; then \
102 OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
103 else \
104 OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
105 fi; \
106 mkdir -p "$$OPENSSLDIR/certs"; \
107 for i in cert.pem openssl.cnf x509v3.cnf; do \
108 if [ ! -f "$$OPENSSLDIR/$i" ]; then \
109 $(INSTALL) -m 644 "$(srcdir)/$$i" "$$OPENSSLDIR/$$i"; \
110 else \
111 echo " $$OPENSSLDIR/$$i already exists, install will not overwrite"; \
112 fi \
113 done
114 99
115uninstall-local:
116 @if [ "@OPENSSLDIR@x" != "x" ]; then \
117 OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
118 else \
119 OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
120 fi; \
121 for i in cert.pem openssl.cnf x509v3.cnf; do \
122 if cmp -s "$$OPENSSLDIR/$$i" "$(srcdir)/$$i"; then \
123 rm -f "$$OPENSSLDIR/$$i"; \
124 fi \
125 done
diff --git a/configure.ac b/configure.ac
index 3aca617..fdf72ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,9 +110,6 @@ AM_CONDITIONAL([HOST_ASM_MASM_X86_64],
110AM_CONDITIONAL([HOST_ASM_MINGW64_X86_64], 110AM_CONDITIONAL([HOST_ASM_MINGW64_X86_64],
111 [test "x$HOST_ABI" = "xmingw64" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) 111 [test "x$HOST_ABI" = "xmingw64" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
112 112
113# Check if time_t is sized correctly
114AC_CHECK_SIZEOF([time_t], [time.h])
115
116AC_CONFIG_FILES([ 113AC_CONFIG_FILES([
117 Makefile 114 Makefile
118 include/Makefile 115 include/Makefile
@@ -132,18 +129,14 @@ AC_CONFIG_FILES([
132 openssl.pc 129 openssl.pc
133]) 130])
134 131
135AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"]) 132AC_ARG_ENABLE([nc],
136if test "$ac_cv_sizeof_time_t" = "4"; then 133 AS_HELP_STRING([--enable-nc], [Enable installing TLS-enabled nc(1)]))
137 AC_DEFINE([SMALL_TIME_T]) 134AM_CONDITIONAL([ENABLE_NC], [test "x$enable_nc" = xyes])
138 echo " ** Warning, this system is unable to represent times past 2038" 135AM_CONDITIONAL([BUILD_NC], [test x$BUILD_NC = xyes -o "x$enable_nc" = xyes])
139 echo " ** It will behave incorrectly when handling valid RFC5280 dates" 136
140 137AC_ARG_ENABLE([libtls-only],
141 if test "$host_os" = "mingw32" ; then 138 AS_HELP_STRING([--enable-libtls-only], [Enable installing libtls only]))
142 echo " **" 139AM_CONDITIONAL([ENABLE_LIBTLS_ONLY], [test "x$enable_libtls_only" = xyes])
143 echo " ** You can solve this by adjusting the build flags in your"
144 echo " ** mingw-w64 toolchain. Refer to README.windows for details."
145 fi
146fi
147 140
148AC_REQUIRE_AUX_FILE([tap-driver.sh]) 141AC_REQUIRE_AUX_FILE([tap-driver.sh])
149 142
diff --git a/crypto/Makefile.am b/crypto/Makefile.am
index e32ca96..8552a4d 100644
--- a/crypto/Makefile.am
+++ b/crypto/Makefile.am
@@ -9,7 +9,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/crypto/evp
9AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes 9AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes
10AM_CPPFLAGS += -I$(top_srcdir)/crypto 10AM_CPPFLAGS += -I$(top_srcdir)/crypto
11 11
12noinst_LTLIBRARIES = libcompat.la
13
14if ENABLE_LIBTLS_ONLY
15noinst_LTLIBRARIES += libcrypto.la
16else
12lib_LTLIBRARIES = libcrypto.la 17lib_LTLIBRARIES = libcrypto.la
18endif
13 19
14EXTRA_DIST = VERSION 20EXTRA_DIST = VERSION
15EXTRA_DIST += CMakeLists.txt 21EXTRA_DIST += CMakeLists.txt
@@ -126,8 +132,6 @@ else
126libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"$(sysconfdir)/ssl\" 132libcrypto_la_CPPFLAGS += -DOPENSSLDIR=\"$(sysconfdir)/ssl\"
127endif 133endif
128 134
129noinst_LTLIBRARIES = libcompat.la
130
131# compatibility functions that need to be built without optimizations 135# compatibility functions that need to be built without optimizations
132if !HAVE_EXPLICIT_BZERO 136if !HAVE_EXPLICIT_BZERO
133noinst_LTLIBRARIES += libcompatnoopt.la 137noinst_LTLIBRARIES += libcompatnoopt.la
diff --git a/include/openssl/Makefile.am.tpl b/include/openssl/Makefile.am.tpl
index 1375956..1bea34d 100644
--- a/include/openssl/Makefile.am.tpl
+++ b/include/openssl/Makefile.am.tpl
@@ -1,5 +1,6 @@
1include $(top_srcdir)/Makefile.am.common 1include $(top_srcdir)/Makefile.am.common
2 2
3if !ENABLE_LIBTLS_ONLY
3opensslincludedir=$(includedir)/openssl 4opensslincludedir=$(includedir)/openssl
4 5
5opensslinclude_HEADERS = 6opensslinclude_HEADERS =
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index c014efb..644bf71 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -123,10 +123,20 @@ char buf[1]; getentropy(buf, 1);
123 *) ;; 123 *) ;;
124esac 124esac
125 125
126AC_ARG_ENABLE([nc], 126# Check if time_t is sized correctly
127 AS_HELP_STRING([--enable-nc], [Enable installing TLS-enabled nc(1)])) 127AC_CHECK_SIZEOF([time_t], [time.h])
128AM_CONDITIONAL([ENABLE_NC], [test "x$enable_nc" = xyes]) 128AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"])
129AM_CONDITIONAL([BUILD_NC], [test x$BUILD_NC = xyes -o "x$enable_nc" = xyes]) 129if test "$ac_cv_sizeof_time_t" = "4"; then
130 AC_DEFINE([SMALL_TIME_T])
131 echo " ** Warning, this system is unable to represent times past 2038"
132 echo " ** It will behave incorrectly when handling valid RFC5280 dates"
133
134 if test "$host_os" = "mingw32" ; then
135 echo " **"
136 echo " ** You can solve this by adjusting the build flags in your"
137 echo " ** mingw-w64 toolchain. Refer to README.windows for details."
138 fi
139fi
130 140
131AM_CONDITIONAL([HOST_AIX], [test x$HOST_OS = xaix]) 141AM_CONDITIONAL([HOST_AIX], [test x$HOST_OS = xaix])
132AM_CONDITIONAL([HOST_CYGWIN], [test x$HOST_OS = xcygwin]) 142AM_CONDITIONAL([HOST_CYGWIN], [test x$HOST_OS = xcygwin])
diff --git a/ssl/Makefile.am b/ssl/Makefile.am
index 85b932e..7f4c164 100644
--- a/ssl/Makefile.am
+++ b/ssl/Makefile.am
@@ -1,6 +1,10 @@
1include $(top_srcdir)/Makefile.am.common 1include $(top_srcdir)/Makefile.am.common
2 2
3if ENABLE_LIBTLS_ONLY
4noinst_LTLIBRARIES = libssl.la
5else
3lib_LTLIBRARIES = libssl.la 6lib_LTLIBRARIES = libssl.la
7endif
4 8
5EXTRA_DIST = VERSION 9EXTRA_DIST = VERSION
6EXTRA_DIST += CMakeLists.txt 10EXTRA_DIST += CMakeLists.txt
diff --git a/update.sh b/update.sh
index 22048ea..fe91b51 100755
--- a/update.sh
+++ b/update.sh
@@ -265,9 +265,9 @@ done
265echo "copying openssl(1) source" 265echo "copying openssl(1) source"
266$CP $bin_src/openssl/openssl.1 apps/openssl 266$CP $bin_src/openssl/openssl.1 apps/openssl
267$CP_LIBC $libc_src/stdlib/strtonum.c apps/openssl/compat 267$CP_LIBC $libc_src/stdlib/strtonum.c apps/openssl/compat
268$CP $libcrypto_src/cert.pem apps/openssl 268$CP $libcrypto_src/cert.pem .
269$CP $libcrypto_src/openssl.cnf apps/openssl 269$CP $libcrypto_src/openssl.cnf .
270$CP $libcrypto_src/x509v3.cnf apps/openssl 270$CP $libcrypto_src/x509v3.cnf .
271for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/openssl/Makefile.am` ; do 271for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/openssl/Makefile.am` ; do
272 if [ -e $bin_src/openssl/$i ]; then 272 if [ -e $bin_src/openssl/$i ]; then
273 $CP $bin_src/openssl/$i apps/openssl 273 $CP $bin_src/openssl/$i apps/openssl
@@ -327,6 +327,7 @@ chmod 755 tests/testssl
327 for i in `ls -1 *.h|sort`; do 327 for i in `ls -1 *.h|sort`; do
328 echo "opensslinclude_HEADERS += $i" >> Makefile.am 328 echo "opensslinclude_HEADERS += $i" >> Makefile.am
329 done 329 done
330 echo endif >> Makefile.am
330) 331)
331 332
332add_man_links() { 333add_man_links() {
@@ -362,9 +363,9 @@ done
362# copy manpages 363# copy manpages
363echo "copying manpages" 364echo "copying manpages"
364echo EXTRA_DIST = CMakeLists.txt > man/Makefile.am 365echo EXTRA_DIST = CMakeLists.txt > man/Makefile.am
366echo "if !ENABLE_LIBTLS_ONLY" >> man/Makefile.am
365echo dist_man3_MANS = >> man/Makefile.am 367echo dist_man3_MANS = >> man/Makefile.am
366echo dist_man5_MANS = >> man/Makefile.am 368echo dist_man5_MANS = >> man/Makefile.am
367
368(cd man 369(cd man
369 for i in `ls -1 $libssl_src/man/*.3 | sort`; do 370 for i in `ls -1 $libssl_src/man/*.3 | sort`; do
370 NAME=`basename "$i"` 371 NAME=`basename "$i"`
@@ -391,3 +392,4 @@ echo dist_man5_MANS = >> man/Makefile.am
391 done 392 done
392) 393)
393add_man_links . man/Makefile.am 394add_man_links . man/Makefile.am
395echo endif >> man/Makefile.am