Commit Graph

72 Commits

Author SHA1 Message Date
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