78 Commits

Author SHA1 Message Date
Brent Cook
921c0675a2 Add '--enable-libtls-only' build option 2021-04-07 07:51:45 -05:00
Brent Cook
9abd36e3af modify nc build to link libcompat objects directly
Rather than assuming the static version of libcrypto exists for pulling in the compatibility functions, link the compat objects directly. This modifies the object file generation script a bit to handle the empty-case properly as well.
2020-10-20 03:50:23 -05:00
Brent Cook
6359d9404d include strtonum for ocspcheck 2020-10-19 09:09:36 -05: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
kinichiro
6dc8d2be3b Install ocspcheck.8 manual 2020-01-09 21:33:28 +09:00
Brent Cook
73fb0f8991 re-add CMS to openssl(1) 2019-11-07 18:24:37 -06:00
kinichiro
30e91bc6d2 Enable speed on win32
- Use thread and sleep instead of signal and alarm, on win32
- Disable -multi option on win32 since fork is hard to implement
2019-07-14 19:45:34 +09:00
paul4334
a7265dd139
Fix MacOSX cmake missing symbol _clock_gettime
On El Capitan:
     [exec] [100%] Linking C executable openssl
     [exec] Undefined symbols for architecture x86_64:
     [exec]   "_clock_gettime", referenced from:
     [exec]       _app_timer_real in apps_posix.c.o
     [exec] ld: symbol(s) not found for architecture x86_64
     [exec] clang: error: linker command failed with exit code 1 (use -v to see invocation)
     [exec] make[2]: *** [apps/openssl/openssl] Error 1
     [exec] make[1]: *** [apps/openssl/CMakeFiles/openssl.dir/all] Error 2
     [exec] make: *** [all] Error 2
2019-04-30 16:35:04 -07:00
Brent Cook
b7a580e86a implement app_timer_real 2018-09-23 14:04:26 -05:00
Brent Cook
bf368e58e7 add private includes for apps and tests 2018-06-14 05:59:20 -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
Brent Cook
6b513a1c78 add proper guard and typedef 2018-03-23 13:45:05 -05:00
Brent Cook
4b2a8cd1c1 adjust definition of compat clock_gettime 2018-03-23 11:10:16 -05:00
Brent Cook
987aa6a084 add clock_gettime for macos 10.11 and earlier 2018-03-22 21:04:43 -05: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
Brent Cook
3fb9e63b90 bump base requirement to Windows Vista, use builtin inet_ntop/pton 2018-03-14 07:29:04 -05:00
kinichiro
82ce59838e Add app_timer_user for Windows build 2017-12-26 22:49:01 +09:00
Aric Belsito
653ba21752
Create correct directory in CMake install.
Was creating ${CONFDIR}/cert instead of ${CONFDIR}/certs.
2017-11-06 11:52:03 -08:00
kinichiro
9bb3e03722 Fix checking memmem in apps/ocspcheck/CMakeLists.txt
- Issue #352 pointed out by @d3x0r
2017-09-26 22:02:21 +09:00
Brent Cook
4916f940c8 use standard initialization for poll loop delay 2017-08-13 16:09:32 -05: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
Brent Cook
9d2418ae3a add nc(1) manpage to install if enabled 2017-04-12 08:18:20 -05:00
kinichiro
58eb645fdb Copy libc compat files rather than adding into the repository
- remove the CP_LIBC files from repo
- move tests/memmem.c to tests/compat/
2017-01-28 03:40:38 +09:00
Brent Cook
cb57534af8 skip building ocspcheck on MSCV 2017-01-27 07:14:43 -06:00
kinichiro
05cf1ee697 Copy openbsd library file every time rather than statically checking in 2017-01-27 01:21:37 +09:00
kinichiro
7dd0650d33 Add inet_ntop and memmem for ocspcheck 2017-01-26 17:51:35 +09:00
kinichiro
91a8bd7914 Move strsep.c to crypto/compat/ and add ocspcheck build to CMake 2017-01-25 21:31:04 +09:00
Brent Cook
93754dc5cf initial ocspcheck integration 2017-01-24 06:06:07 -06:00
Brent Cook
c691459502 fix static mingw builds, platform LDADD needs to come at the end 2017-01-09 02:22:26 -06:00
kinichiro
332c2eeaa3 remove unneeded slash after DESTDIR 2016-10-30 21:40:24 -05:00
Brent Cook
df20769977 remove cms 2016-09-14 08:49:53 -05:00
Brent Cook
9e25f75800 remove DEFAULT_CA_FILE patch, since libtls handles this by default 2016-08-13 11:42:21 -05:00
Brent Cook
b13529f791 Revert "remove DEFAULT_CA_FILE patch, since libtls handles this by default"
This reverts commit 30adf9c06e8d3d7ac9e89f4b2b290567bcafa75c.
2016-07-09 12:40:22 -05:00
Brent Cook
30adf9c06e remove DEFAULT_CA_FILE patch, since libtls handles this by default 2016-07-07 07:27:39 -05: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
2510a5e6f9 modify cmake to build nc
- modify structure of CMakeLists.txt under apps/
  * move apps/CMakeLists.txt to apps/openssl/ since this is for openssl build
  * create new apps/nc/CMakeLists.txt for nc build
  * modify apps/CMakeLists.txt just add_subdirectory()

- add checking and compile of arc4random_uniform()

- add installing man files, openssl.1 and nc.1
2016-04-09 12:06:40 -05:00
Brent Cook
28aaab4323 allow optionally installing nc(1) with '--enable-nc' 2015-12-07 08:14:51 -06: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
7109fb3260 ensure we don't pass a negative int to ctypes functions
Some implementations, e.g. cygwin, use a table lookup that can cast
a char to a negative array offset.
2015-11-23 02:06:03 -06:00
Brent Cook
0086809a82 update apps.h include 2015-10-18 10:48:17 -05:00
Brent Cook
0197a58969 Windows compatibility fixes
VS2013 has trouble with relative include paths for apps/openssl, so move
certhash_win/apps_win.c back to apps/openssl.

gmtime_r on mingw64 fails with negative time_t, override

gmtime_s fails all of the time unit tests, override

SHUT_RD/WR are defined in newer mingw64 headers, check before overriding
2015-10-18 09:28:10 -05:00
Jeremy Huddleston Sequoia
9afc452761 nc: Use AM_CPPFLAGS, not CPPFLAGS in Makefile.am
CPPFLAGS should just be set by the user at configure time

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-10-14 16:33:25 -05:00
Brent Cook
a7f031ba55 add b64_ntop checking and fallback for nc(1) 2015-10-01 07:40:26 -05:00
Brent Cook
630e7b6040 visual studio path updates 2015-09-18 08:43:57 -05:00
Brent Cook
c7ae7c0c9d fix a library paths, nc patch 2015-09-13 19:15:34 -05:00