37 Commits

Author SHA1 Message Date
elms
cc2b69573c cmake: Increase minimum version to 3.16 and fix HomeBrew build
Increasing cmake version required to allow use of more recent
additions in the future.

Reported issue is that Homebrew use different compiler than AppleClang
(from XCode). Correctly test for AppleClang to set xcode specific `ar`
and `ranlib` flags. It may also be appropraite to use for ANDROID as
well see
7d057b2738 (diff-6f7a068f87ca22bd0105fef2143b0960e4993854863fd20c9416c677ee33a737R61-R67)
2022-01-05 09:29:27 -08:00
Jacob Barthelmeh
7dd50a1beb bump version for dev and update year in readme 2022-01-03 16:02:10 -07:00
Jacob Barthelmeh
616026880e bump version by .1 for dev 2021-12-28 16:25:05 -07:00
Jacob Barthelmeh
816718ecd3 prepare for release 5.1.0 2021-12-27 10:34:09 -07:00
elms
dc073f9c1d cmake: add back de-duplication and fix formatting 2021-12-23 09:22:47 -08:00
elms
37eec1ed19 cmake: reduce port includes
TESTING:

```
./autogen.sh && ./configure --enable-reproducible-build --prefix=$PWD/ac_repro && make install
cmake -B b2 -DWOLFSSL_REPRODUCIBLE_BUILD=yes -DCMAKE_INSTALL_PREFIX:PATH=$PWD/cmake_repro && cmake --build b2 && cmake --install b2
diff -rq ac_repro cmake_repro
```
2021-12-23 09:22:47 -08:00
elms
6ff1e0b037 cmake: correct libtool version, default to shared library, generate pkgconfig 2021-12-23 09:22:47 -08:00
elms
c89b7d5f79 configure and cmake: Closing gap on options and output
cmake:
 * 32-bit and 16-bit mode flags
 * Add 4bit to AESGCM
 * Add align data
 * Encrypted Keys option
 * PKC12 option
 * Header installation cleanup

configure:
 * Add comment for `v5-RC9`
 * update CFLAGS to always be appended instead of mix of prepend and append
 * removed duplicate `ARC4` logic
