Commit Graph

135 Commits (ed2c20a3b2317f49b51daf54eb537304b0ded9a6)

Author SHA1 Message Date
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
David Garske b5163bd1fa Added support for 802.11Q VLAN frames. Fix build error with unused "ret" when building with `WOLFSSL_SNIFFER_WATCH`. Fixed bad characters in sniffer README.md configure example. 2020-09-24 13:05:01 -07:00
David Garske e6017de19d Fix in `snifftest` to try loading private key into static ephemeral and private key. Updated pcap files (were missing TCP packets). 2020-07-20 11:10:46 -07:00
David Garske 23a3ead758 Framework for new TLS v1.3 sniffer tests. 2020-07-17 15:56:56 -07:00
David Garske 1b051d9c5b TLS v1.3 sniffer support:
* Added TLS v1.3 sniffer support using static ephemeral key.
* Add support for using a static ephemeral DH and ECC keys with TLS v1.3 using `WOLFSSL_STATIC_EPHEMERAL`.
* Adds new API's `wolfSSL_CTX_set_ephemeral_key` and `wolfSSL_set_ephemeral_key`.
* Expanded TLS extension support in sniffer.
* Refactor of the handshake hashing code.
* Added parameter checking to the TLS v1.3 key derivations (protects use of "DoTls13Finished" if handshake resources have been free'd).
* Added support for loading DH keys via `wc_DhImportKeyPair` and `wc_DhExportKeyPair`, enabled with `WOLFSSL_DH_EXTRA`.
* Added sniffer documentation `sslSniffer/README.md`.
2020-07-17 15:22:35 -07:00
David Garske 3b86a4db20 Adding STM32CubeIDE support (and deprecation of OpenSTM32).
* Updated example to add support for CMSIS v2 and static memory.
* Improved example to support more build options.
* Added support for detecting Cube HAL and including `wolfSSL.wolfSSL_conf.h`.
2020-06-11 14:45:17 -07:00
Chris Conlon 45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -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 89ff909d73 Sniffer IPv6
1. Sorted out IPv6 configuration for sniff test.
2. Tests the sniffer using an IPv6 file.
2019-10-04 14:54:17 -07:00
John Safranek a5bfb8a18b Change the IP address wrappers to include the version. Makes comparing
easier. Hard-coded some IPv6 localhost tests.
2019-10-04 14:54:17 -07:00
John Safranek 841e469340 Convert the data the snifftest is about to print into printable text.
Anything that isprint() or isspace() is kept, anything else is changed
to a period.
2019-10-04 14:54:17 -07:00
John Safranek dea5e73852 Sniffer Chain Input
Add a new method for handling input records where the input is in the form of an iovec list.
2019-10-04 14:54:17 -07:00
John Safranek 62ac388f55 Store Data Callback
Added a callback and support to allow one to handle storing the data
directly without reallocating the data buffer. Also added an example
that uses this callback if the callback is enabled in the build.
2019-10-04 14:54:17 -07:00
John Safranek 4b0bb75909 Sniffer Watch Cert Chain Part 2
1. Check the sizes picked up out of the message against the expected
size of the record when looking at the certificate messages.
2. Renamed the cert and certSz in the watch callback with it being a
certChain.
2019-07-16 09:54:45 -07:00
John Safranek 21afcf17a8 Sniffer Watch Mode
1. Split the function ssl_SetWatchKey() into ssl_SetWatchKey_file()
which loads the key from a named file and ssl_SetWatchKey_buffer()
which loads the key from a provided buffer. file() uses buffer().
2019-07-01 13:50:28 -07:00
John Safranek 8be6c0c08c Sniffer Watch Mode
Add some tests for the Watch mode that will also work with static ECDH.
2019-07-01 13:50:28 -07:00
John Safranek b61803f165 Sniffer Watch Mode
Added the build option for the Watch mode for the sniffer. Instead of
setting a set of IP addresses and keys, you set a callback function.
When any TLS connection is started, the hook is called and a hash of the
peer certificate is given to the callback function. It has a chance to
load a private key into the sniffer session. Enable this option with the
build flag "WOLFSSL_SNIFFER_WATCH".
2019-07-01 13:50:28 -07:00
John Safranek 26384d4936 Sniffer Stats
Upgrade the sniffer stats to unsigned long ints.
2019-06-24 16:16:05 -07:00
John Safranek 8439beb525 Sniffer Statistics
1. Moved sslKeyFails.
2. Added sslEphemeralMisses, sslEncryptedConns, sslDecodeFails.
3. Removed the Rehandshake stats as the sniffer does not support rehandshaking.
4. Removed two of the per second stats as they seemed redundant.
5. Added a function to atomically read and reset the sniffer statistics.
2019-06-24 09:54:42 -07:00
John Safranek 9715431921 Sniffer Statistics
1. Wrapped the added code for statistics in a preprocessor guard.
2. Added a check for the current cipher suite and if it is on the list
of allowed suites. Guarded by the statistics option.
3. Added more statistics from the list.
2019-06-24 09:54:42 -07:00
John Safranek c600f7659a Sniffer Statistics
Added more of the statistics.
2019-06-24 09:54:42 -07:00
John Safranek 246c444b93 Updates for v4.0.0
Update the copyright dates on all the source files to the current year.
2019-03-15 10:37:36 -07:00
John Safranek 96b4ddad82 Sniffer Update
1. Collect the SSL Info capture into its own function.
2. Add a Trace function for the SSL Info.
3. When copying the IANA name for the cipher suite, use a strncpy
instead of a memcpy and cap the copy at the length of the destination.
Force a null terminator at the end of the destination, just in case.
4. Modify the snifftest to collect the SSL Info.
2018-11-21 11:29:28 -08:00
David Garske 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 2017-10-22 15:58:35 -07:00
Jacob Barthelmeh 1c17b8eed6 static analysis check of null dereference and memory management 2016-12-21 16:20:18 -07:00
Chris Conlon 2939c3ace1 add ssl_FreeZeroDecode() to sniffer.c 2016-03-31 13:25:39 -06:00
Jacob Barthelmeh e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -06:00
Kaleb Joseph Himes 2e88785358 Merge pull request #282 from dgarske/WinUserSettings
Refactor of Visual Studio projects to centralize preprocessors into IDE/WIN/user_settings.h
2016-02-09 09:27:32 -08:00
David Garske 97edaf88d4 Added the new IDE/WIN/user_settings.h to the include.am file. Changed the WOLFSSL library to use macro WOLFSSL_LIB for clarity. 2016-02-08 11:28:46 -08:00
David Garske cb3a9cc348 Removed the execute bit on all .c, .h, and .cs files. 2016-02-08 09:45:31 -08:00
David Garske 2db6246abc Fixed typo with testsuite preprocessor. Added missing chacha.c, chacha20_poly1305.c, pkcs7.c and poly1305.c. Also added the IDE/WIN/user_settings.h to the project so its easy to find. 2016-02-04 11:19:51 -08:00
David Garske 41f7cb0482 Forgot to change the testsuite and sslSniffer projects. Now these also use the IDE/WIN/user_settings.h. 2016-01-29 15:07:03 -08:00
toddouska 542b59d90a Merge pull request #150 from JacobBarthelmeh/master
Intel RSA IPP plug in
2015-10-27 16:57:32 -07:00
John Safranek a42308e28a Add function ssl_FreeDecodeBuffer() to release the sniffer allocated data buffer and reset the pointer. 2015-10-26 12:01:21 -07:00
Jacob Barthelmeh c132f9887e Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-10-19 13:56:39 -06:00
Jacob Barthelmeh ee5a11b8d9 Add Intel IPP crypto for RSA
add user-crypto makefile

update README for IPP crypto

place user crypto in wolfcrypt and use autotools

adjust distributed files

move openssl compatibility consumption

auto use IPP RSA -- IPP directory containing shared libraries local

return value of wolfSSL_BN and formating of debug

openssh testing

make sure IPP not built when fips is

ipp init to select correct optimizations -- static libraries on linux -- fast-rsa disabled by default

try to only set library once

only use static IPP if fast rsa is enabled

make print out for user crypto more pretty
2015-10-19 13:51:49 -06:00
toddouska 8595890c51 change sniffer decode data to pointer to pointer 2015-10-12 18:10:24 -07:00
John Safranek 1237b35bb8 add option to sniffer to try to restart decoding after an ACK fault 2015-10-02 11:26:45 -07:00
toddouska 2f1836d985 fix snifftest bsd build 2015-08-19 16:52:16 -07:00
toddouska 1e9647023c add snifftest script check to make check 2015-04-18 08:35:47 -07:00
Chris Conlon 4e6f619302 Merge pull request #46 from jay/add-dll-config-to-vcxproj
build: Add DLL configurations to wolfssl64.sln and all vcxproj files
2015-04-06 09:05:06 -06:00
Jay Satiro b8b13ad9e9 build: Revert using MSBuild property files to auto-detect platform toolset
Prior to this change I had added a .props file for each .vcxproj to
use MSBuild's $(DefaultPlatformToolset) as the the default for
$(PlatformToolset). Typically that configuration allows for the
appropriate toolset to be used no matter which version of VS2010+
the wolfssl64.sln and project files are opened in. Problem is when an
MSBuild was used from the command line to build the solution it got the
$(DefaultPlatformToolset) from a property file based on the solution
header (currently "Format Version 12.00" which maps to Visual Studio
2012) instead. Another side effect was it set the VisualStudioVersion
to 11.0 (n - 1; n in this case 12.0) which was incorrect.

To remedy the above this change reverts back to the old PlatformToolset
method where the v110 toolset (Visual Studio 2012) is specified in every
configuration in every vcxproj. The user will have to specify explicitly
a different toolset to override it (either via command line or the GUI)
if they are not using VS2012.

VS2010 example:
msbuild -p:Configuration="Debug" wolfssl64.sln -p:PlatformToolset=v100
2015-04-01 02:05:15 -04:00
toddouska e4ac398d98 fix snifftest bad include on windows 2015-03-27 09:55:54 -07:00
Jay Satiro 6e14362940 build: Add DLL configurations to wolfssl64.sln and all vcxproj files
- Remove extern from declspec in WOLFSSL_API macro.

- Add a property file to *.vcxproj so that $(DefaultPlatformToolset) is
available.

- Remove the specified platform toolset (VS 2012) in *.vcxproj.

This change allows the projects to use $(DefaultPlatformToolset) so that
they will be built using the default platform toolset for whatever
version of Visual Studio 2010+ that loads them.

- Add DLL Release and DLL Debug configurations to *.vcxproj except for
sslSniffer.vcxproj.

The sniffer uses internal library components that aren't exposed in the
wolfSSL DLL so it can only be built by linking to CyaSSL's static lib.

- Change intermediate output directory of obj files to
<current-dir-setting>\obj\.

The purpose of this change is to separate the output files from the
intermediate files because sometimes they can end up in the same dir.
2015-03-23 02:12:01 -04:00
toddouska 64d83c39a0 Merge https://github.com/kaleb-himes/wolfssl into kaleb-master 2015-03-18 14:25:31 -07:00
kaleb-himes fd772bb434 MSVS warning fixes for all solutions 2015-03-18 10:42:10 -06:00
toddouska 0b6c03ad06 snifftest.c needs socket.h included for AIX, john cyassl commit #a8803e1e16f23 2015-03-17 14:52:42 -07:00
kaleb-himes b849d1ca8b visual c name change 2015-01-13 13:42:49 -07:00
kaleb-himes a389620a29 Copyright (C) updates 2015-01-08 09:39:04 -07:00
Jacob Barthelmeh f516bcf1ce old cyassl header files adjusted 2015-01-07 13:11:37 -07:00
kaleb-himes 369a5f04a9 library wide licence update 2015-01-06 12:14:15 -07:00
kaleb-himes edf53a1ed0 new changes 2014-12-29 10:27:03 -07:00
John Safranek e35e02a283 Added SNI named keys to the sniffer. 2014-10-21 12:22:12 -07:00
toddouska 3d803653c6 add visual studio 64 project files to autoconf, fix distclcean 2014-05-20 13:45:11 -07:00
toddouska 744590c868 add visual studio 64bit solution for vs2012+ with custom build step for aesni 2014-05-20 13:27:03 -07:00
Chris Conlon be65f5d518 update FSF address, wolfSSL copyright 2014-04-11 15:58:58 -06:00
toddouska a0d4c34900 allow snifftest to handle jumbo frames + potential partial 16k record from previous data packet on the stack 2014-03-20 15:34:20 -07:00
toddouska 5efbf98f31 separate sniffer / snifftest ./configure build 2013-12-12 14:20:56 -08:00
toddouska 9e56ad262c fix snifftest pcap frees on file mode, close TraceFile on ssl_Free 2013-12-10 16:17:43 -08:00
toddouska b377a60596 add packet# length to snifftest output 2013-10-29 15:41:05 -07:00
toddouska de6b9bc6be fix sniffer with new decrypt/verify code 2013-10-28 17:18:41 -07:00
toddouska f535e5428e make sure all tests/examples *.c use settings.h correctly 2013-04-10 12:17:23 -07:00
toddouska d0e16d25b4 add error message for correct snifftest dir to run from 2013-03-12 16:32:16 -07:00
toddouska 44e0d7543c change copyright name with name change 2013-02-05 12:44:17 -08:00
toddouska f4f13371f9 update copyright date 2013-02-04 14:51:41 -08:00
toddouska 87fbf7df80 fix libtool leftovers for distclen when shared mode 2012-12-06 17:52:36 -08:00
John Safranek 0c9fe151de added configure option --disable-examples to remove example code build, configure runs make clean at the end, sniffer test isn't built if sniffer disabled 2012-11-29 11:31:57 -08:00
toddouska 51a8901f6a update sslSniffer/Test windows projects 2012-09-26 12:21:16 -07:00
toddouska d0affb0d0e fix snifftest and aesni with new warnings 2012-09-25 11:14:21 -07:00
toddouska 19e50cd46a fix old-style warnings 2012-09-20 12:11:42 -07:00
toddouska 206f565820 add password to snifftest command line 2012-09-18 09:34:45 -07:00
toddouska 638c095737 better error output for temp keys or compression on sniffer 2012-06-29 10:59:48 -07:00
toddouska 22cb11f304 add hello_request and session_ticket handling to sniffer 2012-06-28 13:37:19 -07:00
toddouska 2b6044c6ee add dump file option to snifftest, along with keyfile, optional server and port arguments 2012-05-20 12:46:50 -07:00
toddouska 84614da13e increase copyright date 2012 2012-02-13 11:54:10 -08:00
Todd A Ouska d99932962a change Visual Studio files to use new CyaSSL headers and layout, have examples and testsuite try to change to CyaSSL Home dir if not 2011-09-23 16:13:02 -07:00
Todd A Ouska 5876f4acf2 fix sniffer and hc128 builds 2011-08-24 17:39:23 -07:00
Todd A Ouska 000ffa54a4 add check around config.h for non autoconf systems 2011-08-24 16:37:16 -07:00
Todd A Ouska 5d49bf7cb0 Brian Aker commits plus some minor changes like AM_CFLAGS getting AC_SUBST and --enable-xxx #ifdef to new header layout 2011-08-24 15:54:58 -07:00
Chris Conlon ebc52e6941 Corrected spelling mistakes, formatting 2011-08-04 16:42:55 -06:00
Chris Conlon 667162df1b Add headers to examples and .i files 2011-07-26 13:27:22 -07:00
Todd A Ouska 8846b8cad5 use a single Makefile, no recursion 2011-04-26 17:45:41 -07:00
Todd A Ouska 6b88eb05b1 1.8.8 init 2011-02-05 11:14:47 -08:00