David Garske
4eb76e1d71
Fixes for building with IPV6. Added new WOLFSSL_IPV6 define to indicate IPV6 support. Fix to not include connect() and socket() calls unless HAVE_HTTP_CLIENT, HAVE_OCSP or HAVE_CRL_IO defined. Typo fixes.
2017-03-15 12:27:02 -07:00
David Garske
cf73a2244f
Fix for stray brace in wolfIO_TcpConnect. Fix to typedef sockaddr_in6 only when TEST_IPV6 is defined. Moved XSOCKLENT into io.h. Added useful WOLFSSL_NO_SOCK, which can be used with WOLFSSL_USER_IO.
2017-03-15 12:26:40 -07:00
David Garske
d3a07858c0
Fixes based on peer review feedback. Fix to only include the non-blocking / select timeout functions when HAVE_IO_TIMEOUT is defined. Fix to only include TCP connect if HAVE_GETADDRINFO or HAVE_SOCKADDR defined. Cleanup of the “struct sockaddr*” to use typedef with HAVE_SOCKADDR. Moved helpful XINET_* and XHTONS/XNTOHS macros to io.h.
2017-03-15 12:26:18 -07:00
David Garske
628f740363
Added support for inline CRL lookup when HAVE_CRL_IO is defined (shares code with OCSP lookup in io.c). Added http chunk transfer encoding support. Added default connection timeout value (DEFAULT_TIMEOUT_SEC) and new wolfIO_SetTimeout() API with HAVE_IO_TIMEOUT. Added generic wolfIO_ API’s for connect, select, non-blocking, read and write. Added new define USE_WOLFSSL_IO to enable access to new wolfIO_* socket wrappers even when WOLFSSL_USER_IO is defined. Moved all API declarations for io.c into new io.h header. Added HAVE_HTTP_CLIENT to expose HTTP API’s. Moved SOCKET_T and SOCKET_ defines into io.h. Added WOLFIO_DEBUG define to display request/responses.
2017-03-15 12:26:18 -07:00
David Garske
5a24fd9237
Fix TFM mp_set_int to handle long. Enhance mp_set_int to use mp_set if less than max mp_digit. Added new MP_SET_CHUNK_BITS to eliminate hard coded const’s and allow build time adjustment.
2017-03-15 12:23:50 -07:00
JacobBarthelmeh
4725a8aea6
Merge pull request #775 from SparkiDev/wpas
...
Changes for WPA Supplicant
2017-03-15 11:19:46 -06:00
toddouska
f38d23a315
Merge pull request #791 from dgarske/fix_ecc_test_curve_idx
...
Fix wc_ecc_export_point_der to use curve_id
2017-03-14 19:22:53 -07:00
toddouska
916a5c97ce
Merge pull request #793 from SparkiDev/scan_build
...
Fixes for scan-build
2017-03-14 19:19:09 -07:00
Sean Parkinson
003e18ecbc
Fixes for scan-build
2017-03-15 09:38:53 +10:00
Sean Parkinson
97b98c5c44
Changes from review
...
Add a free handshake resources API.
Rename to wolfSSL_KeepHandshakeResources().
Add APIs to indicate the client's preference order is to be used when
matching cipher suites.
2017-03-15 09:09:25 +10:00
Sean Parkinson
ac713e62c5
Code review fixes
...
Put back check for server end when setting DH.
Add option to keep resources rather than free after handshake.
2017-03-15 09:09:25 +10:00
Sean Parkinson
122f648fd8
Only support client preference order as default for WPAS.
2017-03-15 09:09:02 +10:00
Sean Parkinson
7897d04145
Need GetHMACSize and GetIVSize for wpas 2.0
2017-03-15 09:09:02 +10:00
Sean Parkinson
fd3093f937
Protect code with #ifdefs
2017-03-15 09:09:02 +10:00
Sean Parkinson
e2930b0a43
Changes for WPA Supplicant
2017-03-15 09:09:02 +10:00
toddouska
7bef7aaa81
Merge pull request #792 from SparkiDev/valgrind
...
Fix valgrind issues
2017-03-14 13:50:26 -07:00
toddouska
4210ce0f67
Merge pull request #789 from SparkiDev/jenkins
...
Fixes for extended configuration testing
2017-03-14 10:00:39 -07:00
toddouska
cccaa8671e
Merge pull request #778 from dgarske/intime_rtos
...
INtime RTOS port
2017-03-14 09:55:50 -07:00
David Garske
2fbce65975
Revert change in types.h for INTIME_RTOS. HAVE_THREAD_LS is not supported here, so don’t define out. Added note in INtime RTOS user_settings.h to indicate this.
2017-03-13 20:03:09 -07:00
David Garske
0eb01698f4
Fix for wolfCrypt ECC import/export point test to not use const idx and instead lookup using the “ecc_curve_id” enum value. Added new “wc_ecc_get_curve_idx” and “wc_ecc_get_curve_id” API’s. Redirected duplicate ECC function “wc_ecc_get_curve_name_from_id” to “wc_ecc_get_name”. Added “ECC_CURVE_INVALID” to indicate invalid curve_id.
2017-03-13 19:58:15 -07:00
Sean Parkinson
72728b21af
Undo as mp_digit is not allowed to get as large as tested
2017-03-14 10:23:13 +10:00
Sean Parkinson
81731df72f
Fix valgrind issues
...
Test program was re-using RSA and ECC key with multiple imports ops.
wc_RsaPublicKeyDecode() leaked if n parseable but not e.
2017-03-14 09:47:34 +10:00
David Garske
8a562c817c
Fix build issues with DEBUG_WOLFSSL defined. Fix typo in user_settings.h for DEBUG_WOLFSSL. Fix issue with example client waiting on local server (shouldn’t be). Updated README.md with example output.
2017-03-13 12:22:44 -07:00
David Garske
e98a0465ae
tenAsys INtime RTOS port. Porting complete for mutex semaphores, threading, file, socket and RNG. Added projects for libwolfssl and wolfExamples. The wolfExamples project includes examples for wolfCrypt Test/Benchmark and wolfSSL TLS client/server. Provided reference user_settings.h with comments and enable/disable gates. Added README.md with overview and instructions. Fixed issue building master with NO_WOLFSSL_DIR defined. Added check if old TLS is enabled that SHA and MD5 are enabled. Cleanup of the wolfCrypt test use of USE_CERT_BUFFERS with file system enabled.
2017-03-13 09:48:55 -07:00
Sean Parkinson
610ac07cd8
Add MP_MASK
2017-03-13 16:28:36 +10:00
Sean Parkinson
8ac2f5cb9c
Windows warning about negating unsigned fix
2017-03-13 12:29:58 +10:00
Sean Parkinson
d4f0c79272
Cast for Windows
2017-03-13 12:18:45 +10:00
Sean Parkinson
614231f71c
Fixes for extended configuration testing
2017-03-13 11:33:39 +10:00
toddouska
a6cbfe6f93
Merge pull request #787 from SparkiDev/def_p256
...
Fix elliptic curve selection.
2017-03-11 08:35:11 -08:00
toddouska
91737ceb3f
Merge pull request #786 from JacobBarthelmeh/Testing
...
Testing
2017-03-10 17:03:24 -08:00
Sean Parkinson
80fe2a3524
Fix elliptic curve selection.
...
Preference by:
1. the default for the curve strength (eccTempKeySz),
2. a curve at the curve strength (eccTempKeySz),
3. the default for next higher curve strength,
4. the first curve (client order) with the next highest curve strength
2017-03-11 10:17:15 +10:00
Jacob Barthelmeh
93f1e7cf2e
remove magic number in test case
2017-03-10 13:16:22 -07:00
Jacob Barthelmeh
bb81ea804c
add AES get key to ARMv8 port and add check for BASE 64 encode to tests
2017-03-10 09:55:27 -07:00
Jacob Barthelmeh
dee3159f0f
update byte size conversion
2017-03-10 09:39:18 -07:00
Jacob Barthelmeh
e8d97c9b1e
make test buffers large enough for results
2017-03-10 09:36:29 -07:00
toddouska
5a803730b8
Merge pull request #785 from SparkiDev/fixes
...
Fixes from merge of test coverage changes
2017-03-09 17:58:15 -08:00
toddouska
2b5dba798f
Merge pull request #783 from JacobBarthelmeh/Cert-Report1
...
Add error case for critical Subject Key ID extension
2017-03-09 15:39:23 -08:00
Sean Parkinson
5c9eedbf69
Fixes from merge of test coverage changes
...
Include new certificates in distribution.
Casting changes for clang.
Extra error code - recognize in test.
2017-03-10 09:15:18 +10:00
toddouska
2444a55afe
Merge pull request #708 from SparkiDev/test_cov
...
Extend testing for coverage
2017-03-09 12:52:17 -08:00
toddouska
2bb14903f9
Merge pull request #698 from SparkiDev/nginx
...
Get Nginx working with wolfSSL
2017-03-09 10:23:20 -08:00
toddouska
0e64c7708f
Merge pull request #769 from JacobBarthelmeh/Testing
...
Testing
2017-03-09 10:17:48 -08:00
Jacob Barthelmeh
fd50fd8a3e
Add error case for critical Subject Key ID extension
2017-03-08 16:40:07 -07:00
toddouska
df32c6fb0b
Merge pull request #782 from dgarske/ecc_mem
...
Fix to reduce ECC memory usage when async crypt is not enabled
2017-03-08 15:35:47 -08:00
toddouska
2b0963c42a
Merge pull request #780 from dgarske/crl_win
...
Fixes for building CRL with Windows
2017-03-08 15:31:02 -08:00
David Garske
a55ebb4c18
Fixes for building CRL with Windows. Refactor load_verify_buffer and LoadCRL to use new wc_ReadDir* functions. Added new directory/file API's: wc_ReadDirFirst(), wc_ReadDirNext(), wc_ReadDirClose(). Moved MAX_PATH and MAX_FILENAME_SZ to wc_port.h. Moved BAD_PATH_ERROR into error-crypt.h. The wc_ReadDir is only supported when NO_WOLFSSL_DIR and NO_FILESYSTEM are not defined. Add map to __FUNCTION__ macro in Windows with debug enabled (to resolve build error with VS and __func__ missing). Fix cast warning on response from EncodeOcspRequestExtensions. Fix for cast to call to BuildCertificateStatus.
2017-03-08 11:21:11 -08:00
Jacob Barthelmeh
a0effa6329
call mp_clear to match call to mp_init
2017-03-08 11:26:16 -07:00
David Garske
e115205d18
Fix to reduce ECC memory usage when async crypt is not enabled. Fix uses local for r and s instead of key->r and key->s.
2017-03-07 13:45:02 -08:00
toddouska
e7445b8e49
Merge pull request #781 from dgarske/fix_sb_int_dp
...
Fix integer.c scan-build warning for possible use of NULL dp
2017-03-07 12:03:20 -08:00
David Garske
be42a575da
Fix additional integer.c report of possible use of NULL dp (after normal math performance improvement to defer dp pointer alloc commit bdbb98ed20620618eebff003adc11fba4dee3041
2017-03-06 13:19:52 -08:00
JacobBarthelmeh
ebef5083ca
Merge pull request #777 from toddouska/dhpub
...
add check dh public key to agree()
2017-03-06 10:16:57 -07:00