2021-12-23 09:22:47 -08:00
Jacob Barthelmeh
ac5e9e5e7c bump to dev version and touch up readme 2021-11-01 15:50:03 -06:00
Jacob Barthelmeh
d869c60605 prepare for release v5.0.0 2021-11-01 11:43:25 -06:00
elms
fdf2b711f7 cmake: add SNI and TLSx 2021-10-26 15:03:29 -07:00
Hayden Roche
302938d3c6 Improve wolfcrypt test/bench library comments.
These can be built as shared libraries, too, so the comments shouldn't be
specific about static libraries.
2021-09-25 10:30:01 -07:00
Hayden Roche
ec857f6f62 Add a CMake option to build wolfcrypt test and bench code as static libs.
Application code can use the resulting CMake targets or the static library
artifacts directly (e.g. libwolfcrypttest.a on *nix).
2021-09-24 13:54:18 -07:00
Anthony Hu
33cb823148
Remove legacy NTRU and OQS (#4418)
* Remove NTRU and OQS

* Keep the DTLS serialization format backwards compatible.

* Remove n from mygetopt_long() call.

* Fix over-zealous deletion.

* Resolve problems found by @SparkiDev
2021-09-24 08:37:53 +10:00
Hayden Roche
93d3739ae7 Fix issue with CMake build where CMAKE_C_FLAGS is empty. 2021-09-07 12:11:43 -07:00
Hayden Roche
12d7487774 Make sure CMAKE_C_FLAGS gets parsed for defines to add to options.h.
For example, if a user does

```
cmake -DCMAKE_C_FLAGS="-DWOLFSSL_AESGCM_STREAM -DFP_MAX_BITS=16384" ..
```

definitions for `WOLFSSL_AESGCM_STREAM` and `FP_MAX_BITS 16384` should wind up
in options.h (same as the autotools build).
2021-09-02 13:00:24 -07:00
Jacob Barthelmeh
3bebcaaf54 bump version for dev 2021-07-13 04:18:52 +07:00
JacobBarthelmeh
500a6c8b27 prepare for release 4.8.0 2021-07-08 12:02:40 -06:00
Hayden Roche
051d1c2579 Add support for reproducible builds with CMake.
Unlike the autotools build, I've chosen NOT to make the build un-deterministic
if WOLFSSL_REPRODUCIBLE_BUILD is set to no (the default). Instead, I just use
whatever CMake's default is. On my system, ar and ranlib run in deterministic
mode by default, and the CMake defaults for the relevant ar and ranlib variables
are:

CMAKE_C_ARCHIVE_CREATE = <CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>
CMAKE_C_ARCHIVE_APPEND = <CMAKE_AR> q  <TARGET> <LINK_FLAGS> <OBJECTS>
CMAKE_C_ARCHIVE_FINISH = <CMAKE_RANLIB> <TARGET>

So my builds are automatically deterministic. This is normal on my system so I
wouldn't want to make them not deterministic by default, hence the decision.

I validated with md5sum on libwolfssl.a that explicitly making the build not
deterministic indeed results in different checksums across multiple runs. The
checksums are the same when flipping back to deterministic mode.
2021-05-06 23:05:33 -07:00
Hayden Roche
0403990cc8 Add support for session tickets in CMake.
Additionally, ensure duplicate definitions don't make it into options.h.
2021-03-10 11:48:59 -06:00
Hayden Roche
cd9f400cf3 Clean up CMake option strings.
This commit makes all the binary CMake options (i.e. yes/no) conform to one
string convention: "yes/no." Previously, we had a mixture of yes/no and ON/OFF.
2021-02-26 10:30:46 -06:00
Elms
101b35e766 cmake: mirror configure logic for SHA3, SHAKE256, SHA224 2021-02-24 14:25:30 -08:00
Hayden Roche
074090049b Add CMake support for CURVE25519, ED25519, CURVE448, and ED448. 2021-02-24 13:57:34 -08:00
toddouska
ef916df1b1
Merge pull request #3761 from JacobBarthelmeh/Release
update changelog and bump version to 4.7.1 for development bundles
2021-02-23 12:00:59 -08:00
Elms
70ddaf8f2e cmake: configure test_paths.h 2021-02-18 12:17:55 -08:00
Jacob Barthelmeh
5f3ee2985c bump version for development bundles 2021-02-16 23:57:47 +07:00
Jacob Barthelmeh
847938f4d6 prepare for release v4.7.0 2021-02-16 02:41:37 +07:00
Hayden Roche
798d9ed0d5 Various CMake changes.
- Add support for user settings to CMake.
- Update version number.
- Add an option to enable/disable generation of config.h and the HAVE_CONFIG_H
  define.
2021-01-08 12:15:58 -06:00
Hayden Roche
8f6c21d600 CMake improvements.
- Begin adding options to enable/disable different features.
- Increase minimum CMake version to 3.2.
- Support installation of the built files.
- Add checks for necessary include files, functions etc.
- Generate options.h and config.h.
- Use GNUInstallDirs to support installation, which is designed to be somewhat
  cross-platform.
- Export wolfssl CMake target during installation, so others using CMake can
  link against wolfssl easily.
- Disallow in-source builds.
- Place the generation of BUILD_* flags (controlled with AM_CONDITIONALs
  in configure.ac) in a separate function in functions.cmake,
  generate_build_flags.
- Implement the logic to conditionally add source files from
  src/include.am in a function in functions.cmake, generate_lib_src_list.
- Exclude tls_bench from Windows. Doesn't compile with MSVC. WIP.
- Update INSTALL with latest CMake build instructions.
- Add a cmake/include.am to ensure CMake files get added to the distribution.
2020-11-13 11:25:04 -06:00
Daniel Pouzzner
a5d96721ac wolfcrypt/src: remove wc_debug.c and move its contents to logging.c. 2020-10-28 17:28:05 -05:00
Daniel Pouzzner
1ba0883f4c introspection tweaks: rename wolfcrypt/src/debug.c to wolfcrypt/src/wc_debug.c; restore BUILD_WC_DEBUG gating for autotools inclusion of wc_debug.o and disable opportunistically when ENABLED_LEANTLS, ENABLED_LEANPSK, or ENABLED_LOWRESOURCE; add HAVE_WC_INTROSPECTION gate for libwolfssl_configure_args() and libwolfssl_global_cflags(). 2020-10-28 17:28:05 -05:00
Hayden Roche
06977ebbdf Tweak CMakeLists.txt
- Change minimum CMake version from 2.6 to 3.0, which has support for targets.
- Favor explicit file lists in CMakeLists.txt over globs.
- Use target_compile_options to specify -DNO_MAIN_DRIVER for the unit_test target.
2020-10-19 16:38:51 -05:00
Hayden Roche
31b6c507f9 Tweak CMakeLists.txt
- Add generated CMake files/directories to .gitignore.
- Use lowercase for CMake commands, UPPERCASE for variables.
- Favor the CMake "option" command over SET(... CACHE BOOL ...).
- Use CMAKE_CURRENT_SOURCE_DIR in place of CMAKE_CURRENT_BINARY_DIR.
- Use CMAKE_USE_PTHREADS_INIT instead of CMAKE_HAVE_PTHREAD_H.
- Use target_include_directories on the wolfssl library target instead of include_directories.
2020-10-19 16:07:48 -05:00
David Garske
6f5a7e87c5 Fix for CMake to only set ranlib arguments for Mac. Fix for stray typo of , -> ;. Fixes #3275 and Fixes #3278 2020-09-08 11:07:12 -07:00
David Garske
db20fb6ca1 Fixes for using CMake with Visual Studio. Improvements to documentation for portability. 2020-07-30 16:44:36 -07:00
David Garske
8b25b48621 Improvements to CMake support based on feedback from users. 2020-07-27 12:13:08 -07:00
David Garske
9a281e5e3a Adds CMake support to wolfSSL:
* Build wolfSSL as a library and builds all examples / tests.
* Added instructions in the INSTALL file.
* Fix for evp.c when being included directly due to improperly placed `WOLFSSL_EVP_INCLUDED`.
2020-07-27 11:04:37 -07:00