Commit Graph

40 Commits

Author SHA1 Message Date
Masud Rahman
1dd6a52f2d ssl/tls cmake: fix shared library dependencies
Ensure that the 'ssl' depends on 'crypto' and that 'tls' depends on
'ssl' and 'crypto' for all platforms.  Prior to this commit, the
dependency was only specified for the 'WIN32' CMake build.
2017-07-24 15:26:29 -04:00
d3x0r
a4d80ca56a Merge branch 'master' of https://github.com/libressl-portable/portable into SkipInstall
Fix merge conflicts from GNUInstallDirs merge to master.
2017-07-06 23:11:11 -07:00
d3x0r
2557dd7439 Add option LIBRESSL_SKIP_INSTALL
Internally LIBRESSL_SKIP_INSTALL, if not set becomes ENABLE_LIBRESSL_INSTALL so this by default is enabled.  defining LIBRESSL_SKIP_INSTALL before hand will disable all install() rules.
This is useful if another project includes and links to this statically.
I chose to add a prefix to avoid potential name collision because the options are cached globally.

If the installation is skipped, maybe it should also disable building apps?  I didn't do that.
2017-07-06 02:09:44 -07:00
d3x0r
a2bd5ebaba use GNUInstallDirs from cmake to specify install paths.
Primarily this is to select whether 'lib64' or 'lib' is used on linux type systems.
2017-07-06 01:49:43 -07:00
kinichiro
91a8bd7914 Move strsep.c to crypto/compat/ and add ocspcheck build to CMake 2017-01-25 21:31:04 +09:00
kinichiro
484feaae91 Stop generating .def files by update.sh 2017-01-18 21:05:43 +09:00
kinichiro
3b8cf47307 Add export symbol support to CMake 2017-01-18 00:34:20 +09:00
Matt Stancliff
63add73d0b Define CMake library object lists globally
OBJECT collections in CMake don't generate any artifacts so these
are safe to hoist out and define globally.

library OBJECT targets are just a list of filenames.  It can be useful for
other projects to include lists of sources directly regardless of build mode
(shared, static, or library).
2017-01-12 13:46:22 +08:00
Brent Cook
77a2a9f3ef remove check-in .def and ignore .sym files 2016-11-06 00:24:22 +09:00
Brent Cook
7770e4f2e4 implement support for hiding symbols in libtls / libssl 2016-11-06 00:24:12 +09:00
kinichiro
d3abaf5fe7 Add tls_ocsp.c to Makefile.am and CMakeLists.txt 2016-11-04 22:43:34 +09:00
kinichiro
62f2a73061 export DLLs functions for MSVC with CMake
- Add 3 DEF files to export functions from Windows DLLs
  - Add gettimeofday to crypto/crypto.def (*1)
  - Remove gai_strerrorA from tls/tls.def (*1)
- Fix CMakeLists.txt to use DEF files as PRIVATE
- Change DLL import library file name since it duplicates with static library
- Ignore compiler warning C4267, and Edit CMAKE_C_FLAGS not to overwrite it (*1)
- Add USE_SHARED option to build openssl.exe with shared libraries (*1)

  (*1) recommended by @mcnameej
2016-10-30 21:39:36 -05:00
Brent Cook
5532f007d3 Land #203, add libtls callback API 2016-09-04 08:58:30 -05:00
Satoshi Yasushima
829b21581f build Windows DLL on CMake
like below.
* libcrypto-38.dll
* libssl-39.dll
* libtls-11.dll
2016-08-25 18:17:27 +09:00
Satoshi Yasushima
971892766d build MinGW on CMake 2016-08-25 18:17:12 +09:00
Brent Cook
a7f754a663 set link library dependencies with MSVC, fixes #221 2016-07-31 17:11:19 -05:00
Tobias Pape
a69063be10
Portable code part for callbacks in accept/connect
see https://github.com/libressl-portable/openbsd/pull/64
2016-06-28 03:29:54 +02:00
Brent Cook
552817b77f Land #192, fix fix ld warning "attempted multiple inclusion of file" on Solaris 2016-05-02 02:03:03 -05:00
kinichiro
02e1cc4df1 fix ld warning "attempted multiple inclusion of file" on Solaris
- To avoid ld warning on Solaris, use abs_top_builddir in Makefile.am
2016-04-21 16:12:47 +09:00
kinichiro
bda62f7fe4 add cmake build options
- add cmake build options as configure provides
  * -DENABLE_ASM (default ON)
  * -DENABLE_EXTRATESTS (default OFF)
  * -DENABLE_NC (default OFF)
  * -DOPENSSLDIR (default ${CMAKE_INSTALL_PREFIX}/etc/ssl)

