73 Commits

Author SHA1 Message Date
2b68369a2b
check in v3.8.2 source 2023-11-06 23:58:23 -08:00
Pierre Wendling
f06374e731 MSVC: Enable building ocspcheck.
- Add `STDIN_FILENO` to compat unistd header.
- Use quotes to include compat getopt header in the compat unistd.
- Export additional symbols needed by ocspcheck (optarg, optind,
  ftruncate)
2023-11-01 20:49:34 -05:00
Pierre Wendling
86a6826fef
Move LibreSSL/ to LIBRESSL_INSTALL_CMAKEDIR.
This allows users to install the CMake configs without forcing a
`LibreSSL` directory after `LIBRESSL_INSTALL_CMAKEDIR`.
2023-08-19 12:16:16 -04:00
Pierre Wendling
a89cd65980
CMake: Export and install library targets.
The configs can be consumed by setting LibreSSL_DIR to the build
directory, or after installation using CMAKE_PREFIX_PATH/LibreSSL_DIR.

For compatibility, the EXPORT_NAME of targets and the LIBRESSL_*
variables are set to match the names used in FindLibreSSL.
2023-08-19 12:16:15 -04:00
Brent Cook
081cee6207 fixes #681, allow override of library POSTFIX for nested builds 2023-07-07 15:02:16 +03:00
Brent Cook
642ead359b only link libtls statically to libssl/libcrypto when building standalone 2023-07-05 14:27:23 +03:00
Brent Cook
71ce0b8c3e generate opensslconf.h in build dir for cmake 2023-07-04 10:37:24 +03:00
Brent Cook
f8ced390cd fix dangling whitespace when building object list
breaks latest macOS linker to have a directory in the object list
2023-05-27 01:20:54 -05:00
Brent Cook
80eb145460 add direct source dependency to each library
Fix library generation with some CMake generators by including a direct
source file dependency for each library.
2022-12-14 06:28:11 -06:00
Brent Cook
4f0f6ebd1a Build a static test library with all symbols
Build and link a special test library rather than assuming that the
build has static libraries available.
2022-12-13 14:23:17 -06:00
kinichiro
3412032b52 Add tls/tls_signer.c 2022-01-26 21:24:18 +09:00
kinichiro
c211d97ecb Remove unneeded target_include_directories with cmake
This could remove recurring of the same statement for include directories.
Instead of this removals, apps/* and tests  should have include path that
had been provided by INTERFACE_INCLUDE_DIRECTORIES of target libs and
internal static libs.
2021-12-04 14:36:39 +09:00
kinichiro
870a1ebbc2 Build static library for regression tests when shared build with CMake 2021-11-27 20:57:14 +09:00
kinichiro
4c56df46de Statically link libcrypto/ssl into libtls with cmake 2021-05-07 20:31:22 +09:00
kinichiro
9971b0820c Use object library for CMake 2021-05-02 14:27:57 +09:00
kinichiro
5a29b0472d Link crypto and ssl object files directly instead of static library
- Output object files list variable for libcrypto and libssl to .mk file.
- Include object files list variable .mk from tls/Makefile
- Link .lo files directly instead of static library for libtls.
2020-10-04 03:50:18 -05:00
Brent Cook
fe42a8011b Configure libtls and nc(1) to statically link to libcrypto/ssl
An issue that Reyk Floeter noted while building a Debian package for
LibreSSL is that installing libtls along with OpenSSL causes linker
issues since it will often pick up the wrong libcrypto/libssl. This
change makes libtls statically link the object files it needs rather
than relying on the shared libraries, effectively making libtls
self-contained and able to be packaged independently.

This should make it possible for other projects that also use libtls to
be able to package support without requiring the target OS to ship
libcrypto / libssl from LibreSSL.

678278df55
2020-10-04 03:50:18 -05:00
Dan Nestor
b10a3363df
TLS target properties when building static libs 2020-03-02 11:44:04 +01:00
kinichiro
0ab2955f9e Override the default path of cert.pem in libtls 2019-11-16 20:17:37 +09:00
Brent Cook
5269dbb279 update cmake 2019-01-31 13:56:56 -06:00
Brent Cook
a6d7ea9562 update autoconf for latest compat functions 2019-01-31 13:56:56 -06:00
kinichiro
0b8343ace3 Fix cmake to generate proper Libs.private in .pc files 2018-10-05 22:59:44 +09:00
kinichiro
f819a2bce7 Fix cmake linking libraries 2018-10-03 20:35:36 +09:00
Brent Cook
64b6951576 make headers under include/compat private again 2018-06-14 04:48:59 -05:00
Brent Cook
4fcfc82d83 scope private/public headers when embedding into other projects
thanks to Cameron Palmer
2018-05-29 05:46:54 -05:00
Don
26bebfc564 Use BUILD_SHARED_LIBS to specify library type 2018-03-21 10:24:52 -07:00
Brent Cook
1b84f79f4c Land #402, Remove CMAKE_HOST_ references 2018-03-18 09:53:37 -05:00
Brent Cook
c9c8e32fbe Land #400, Use groups in CMake install command for libraries 2018-03-18 09:52:27 -05:00
kinichiro
1fb8c9c6be Fix using right functions for file descriptor with MS Visual Studio 2018-03-18 00:48:49 +09:00
Don
09590953d0 Remove CMAKE_HOST_ references
CMAKE_HOST_ describes the host system not the target. For cross compilation to work the actual target system should be used for making decisions in CMake.
2018-03-16 14:59:53 -07:00
Don
5fb488de9f Use groups in CMake install command for libraries
On Windows shared libraries should be installed into the bin directory. Using grouping within CMake based on the target type fixes this issue.
2018-03-16 13:59:26 -07:00
kinichiro
3681d02253 Add compat bits for libtls on Windows 2018-02-25 21:56:05 +09:00
kinichiro
57ea69ec10 Add tls/tls_keypair.c 2018-02-11 22:38:15 +09:00
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