273 Commits

Author SHA1 Message Date
Andras Fekete
e487b73809 Reduce likelihood of two tests running and saving to the PCAP dump 2023-08-21 13:37:34 -04:00
Andras Fekete
307ce9d623 Only drop the first Nth packet, not every 2023-08-21 09:55:23 -04:00
Andras Fekete
bf438c85e1 Add in a marker to the PCAP file 2023-08-21 09:55:23 -04:00
Andras Fekete
dbd5d713e7 Add in a marker to the PCAP file 2023-08-18 14:10:47 -04:00
Andras Fekete
9a007604e4 Usage documentation 2023-08-18 14:05:07 -04:00
Andras Fekete
bea1b6f89b Use unique temp file names 2023-08-18 13:11:31 -04:00
Andras Fekete
3df434930e Add in total test run count 2023-08-18 13:06:13 -04:00
Andras Fekete
883d4dc219 Clean up the script 2023-08-18 13:04:36 -04:00
Andras Fekete
62bb434aa6 Remove debugging code 2023-08-18 11:14:50 -04:00
Andras Fekete
dfc4850e75 Add extra flags for DTLS1.3 2023-08-18 11:11:25 -04:00
Andras Fekete
e0b90a0463 Rename the script to be a bit more generic 2023-08-18 11:11:08 -04:00
Andras Fekete
8772d8b868 Able to adjust DTLS version globally 2023-08-18 11:05:36 -04:00
Andras Fekete
bad00ea9f7 Adding in tcpdump capture 2023-08-18 11:04:45 -04:00
Andras Fekete
f089b2c2f6 Clean up code 2023-08-18 10:21:44 -04:00
Andras Fekete
fea48e2505 Drop every i'th packet 2023-08-18 10:05:12 -04:00
Andras Fekete
49dc3a473b Run through all the tests and give a tally for failed 2023-08-18 10:03:58 -04:00
Andras Fekete
bc7c8af5de Massively simplified the tests 2023-08-18 09:41:13 -04:00
Andras Fekete
7023f86e66 Remove unnecessary code
'bc' is not installed in VM images. Don't want to run 'killall' in Jenkins tests
2023-08-16 16:01:47 -04:00
Andras Fekete
70e1ab7f0c Remove cyassl from wolfcrypt 2023-08-01 10:17:11 -04:00
JacobBarthelmeh
1285ae7816
Merge pull request #6506 from DimitriPapadopoulos/codespell
Fix typos found by codespell
2023-07-24 10:34:29 -06:00
Daniel Pouzzner
648f474d83 configure.ac:
if ENABLED_LINUXKM_PIE, add -DWOLFSSL_NO_OCSP_ISSUER_CHECK to gate out backward dependency in asn.c;

  if ENABLE_LINUXKM, don't error on FIPS without thread_ls_on;

  for --enable-curl, set ENABLED_MD4="yes", and move --enable-md4 AC_ARG_ENABLE() clause up to a position adjacent to des3 handling;

scripts/sniffer-gen.sh: fix illegal exit code (SC2242);

src/internal.c: fix clang-analyzer-core.NonNullParamChecker in CreateTicket();

src/ocsp.c: fix readability-redundant-preprocessor;

src/tls.c: fix empty-body in TLSX_PskKeModes_Parse() and clang-diagnostic-unreachable-code-break in ALPN_Select();

tests/api.c: fix several clang-analyzer-core.NullDereference related to Expect*() refactor;

wolfcrypt/src/asn.c:

  fix -Wconversions in DecodeAuthKeyId() and ParseCertRelative();

  fix readability-redundant-declaration re GetCA() and GetCAByName();

  gate inclusion of wolfssl/internal.h on !defined(WOLFCRYPT_ONLY);

wolfssl/internal.h: add macro-detection gating around GetCA() and GetCAByName() prototypes matching gates in wolfcrypt/src/asn.c;

tests/utils.c: in create_tmp_dir(), use one-arg variant of mkdir() if defined(__CYGWIN__) || defined(__MINGW32__).
2023-07-12 13:47:40 -05:00
Andras Fekete
266307da6c Add in ARIA wrappers
Address PR comments + other cleanup


Addressing PR comments


Minor change


Make sure the last line gets output as well


Add in ARIA SHA256 session to internal structure


Add in ARIA SHA384 session to internal structure


Add necessary function for ARIA to extract key


Fix unit tests


Rename HAVE_ARIAGCM to HAVE_ARIA


Move aria.* to wolfcrypt/port/aria