- add biotest and pidwraptest if ENABLE_EXTRATESTS is ON

- add compiler flag `-fno-common` if CMAKE_SYSTEM_NAME is Darwin
  to prevent link error Undefined symbols "_OPENSSL_ia32cap_P"
2016-04-14 15:16:52 +09:00
kinichiro
3207606f11 fix cmake on HP-UX
- CMakeLists.txt
  * add OS specific compiler flags and library
  * add checking size of time_t
  * add checking memmem()

- tests/CMakeLists.txt
  * add if(HAVE_MEMMEM) for explicit_bzero
  * add checking SMALL_TIME_T for rfc5280time

- crypto/CMakeLists.txt
  * add getentropy_hpux.c

- tls/CMakeLists.txt
  * fix checking strsep
2016-04-04 14:27:43 +09:00
Brent Cook
1988b8f65e fixup cert.pem path override for libtls, add for nc(1)
this also fixes the formatting of help for nc(1)
2015-12-07 07:55:05 -06:00
Brent Cook
5b49c30cbc override _PATH_SSL_CA_FILE with OPENSSLDIR at build time
fix #160
2015-12-06 20:35:09 -06:00
Brent Cook
82e96d3565 include new tls headers 2015-09-13 03:48:46 -05:00
Brent Cook
854f4f69af add 'nc' to the distribution as an example of libtls client and server 2015-09-12 08:08:24 -05:00
Brent Cook
adfb2bf722 Do not build lib-objects targets if we are just building static libs.
This confuses some cmake targets.
2015-09-09 06:03:52 -05:00
Brent Cook
ca56c332e3 disable shared CMake builds for OS X / Windows for now 2015-09-07 01:05:33 -05:00
Jeff Davey
5461dea7f1 Add install targets and shared libraries to CMake 2015-08-18 13:20:19 -06:00
Brent Cook
5d8a1cf715 add initial CMake and Visual Studio build support
This moves the compatibility include files from include to
include/compat so we can use the awful MS C compiler
<../include/> trick to emulate the GNU #include_next extension.

This also removes a few old compat files we do not need anymore.
2015-07-21 12:08:18 -05:00
Brent Cook
189cdf7103 revert changes to libtls-standalone Makefile.am that ended up in tls 2015-05-23 19:27:57 -05:00
Brent Cook
28353c1df1 stub in initial libtls standalone tree 2015-05-23 19:26:51 -05:00
Brent Cook
ad2a38ab4a rework CFLAGS/CPPFLAGS settings during configuration
Move define adjustments to CPPFLAGS.
Adjust user CFLAGS directly, do not override during configuration.
USER_CFLAGS is not necessary to build libcompat_noopt correctly.
2015-03-22 07:43:55 -05:00
Brent Cook
dd646a3302 enable libtls by default
The API/ABI for the LibreSSL 2.1.x series is now fixed, so we can safely
enable libtls it by default. This is useful for new OpenNTPD and
OpenSMTPD releases as well.

ok deraadt@ beck@ sthen@
2015-03-19 00:39:50 -05:00
Brent Cook
ad7ac48d03 add strsep fallback for libtls 2015-02-14 20:03:39 -06:00
Brent Cook
c2dccc1418 add all LIBADD dependencies for tls
The libtool transitive dependency magic does not seem to work for
cross-compilation, so explicitly specify them here.
2014-12-14 20:38:02 -06:00
Brent Cook
d2342f36bc allow Windows DLLs to be built
based on a patch from Jan Engelhardt
2014-12-14 16:59:35 -06:00
Brent Cook
09e5a841cd add LIBADD library dependencies to libssl/libtls
From Jan Engelhardt
2014-12-14 16:59:35 -06:00
Brent Cook
976f64d932 read all library versions directly from files
This makes building and testing easier because the library Makefile.am
files are use directly rather than as templates. Thanks to Wouter Clarie
for the idea.
2014-12-06 18:59:25 -06:00
Brent Cook
33ff088a60 simplify packaging for libtls.
Derive the file list from the Makefile.am template itself (DRY), ensure
manpage is packaged with the final tarball.
2014-12-06 10:21:23 -06:00
Brent Cook
b3270494f0 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@
2014-12-06 09:13:56 -06:00