Commit Graph

132 Commits (bdd62314f00fca0e216bf8c963c8eeff6327e0cb)

Author SHA1 Message Date
res0nance 665fd89c55 win: add arm64 to sslsnifftest.vcxproj 2024-09-24 18:18:10 +08:00
res0nance f599a0a7c3 win: add arm64 to sslsniffer.vcxproj 2024-09-24 17:59:00 +08:00
Daniel Pouzzner a3fb5029f8 clean up trailing whitespace and misplaced CRLFs, add missing final newlines, remove stray UTF8 nonprintables (BOMs) and ASCIIfy stray homoglyphs (spaces and apostrophes), guided by expanded coverage in wolfssl-multi-test check-source-text. 2024-09-05 14:52:18 -05:00
Andras Fekete 208f2d6781 One more occurrence 2024-08-06 10:32:50 -04:00
JacobBarthelmeh 31a6a2bf59 update copyright to 2024 2024-07-19 13:15:05 -06:00
Brett Nicholas 15918d8ee6 First pass at TLS1.3 keylog file working 2023-08-24 13:04:59 -06:00
JacobBarthelmeh 3033371abc
Merge pull request #6717 from bigbrett/sniffer-keylogfile
sniffer keylog file support
2023-08-22 14:06:27 -06:00
Brett Nicholas 66c53b0996 Decoupled keylogfile registration and sniffer server creation APIs
fixed (very old) use-after-free found by ASAN

Updated documentation

review comments (spelling and housekeeping)
2023-08-22 11:29:58 -06:00
Brett Nicholas 2ee6a01d91 Initial sniffer keylog file support for TLS 1.2 2023-08-22 11:23:46 -06:00
Andras Fekete 44b634a597 More cleanup 2023-08-01 10:29:03 -04:00
Andras Fekete ab953c3141 Update VS project files 2023-07-31 15:37:48 -04:00
lealem47 a10526d5f9
Async sniffer: don't retry if seeing non-pending error (#6220)
* Async sniffer: don't retry if seeing non-pending error

* Print error messages when decrypting from queue

* Zeroize the SessionTable in ssl_FreeSniffer()

---------

Co-authored-by: Lealem Amedie <lealem47@github.com>
2023-04-24 13:51:55 -07:00
Jacob Barthelmeh 9dcc48c8f7 update copyright to 2023 2022-12-30 17:12:11 -07:00
Chris Conlon 9a7ff8773b add --with-libsuffix support, append suffix to library artifact name 2022-12-21 13:31:07 -07:00
David Garske 6be0512728 Peer review cleanups. 2022-12-14 09:25:04 -08:00
David Garske e33d59cd76 Review cleanups. 2022-12-13 10:55:22 -08:00
David Garske de22dbe61d Support for multi-threaded sniffer. Add support for atomic operations instead of mutex in wc_port.h. 2022-12-12 08:39:42 -08:00
Lealem Amedie c506812cf0 Improvement for some sniffer error messages 2022-12-02 13:27:29 -08:00
David Garske 20913a4201 Fix for sniffer with async to not terminate processing until all pending items have been processed. 2022-11-07 15:45:50 -08:00
David Garske fe28702891 Fixes for async sniffer handling of packets with multiple TLS messages. Other minor cleanups for spelling and `CheckPreRecord` `SnifferSession` deference. 2022-10-26 15:28:02 -07:00
Lealem Amedie b91e48d770 Add snifftest vcxproj file and documentation 2022-10-03 10:22:53 -07:00
David Garske 9d2ed67a5c Fix for sniffer to ensure the session was polled before trying to reprocess it. 2022-08-02 08:11:21 -07:00
David Garske 1c7f64cce9 Fixes for sniffer session ticket resumption with TLS v1.2. ZD14531. 2022-07-20 11:18:19 -07:00
Jacob Barthelmeh 8eaa85e412 update copyright year to 2022 2022-07-19 10:44:31 -06:00
David Garske d76c46a96f Fix for sniffer async issue with TLS v1.3. 2022-06-28 16:01:06 -07:00
David Garske 5ade360d9e Fix to avoid using `WC_HW_WAIT_E` for sniffer. ZD14398 2022-06-28 12:38:57 -07:00
Daniel Pouzzner ccc9b1535d fix whitespace. 2022-05-06 13:34:32 -05:00
David Garske 5f539b3921 Improve the sniffer asynchronous test case to support multiple concurrent streams. 2022-05-03 16:43:15 -07:00
David Garske f9acaab6fe Fix memory leak with pcap `bpf_program` not calling `pcap_freecode`. 2022-04-19 16:45:49 -07:00
David Garske 70a0983bbc Fix for minor warning with chain input enabled and async disabled. 2022-04-18 16:17:37 -07:00
David Garske 659d33fdaf Fixes for minor sniffer and async issues:
* Sniffer: Remove old restrictions for max strength, encrypt-then-mac and forcing openssl-extra.
* Fix bound warning with strncpy in sniffer.c.
* Fix for async DH issue.
* Fix for SP math all not initializing raw big int.
* Fix for array bounds warning with "-O3" on SetEccPublicKey.
* Fix a sniffer async edge case with TLS v1.2 static RSA and extended master.
* Improved the sniffer test script detection of features.
* Disable ECC custom curve test with Intel QuickAssist.
2022-04-18 11:46:40 -07:00
David Garske f129c32273 Fixes for whitespace, script bug and bit-field type. 2022-03-23 09:31:04 -07:00
David Garske 29c120356e Sniffer asynchronous support.
* Adds stateful handling of DH shared secret computation in `SetupKeys`.
* Improved the decrypt handling to use internal functions and avoid generating alerts on failures.
* Fix for sniffer resume due to missing `sessionIDSz` broken in #4807.
* Fix sniffer test cases to split resume (session_ticket) tests.
* Add `snifftest` list of build features so test script can gate running resume test.
2022-03-21 12:05:08 -07:00
Hayden Roche 6930cc0b21 Clean up Visual Studio output and intermediate directories.
Currently, wolfssl.vcxproj and IDE/WIN10/wolfssl-fips.vcxproj do not use the
same scheme for their output and intermediate directories. Further, across
configuration/platform combinations, wolfssl.vcxproj isn't consistent, either.
For example:

```
Release|x64
OutDir: $(SolutionDir)$(Platform)\$(Configuration)\
IntDir: $(Platform)\$(Configuration)\obj\

Release|Win32
OutDir: $(SolutionDir)$(Configuration)\
IntDir: $(Configuration)\obj\
```

This commit makes every configuration/platform combo for all Visual Studio
projects follow the same pattern:

```
OutDir: $(SolutionDir)$(Platform)\$(Configuration)\
IntDir: $(Configuration)\$(Platform)\$(ProjectName)_obj\
```

The `$(ProjectName)_obj` piece gets rid of a Visual Studio warning about not
mingling the intermediate objects of disparate builds.
2022-02-08 09:23:27 -08:00
Daniel Pouzzner 0b4f34d62a typographic cleanup: fix whitespace, remove unneeded UTF-8, convert C++ comment constructs to C. 2021-11-08 17:35:05 -06:00
Daniel Pouzzner 8f121e7752 file modes: clear inappropriate executable bits. 2021-11-08 17:28:11 -06:00
David Garske e4da9c6f48 Fix for sniffer key callback. Fix for building sniffer without RSA. Fix for wolfCrypt test cert ext without RSA. 2021-10-22 14:29:06 -07:00
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
David Garske 0ea5046b39 Improved documentation for sniffer statistics (ZD 12731). 2021-08-16 16:31:18 -07:00
David Garske 4f055653c7 Restore TLS v1.3 `hello_retry` behavior with session id. Fix for SNI with default (no name) putting newline due to fgets. 2021-07-08 13:50:08 -07:00
David Garske 4cb076f22b Cleanup to remove duplicate stat `sslResumptionValid`. Add print of `sslResumptionInserts`. 2021-07-08 09:49:13 -07:00
David Garske 2dd169f9a1 Added new sniffer API for callback for key use `ssl_SetKeyCallback`. Support indicated by `WOLFSSL_SNIFFER_KEY_CALLBACK`. Trace cleanup for custom error. 2021-07-02 12:18:56 -07:00
Jacob Barthelmeh c729318ddd update copyright date 2021-03-11 13:42:46 +07:00
David Garske ce0a2f3bc9 Fixes for Cavium Nitrox and Intel QuickAssist. 2020-12-17 15:53:28 -08:00
John Safranek 3e8bad7ae9
Sniffer Test Filename Fix
1. When using multiple filenames, keep the original entered string
   around so it may be reused for each IP address.
2. Strip the trailing newline from the entered filename list.
2020-12-08 17:16:34 -08:00
David Garske a6f2081af1 Fixes for key loading errors in snifftest application. 2020-11-12 08:59:11 -08:00
David Garske 5cda549d00 Allow passing multiple keys (comma separated) with the sniffer test tool. This allows setting both DH and ECC static ephemeral keys. Do not fail on resume not found. 2020-11-12 08:59:11 -08:00
David Garske 71d9f1e9bd Static ephemeral refactor to support loading both DHE and ECDHE keys. Added ability to specify key using snifftest input at run-time. Improved snifftest key loading for named keys and static ephemeral. 2020-11-12 08:59:11 -08:00
Hayden Roche 3b1c536418 Fix a couple of issues related to the sniffer.
- Fix an issue in sniffer.c where some pointer math was giving a warning.
- Fix an issue in snifftest.c where a local variable was never read.
- Ignore non-TCP/IP packets in snifftest.c. Fixes some tests with pcaps with
  other types of packets.
2020-11-04 10:46:11 -06:00
David Garske adedde7d16 Fix to not treat cert/key not found as error in `myWatchCb` and `WOLFSSL_SNIFFER_WATCH`. The key can be pased as argument to `./snifftest` and if built with sniffer watch let's keep trying to parse instead of throwing an error. 2020-09-24 13:05:01 -07:00