Separate out aria-crypt init functions


Adding in ECC+SHA callbacks


Avoid using AC_CHECK_FILE


Rename Aria to wc_Aria


Don't need special cases


Addressing PR comments


Code cleanup


C89 support


Remove TODO


Add documentation about buffer size


Clean up header files


Use ARIA_DEVID by default if available


Dummy update call to make MagicCrypto happy


Fix for detecting what algo type to use


Documentation


Use the appropriate sign/verify


Collect MagicCrypto functions together (and avoid leaks)


Fall back on other implementations on failure


Fix issue when compiling without CRYPTOCB


Addressing PR comments


Better cleanup


Addressing PR comments


Cleaner exit in case of error
2023-07-06 16:09:23 -04:00
Daniel Pouzzner
1912f1bc2a fixes for clang-analyzer-core.NullDereference, clang-analyzer-core.NonNullParamChecker, clang-analyzer-deadcode.DeadStores, readability-redundant-preprocessor, clang-diagnostic-unreachable-code-break, -Werror=sign-conversion, bugprone-macro-parentheses, "Call to 'malloc' has an allocation size of 0 bytes", clang-diagnostic-declaration-after-statement re tests/unit.h:ExpectPtr() pragmas. 2023-07-06 00:53:37 -05:00
Dimitri Papadopoulos
50752f5a2b
Fix typos found by codespell 2023-07-04 07:21:27 +02:00
Sean Parkinson
a39a04fc88 PEM example: new example for convert between PEM and DER
PEM example converts PEM to DER and DER to PEM.
Supports encrypting DER and writing out as PEM.

Added better support for 40-bit RC2-CBC PBE.
Added AES-128-CBC encryption support with PKCS#5v2.
Fixed handling of iterations to support writing 24-bit values.
Declared enum types for pass to PKCS#8 encryption APIs.

Add more DER and PEM files to certs directory.
Add testing of 'pem' with pem.test script.
2023-07-03 17:20:35 +10:00
Tesfa Mael
fd17fa3e9c Implement the option to disable CRL check
Do leaf CRL check by default
Correct wolfSSL_sk_X509_NAME_push return check
Update OpenSSL compatibility errors for HAProxy
Change X509_V to literal constant values
Fix the compat layer with TLS session ticket reuse
Fix for tls1_2 session resume and cache miss
Save intitial wolfSSL ctx
Check for OpenSSL CRL error code 23
2023-06-27 08:26:02 -07:00
David Garske
255aa774f2 Updated Keil MDK documentation to note RTOS and TCP default dependency. Fix for inline error due to tracking code being available too broadly. Use current branch for makedistsmall.sh. 2023-06-22 16:48:17 -06: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
JacobBarthelmeh
f1aa43dc48
Merge pull request #6230 from bandi13/zd15855
Fix for variable server startup time
2023-03-28 09:13:52 -06:00
Lealem Amedie
591089664d Fixes for sniffer with enable all 2023-03-27 16:37:14 -06:00
Andras Fekete
d57d6d2b78 Fix for variable server startup time 2023-03-23 15:03:26 -04:00
Andras Fekete
c56c4ef7ce Hacky workaround to be able to put/remove files in certs folder 2023-03-13 10:37:21 -04:00
Andras Fekete
e2a1ab9e49 Fix possible timing issue with other tests copying the certs folder 2023-03-10 15:35:03 -05:00
David Garske
24fd561bf8
Merge pull request #6099 from bandi13/ocsp-cleanup
Be more aggressive in killing processes
2023-02-17 09:28:14 -08:00
Andras Fekete
fdb0338473 Be more aggressive in killing processes 2023-02-16 09:55:52 -05:00
David Garske
100ec1e7e6 Fix ./scripts/makedistsmall.sh for Docker and RTOS. 2023-02-14 14:25:40 -08:00
David Garske
023db01aca * Fixed some build configuration variations.
* Fixed `PEM_BUFSIZE` macro redefined when building with coexist.
* Updated the `user_settings_all.h` and `user_settings_wolfboot_keytools.h` to include latest options.
* Improved API unit test error case checking where `TEST_RES_CHECK` is not used.
* Changed `TEST_SKIPPED` to unique value.
* Added CI tests for enable-all, small stack, and user setting templates.
2023-01-03 10:59:59 -08:00
Daniel Pouzzner
67c194edf8 scripts/user_settings_asm.sh: give priority to user_settings.h found via the supplied search path arguments, and fall back to current directory; use POSIX sh variable expansions for prefix trimming and variable existence testing; trim trailing slash from supplied search path arguments; direct error messages to stderr. 2022-10-12 11:20:56 -05:00
Juliusz Sosinowicz
b45ab0ae15 Add dtlscid.test to make check testing 2022-10-07 10:44:42 +02:00
Hayden Roche
3bcd4b45df Generate an assembler-safe user_settings.h in configure.ac and CMakeLists.txt.
For user_settings.h builds, .S assembly files need to include user_settings.h
in order to get the defines used by the build. However, a user_settings.h may
contain code only understood by a C compiler and not the assembler (e.g. a
typedef). This commit makes it so our autotools and CMake builds produce a file
user_settings_asm.h when doing a user_settings.h build. This generated header
contains only the preprocessor directives from the user_settings.h. As a result,
it can be safely included by our assembly code files.
2022-10-03 16:00:32 -07:00
Daniel Pouzzner
e9520fe131 shellcheck-guided fixes in IDE/XilinxSDK/bench.sh, IDE/XilinxSDK/combine.sh, IDE/XilinxSDK/graph.sh, and scripts/bench/bench_functions.sh. 2022-09-30 12:05:40 -05:00
David Garske
5524500e85
Merge pull request #5166 from sjaeckel/versal-bringup
Versal bringup
2022-09-29 13:27:13 -07:00
David Garske
a5a9ab96e6
Merge pull request #5524 from rizlik/protocol_version_alerts
Dtls13: improvements
2022-09-29 10:59:06 -07:00
Steffen Jaeckel
0e57e9858f Integrate Xilinx Versal
* add Versal specific glue
   The same structure of an "XSecure client" is used throughout the API's,
   therefor define it once and re-use in all clients.
