Commit Graph

42 Commits (2f29ca1092f81f6ac557aa0210ac8dbd3dab15e7)

Author SHA1 Message Date
David Garske 9b6cf56a6e
Expanded support for Curve25519/Curve448 and TLS v1.3 sniffer (#4335)
* Fixes for building with Ed/Curve25519 only. Fix for IoT safe demo to exit after running once. Added `WOLFSSL_DH_EXTRA` to `--enable-all` and `--enable-sniffer`. Cleanup uses of `==` in configure.ac. Various spelling fixes.

* Fix for sniffer with TLS v1.3 session tickets.

* Fix for ASN Template Ed25519 key export (missing version / not setting OID correctly).

* Add key import/export support for Curve25519/Curve448. Refactor of the 25519/448 ASN code to combine duplicate code.

* Refactor of Curve25519 code. Improved public key export to handle generation when only private is set. Improved private scalar buffer sizing.

* Fix for static ephemeral loading of file buffer.

* Added sniffer Curve25519 support and test case.

* Fix for sniffer to not use ECC for X25519 if both are set.

* Fix Curve448 public export when only private is set.

* Fix for `dh_generate_test` for small stack size.

* Reduce stack size use on new asymmetric DER import/export functions. Cleanup pub length calc.

* Fix invalid comment.
2021-09-01 09:28:24 +10:00
Elms c17597a4fb build: arbitrary path for `make check`
To support builds in other directories, unit.test and wolfcrypt test
must be aware of the source and build directory.
2021-02-05 12:10:32 -08:00
David Garske d208779974 Added test case for TLS v1.3 with HRR (hello_retry_request) 2020-11-12 08:59:10 -08:00
Daniel Pouzzner 3858bda7e9 add "module", "modules_install", and "clean_module" rules to BUILD_LINUXKM section of Makefile.am, and add working install rule to linuxkm/Makefile, so that "make module" and "make modules_install" now work when --enable-linuxkm; fix "make dist" logic in Makefile.am and scripts/include.am to be unaffected by --enable-linuxkm; don't build wolfcrypt/benchmark or testwolfcrypt when --enable-linuxkm and --enable-crypttests. 2020-11-04 14:13:39 -06:00
Daniel Pouzzner 9df9fb7936 unit.test: add bwrap wrapper script at scripts/unit.test. 2020-09-17 12:03:44 -05:00
Daniel Pouzzner b669f8eeb9 scripts/: tweak scripts/include.am to run ocsp tests before rather than after testsuite and unit.test; revert POSIXish scripts/*.test to use /bin/sh. 2020-09-14 16:06:45 -05:00
David Garske 23a3ead758 Framework for new TLS v1.3 sniffer tests. 2020-07-17 15:56:56 -07:00
David Garske abee442c1e Useful script to cleanup test files created. 2019-11-18 15:08:54 -08:00
John Safranek 89db0da0aa Synchronous Quick Assist Support for Sniffer
1. Fixed a compiler warnings.
2. Fixed a memory issue when using the storage callback with QAT.
2019-10-08 16:49:38 -07:00
John Safranek b6b57154e5 Add the new IPv6 sniffer test file to the automake list. 2019-10-04 14:54:17 -07:00
kaleb-himes fdeb65dec8 WCv4.0.1-stable changes
CHAR_BIT to 8, simplify logic from peer review

Update build script
2019-07-16 15:58:56 -06:00
John Safranek 27ea9d9bce Configure Fixes
1. The combination enable-all and disable-rsa breaks some of the
testing. Added the NO_RSA guards as appropriate.
2. Disabled the OCSP stapling and CRL tests when RSA is disabled as they
use test certificates with RSA keys.
2019-03-13 17:54:33 -07:00
Jacob Barthelmeh 275667f0e9 remove ocsp attempt with ipv6 enabled 2019-02-13 19:01:09 -07:00
kaleb-himes ba3bc59771 further test control over ocsp-stapling tests 2018-08-10 11:44:16 -06:00
kaleb-himes 735e4a0986 ocsp stapling tests to wait until unit tests are complete 2018-08-10 11:18:04 -06:00
David Garske 72aef0ab11 Added handy script for converting DER file to C array. Example: `./scripts/dertoc.pl ./certs/server-cert.der server_cert_der_2048 server-cert.c`. 2018-07-31 15:57:02 -07:00
David Garske 2c3475c1d6 Added new build option `--enable-memtest` or `WOLFSSL_FORCE_MALLOC_FAIL_TEST` which enables random malloc failures for testing. This test supresses the `abort()` calls to detect seg faults. A new script `./scripts/memtest.sh` starts the test. If an issue is found it can be reviewed with the `./scripts/memtest.txt` log and reproduced using the seed printed at top of unit test as `--- RNG MALLOC FAIL AT 295---` and rerun using `./tests/unit.test 295`. 2018-07-30 13:53:35 -07:00
David Garske 89a4c98670 * Added support for expected fail test cases with example client/server and suites unit test.
* Added test for certificate with bad alt name containing a null character mid byte stream.
* Fix for issue with suites unit test where last arg in file doesn't conain data for a param, causing it to skip test.
* Fix for last test in tests/test.conf not being run for `TLSv1.2 RSA 3072-bit DH 3072-bit`.
* Moved the `tls-cert-fail.test` tests into the new expected failure suite test (`./tests/test-fails.conf`). Now it explicilty checks RSA and ECC for the no signer and no sig tests.
2018-05-03 09:40:51 -07:00
David Garske 024c8725ad Testing improvements for cert gen and TLS cert validation:
* Fixes to support certificate generation (`WOLFSSL_CERT_GEN`) without RSA enabled.
* Added new ECC CA for 384-bit tests.
* Created new server cert chain (ECC CA for 256-bit that signs server-ecc.pem)
* Created new `./certs/ecc/genecc.sh` script for generating all ECC CA's, generated server cert req (CSR), signing with CA and the required CRL.
* Moved the wolfCrypt ECC CA / ECC cert gen test into `ecc_test` as `ecc_test_cert_gen`.
* Refactor duplicate code that saves DER to disk, converts DER to PEM and saves PEM to disk into SaveDerAndPem function.
* Changed `ecc_test_make_pub` and `ecc_test_key_gen` to use XMALLOC for temp buffers (uses heap instead of stack).
* Cleanup to combine all certificate subject information into global `certDefaultName`.
* Updated cert request info to use wolfSSL instead of Yassl.
* Cleanup to combine keyUsage into `certKeyUsage` and `certKeyUsage2`.
* Re-number error codes in rsa_test.
* Moved the certext_test after the ecc_test, since it uses a file generated in `ecc_test_cert_gen`.
2017-10-19 16:17:51 -07:00
Sean Parkinson 038d16212f Fixes for LEANTLS and TLS13 builds 2017-07-26 10:43:36 +10:00
Moisés Guimarães 4bb17205fe adds new ocsp test 2017-06-21 14:12:12 -07:00
Sean Parkinson 2b1e9973ec Add TLS v1.3 as an option 2017-05-04 14:51:30 -07:00
toddouska 80cc737ffa add pkcallbacks script test 2016-12-06 11:27:05 -08:00
Nickolas Lapp c8b20d9090 Add support for dynamic session tickets, add openssl.test to testuiste 2016-04-22 10:35:44 -06:00
David Garske 993972162e MinGW fixes, server port assigning cleanup and ping test cleanup. Fixes issue with visibility detection with MinGW. The visibility.m4 script was not actually trying to call the hidden function, which caused MinGW to detect improperly that visibility was supported. Fix for bogusFile on Windows build. Fixes to build warnings for unused variable 'res' and signed/unsigned comparison for sizeof min(). Cleanup of the server side port assignment to allow use with Windows/MinGW/Cygwin. If Windows uses new GetRandomPort() function in test.h to get port in in the 49152 - 65535 range. If *nix then uses the tcp_listen returned port. Otherwise uses the default wolfSSLPort. Refactor of the ping test code to use common file and properly handle ping count differences (Windows "-c" vs. *Nix style "-n"). Workaround for MinGW and cyassl/options.h getting file permissions error. Added non-fatal compile warning if using MinGW that "strtok_s" might be missing along with a link to public domain source that can be used. 2016-04-08 11:48:14 -06:00
Jacob Barthelmeh db758dc98b update test script, fall back to cert name search, fix der free 2016-03-12 09:37:32 -07:00
Jacob Barthelmeh 060e278559 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into Certs 2016-03-11 23:48:39 -07:00
David Garske 0ed26ad262 Updated build for "leantls" to support building only the client, by splitting BUILD_EXAMPLES into 3 parts (BUILD_EXAPLE_SERVERS, BUILD_EXAMPLE_CLIENTS and BUILD_TESTS). This allows the make check to perform the external tests to validate the client only "leantls" configuration option. 2016-03-08 08:35:28 -08:00
Jacob Barthelmeh d969e2ba11 automated test for trusted peer certs 2016-03-02 11:42:00 -07:00
Jacob Barthelmeh 1197f88c4f add psk.test script for testing 2016-02-11 09:15:04 -07:00
Moisés Guimarães ec9d23a9c3 Merge branch 'csr' 2015-12-28 19:38:04 -03:00
toddouska f99d3067c9 sniffer dynamic buffer release 2015-10-23 16:56:17 -07:00
David Garske fdab3943be Added throughput benchmarking for client/server examples and added helper script "scripts/benchmark.test". Added example client option: "-B <num>" Benchmarking throughput. Added example server options: "-B <num>" Benchmark throughput, "-e" Echo data, "-i" Loop / Accept multiple connections. Cleanup of the include.am for examples. Cleanup of tcp_connect with DTLS enabled. Cleanup of the valid socket checking. Cleanup trailing whitespace. 2015-10-14 19:13:45 -07:00
toddouska 6d49c308b7 require WOLFSSL_OPENSSL_TEST set for scripts/openssl.test to run, also disable in ipv6 test case because openssl s_server doesn't accept ipv6 2015-10-06 17:02:31 -07:00
toddouska 236df9257b add openssl script suite test
switch to bash for 'read -ra <<<' for now
2015-10-05 15:33:37 -07:00
kaleb-himes 1a0a9de9c6 changes post review
crl-revoked dash compliant. revoked-cert has unique fields

new print statements
2015-07-23 17:05:25 -06:00
kaleb-himes 37211d4636 crl script initialize 2015-07-21 13:56:47 -06:00
toddouska 44db140076 move client-test.sh to scripts/google.test 2015-06-09 08:51:55 -07:00
toddouska c52b7160e9 fix ipv6 external test case 2015-05-07 12:15:58 -07:00
toddouska 08b6e66ea8 add external site script test to make check 2015-05-07 10:02:43 -07:00
toddouska d927aa4334 add resume test to example server and script test 2015-04-28 12:21:54 -07:00
toddouska 1e9647023c add snifftest script check to make check 2015-04-18 08:35:47 -07:00