Commit Graph

1499 Commits

Author SHA1 Message Date
jordan
41d248461b fix detection of cut tool in configure.ac 2023-06-27 13:18:25 -05:00
JacobBarthelmeh
2d28b492b0 Merge pull request #6501 from dgarske/ecc_comp
Fix for SP math all and ECC with compressed keys (missing sp_add_d)
2023-06-21 12:01:06 -07:00
Sean Parkinson
82cc988226 Merge pull request #6495 from JacobBarthelmeh/build
update check for stdatomic header file
2023-06-14 14:00:04 +10:00
JacobBarthelmeh
72536e0e10 prepare for 5.6.3 2023-06-13 14:47:06 -06:00
David Garske
fe7502a50e Fix for SP math all and ECC with compressed keys (missing sp_add_d). Reproduce using: ./configure --disable-rsa --disable-dh --enable-compkey --disable-pkcs12 && make. 2023-06-13 11:39:24 -07:00
JacobBarthelmeh
47036d0166 update check for stdatomic header file 2023-06-12 13:48:24 -06:00
JacobBarthelmeh
353a2926b6 add check for stdatomic.h 2023-06-09 09:52:01 -07:00
JacobBarthelmeh
032ac405db prepare for release 5.6.2 2023-06-09 05:51:18 -07:00
Sean Parkinson
9ca9c2ba6f Kyber: allow compilation with limited sizes with liboqs 2023-06-06 14:26:06 +10:00
John Bland
7e3aafb60c Fix for FIPS ECC integrity check with crypto callback set (#6425)
Skip ECC private key check when the TPM is used to generate the key, since it doesn't release the private part. this option needs to be used with a FIPS approved TPM for the end result to be FIPS approved
2023-05-19 09:12:44 -07:00
John Safranek
f9dcab956e Configure Typo
1. The description text for the brainpool enable option in configure was
   using a shell variable that ended up in the output. Switched to the
   description pattern used in other options.
2023-05-18 10:51:04 -07:00
Daniel Pouzzner
42cce9d8e5 add --enable-linuxkm-benchmarks; add check for async.{c,h} when --enable-asynccrypt; update failure message for the opensslextra AC_CHECK_HEADER() test. 2023-05-17 01:03:26 -05:00
Sean Parkinson
55a91c2b55 Minor fixes
configure.ac: Don't use == in test.
client.c: Merge string to one line.
asn.c/asn_public.h:
  fix conversion warnings/errors.
  wc_Asn1_Print no longer public and doesn't need to check for NULL.
  wc_Asn1_PrintAll check all pointer parameters for NULL.
2023-05-05 08:43:50 +10:00
David Garske
6e572cc91d Merge pull request #6352 from SparkiDev/asn1_print
ASN.1 print utility: asn1
2023-05-04 10:55:47 -07:00
Sean Parkinson
d2afe9e5e0 Memory usage improvements
ECC: make private key field 'k' able to be smaller when ALT_ECC_SIZE is
defined.
WOLFSSL_SMALL_STACK_CACHE: allocate temps using new macros.
2023-05-04 10:26:57 +10:00
Sean Parkinson
9cdee20a7d ASN.1 print: implementation to parse and print added
New API to parse and print DER/BER data from a buffer.
Add an example to parse DER, Base64 and PEM files and print out ASN.1 items.
2023-05-04 09:57:44 +10:00
John Bland
6369b1e9ec Merge pull request #6371 from dgarske/lowres
Fixes and improvements for building with low footprint
2023-05-03 19:33:53 -04:00
David Garske
4b90afa37b Provide way to disable ASN but have wc_RsaPublicKeyDecodeRaw, which doesn't need ASN.1 parsing. 2023-05-02 18:10:25 -07:00
David Garske
61dfbf5ef2 Fixes and improvements for building with low footprint. Fix for ASN template with RSA verify only (was missing mp_leading_bit). Fix to allow disabling DRBG with crypto callbacks enabled. Updated the wolfTPM user_settings.h template with low resource option. 2023-05-02 16:51:41 -07:00
David Garske
ceeda82906 Add option to support disabling thread local --disable-threadlocal. Useful for cross-compile situation where thread local storage is not desired. ZD 16062 2023-05-01 15:51:22 -07:00
Daniel Pouzzner
3f60fa8c3b configure.ac: escape backslashes when generating preprocessor directives for .build_params; delete backslashes and process parenthesized arguments correctly when generating options.h. 2023-04-27 17:38:29 -05:00
Daniel Pouzzner
800f4df7a3 fix typos in configure.ac (from shellcheck --severity=warning). 2023-04-21 16:05:43 -05:00
Jacob Barthelmeh
cb9a121bd7 fix configure, compatibility layer needed big int. for BN use 2023-04-14 14:52:05 -06:00
JacobBarthelmeh
04ee247389 do not default to heapmath if no other math libraries found, add NO_BIG_INT as a math option in settings.h 2023-04-13 14:38:35 -07:00
JacobBarthelmeh
26a0142f51 add nomath option for builds without a math library 2023-04-12 15:33:59 -07:00
Sean Parkinson
10c1009bbd Merge pull request #6127 from JacobBarthelmeh/qnx
IMX6Q CAAM Port
2023-04-05 08:44:00 +10:00
JacobBarthelmeh
cb422bfaf7 Merge pull request #6242 from julek-wolfssl/harden-tls
Implement TLS recommendations from RFC 9325
2023-04-04 10:13:27 -06:00
JacobBarthelmeh
30adcd58d8 IMX6Q CAAM Port 2023-04-03 16:41:08 -06:00
Daniel Pouzzner
c08878ac94 configure.ac: include both -I. and -I$srcdir for "circular dependency" test, so that ${build_pwd}/wolfssl/options.h is found in out-of-tree builds; streamline scripting that dynamically sets $TRIM;
linuxkm/module_exports.c.template: include wolfssl/wolfcrypt/wolfmath.h, to bring in wc_GetMathInfo() prototype;

src/ssl.c: move "Global pointer to constant BN on" to src/ssl_bn.c; and in wolfSSL_Cleanup(), call the new wolfSSL_BN_free_one() rather than using ad hoc cleanup logic;

src/ssl_bn.c: add bn_one and wolfSSL_BN_free_one();

src/ssl_asn1.c: fix bugprone-macro-parentheses in bufLenOrNull(); refactor wolfSSL_ASN1_TIME_diff() to avoid floating point math; use intermediate tm_year variable in wolfssl_asn1_time_to_tm() to avoid target-specific type conflicts on tm->tm_year; use "FALL_THROUGH", not "/* fall-through */", in wolfSSL_ASN1_TYPE_set (clang-diagnostic-implicit-fallthrough);

wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mul2add();

wolfcrypt/src/integer.c: refactor OPT_CAST()s in mp_grow() to unconditional casts as elsewhere, to mollify a confused cppcheck-all-intmath;

tests/api.c: reformat some overlong lines.
2023-04-03 15:49:39 -05:00
Juliusz Sosinowicz
505ab746c6 Tabs -> spaces 2023-04-03 18:24:01 +02:00
JacobBarthelmeh
e1730c760c check if colrm is available for options.h creation 2023-03-29 14:11:56 -07:00
Lealem Amedie
6824166cf9 Add QAT flags to logic checking for dependencies 2023-03-28 12:44:22 -06:00
Juliusz Sosinowicz
7116f1e005 Add comment. 2023-03-28 14:14:40 +02:00
Juliusz Sosinowicz
f0ad01f552 Send secure renegotiation extension by default
- Add test for terminating the connection
- Add ProcessReplyEx(ssl, 1) to wolfSSL_accept
2023-03-28 12:43:53 +02:00
Juliusz Sosinowicz
c0b0c14a15 Allow user to choose between 112 and 128 bits of security 2023-03-27 15:42:19 +02:00
Juliusz Sosinowicz
e465089798 No old TLS check 2023-03-24 16:44:01 +01:00
Juliusz Sosinowicz
7791b8ff4d Add config option 2023-03-24 16:42:56 +01:00
JacobBarthelmeh
877e026da4 prepare for release 5.6.0 2023-03-23 21:44:18 -07:00
Daniel Pouzzner
0a90b2d354 configure.ac: further fix for header loop check -- construct header list while in $srcdir, so that -I${srcdir} works as expected. see earlier commits 7baddb04f8 a7d9ea7550 b3a1ac80dc . 2023-03-06 15:21:23 -06:00
Daniel Pouzzner
b3a1ac80dc configure.ac: don't check for opensslextra circular header dependencies if ENABLED_LINUXKM (handcrafted linuxkm/Makefile and linuxkm/Kbuild set up paths to correctly find dependencies like linux/mutex.h). 2023-03-04 12:12:08 -06:00
Daniel Pouzzner
ab71f6fd4c extend C89 build to whole codebase including examples:
configure.ac: remove implied --disable-examples when --disable-inline;

tests/api.c: always include wolfcrypt/src/misc.c;

wolfcrypt/src/misc.c: use WC_MISC_STATIC to designate staticness of the misc functions;

wolfssl/wolfcrypt/misc.h: define WC_MISC_STATIC to empty or static depending on #ifdef NO_INLINE or not (respectively);

wolfssl/wolfcrypt/types.h: #ifdef NO_INLINE, #define WC_INLINE WC_MAYBE_UNUSED, and move the definitions of WARN_UNUSED_RESULT and WC_MAYBE_UNUSED above the definition of WC_INLINE for clarity;

wolfssl/wolfcrypt/mem_track.h: always declare TrackMalloc() et al static (no functional change, because the state and callback bindings were and remain unconditionally static, but previously #ifdef NO_INLINE the functions were globals, leading to multiple definitions.
2023-03-03 22:30:08 -06:00
Daniel Pouzzner
a7d9ea7550 configure.ac: fix openssl header circular dependency detector to work on out-of-tree builds. 2023-03-03 21:56:42 -06:00
Juliusz Sosinowicz
7baddb04f8 Check for circular dependencies in compatibility headers (#6091)
* Check for circular dependencies in compatibility headers

* Run header check only when ENABLED_OPENSSLEXTRA

* Add missing include

* Pedantic compilers don't like empty translation units

* Fix macro guards
2023-03-02 08:51:13 -08:00
Sean Parkinson
cc8493668b SP: WOLFSSL_SP_SMALL_STACK
Defined when WOLFSSL_SMALL_STACK and !WOLFSSL_SP_NO_MALLOC or on
configuration line as an option to --enable-sp: smallstack.
2023-03-01 09:35:05 +10:00
Daniel Pouzzner
b133f6bbf7 20230223-refactor-test-c-error-codes (#6135)
* wolfcrypt/test/test.{c,h}: refactor to capture and encode error retvals using WC_TEST_RET_*() macros (based on line numbers), and print line and return code in err_sys().
* wolfcrypt/test/test.h: cast back to int in WC_TEST_RET_ENC(), to fix MSVC warning.
* configure.ac: add shake128 and shake256 to enable-all and enable-all-crypto;
* wolfcrypt/benchmark/benchmark.c: fix gating for bench_shake128() from !defined(WOLFSSL_NO_SHAKE128) to defined(WOLFSSL_SHAKE128).
* wolfcrypt/test/test.h: add WC_TEST_RET_TAG_* and WC_TEST_RET_DEC_TAG(), and refactor WC_TEST_RET_{ENC,DEC}_*() macros to implement the tag mechanism;
* add render_error_message() with tag-specific rendering of error strings;
* wolfcrypt/test/test.c: smallstack refactor of shake128_test() and shake128_absorb_test();
* wolfcrypt/test/test.c: change gating around mp_test() and related routines from defined(HAVE_VALGRIND) to defined(WOLFSSL_PUBLIC_MP);
* smallstack refactor of mp_test();
* refactor a slew of WC_TEST_RET_ENC_NC associated with XFOPEN/XFREAD to be WC_TEST_RET_ENC_ERRNO, and add error detection for XFREAD (previously silently tolerating zero retvals).
* wolfcrypt/test/test.c: build mp_test() only if WOLFSSL_SP_MATH_ALL or USE_FAST_MATH (in addition to WOLFSSL_PUBLIC_MP), because many general purpose functions such as sp_mulmod() are gated out in SP builds without WOLFSSL_SP_MATH_ALL.
* wolfcrypt/test/test.c: fix array bounds flubs in shake128_test();
* don't print_fiducials() in wolfcrypt_test() header, but rather, after render_error_message() in err_sys().
* wolfcrypt/test/test.{c,h}: wrap some overlong lines, and fix an unused-variable warning in mp_test_set_is_bit().
* wolfcrypt/test/test.c: fixes for several misplaced and several missing WC_TEST_RET_ENC_EC()s.
2023-02-28 13:02:37 -08:00
David Garske
5ec62c8d48 Merge pull request #6096 from SparkiDev/armv7a_neon_config
ARMv7a neon configure.ac
2023-02-20 15:22:20 -08:00
David Garske
d488693f15 Allow #define HAVE_LIBZ support in user_settings.h. 2023-02-16 14:20:57 -08:00
Sean Parkinson
85314e6ba5 ARMv7a neon configure.ac
Support other CPUs that start with armv7a.
2023-02-16 10:36:38 +10:00
Kaleb Himes
dead56b3cb Merge pull request #6086 from julek-wolfssl/explicit-rwlock
Make rwlock an explicit enable option
2023-02-14 15:04:13 -07:00
Juliusz Sosinowicz
0cedc4e1ac stunnel 5.67 support (#6020)
* stunnel 5.67 support

- ssl->session->ticketAdd may be set when parsing a ticket before PSK
- PSK binders should be calculated based on ciphersuite associated with PSK
- Add option to prioritise PSK order instead of ciphersuite order
- Update ctx->method->version when using Set_CTX_max_proto_version API
- Simplify wolfSSL_parse_cipher_list
  - Keep copy of old list and then add in the previous ciphersuites depending on whether we are doing only TLS 1.3 ciphersuites or not
- Specify CRL revocation in alert
  - Match reason string to match OpenSSL
- Add support for external data callbacks for WOLFSSL_SESSION

* Upref the session for stunnel instead of duplicating it

* Add small stack option for wolfSSL_parse_cipher_list
2023-02-14 09:38:28 -08:00