* integrate Versal AES-GCM engine
* integrate Versal SHA3-384 engine
* add versal support to tests
  - There's no intermediate-hash API for Versal.
* add specific test with large AAD
   Test only with `n*16 byte` wide chunks of AAD, so it gets processed in the
   hardware engine.
* add specific test with misaligned AES-GCM arguments
* integrate Versal RSA engine
* disable failing RSA test-case when Xilinx Crypto is enabled
* introduce define `WOLFSSL_XILINX_CRYPT_VERSAL`
* integrate Versal TRNG engine
* allow using Versal TRNG w/o wolfcrypt DRBG
   Versal TRNG already provides a HRNG mode which does the same as the
   wolfcrypt DRBG implementation.
* add support for user-supplied nonce to Versal TRNG
* add `wc_XsecureErrorToString()` to map PLM error codes to messages.
* integrate Versal EcDSA engine
* update tests to work with Versal EcDSA
   If deterministic K is enabled, the tests failed here since the Versal
   EcDSA engine doesn't support the SECP256R1 curve yet.
* Xilinx crypto engines like aligned memory very much
   Make this a default choice, not via the user configuration.
* add Xilinx-specific `WOLFSSL_MSG()` equivalent
   `WOLFSSL_XIL_MSG()` does the same as `WOLFSSL_MSG()` besides waiting for
   1 second before printing to stdout, since the PLM maybe prints to same and
   outputs would be mixed up.
   This waiting can be disabled by defining `WOLFSSL_XIL_MSG_NO_SLEEP`.
* add option to enable DPA CounterMeasures in AES-GCM crypto engine
* add "command mode" to Xilinx bare-metal example
* update Xilinx default user settings
* add script to execute benchmarks
* add scripts to create graphics
* add Vitis 2022.1 example projects

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-09-29 09:39:57 -06:00
Juliusz Sosinowicz
145086f776 DTLS 1.3: Clear ssl->dtls13SendingAckOrRtx in ssl.c 2022-09-28 18:42:38 +02:00
Juliusz Sosinowicz
f9b2ef47c9 dtls13.test: Allow setting UDP_PROXY_PATH in env 2022-09-21 16:49:53 +02:00
kaleb-himes
9a193a3e02 Address Issue pointed out in (now deleted) comment on an old merge 2022-09-18 08:45:18 -06:00
Marco Oliverio
f3262005e4 add basic ConnectionID DTLS tests 2022-08-23 16:58:24 +02:00
kaleb-himes
77dec16b3b Supplemental fix in addition to #5470 2022-08-22 08:00:40 -06:00
kaleb-himes
1dd318741d Allow for renegotiation testing with openssl 3.0 installed on jenkins slaves (also tested with openssl 1.1) 2022-08-15 16:33:06 -06:00