Commit Graph

2239 Commits (dec78169bfb27ed2281d7cdb3dac3effbfc4fe1c)

Author SHA1 Message Date
Jacob Barthelmeh 9ee96c484b update macro guard 2021-09-17 13:17:05 -06:00
JacobBarthelmeh 60aa7b9a62 compat layer adjustments, pseudo rand update, fix for peek with ASN1_R_HEADER_TOO_LONG 2021-09-16 00:56:44 -07:00
Hideki Miyazaki d9767207b7
call alpn selection call-back at server side only (#4377)
* call alpn selection call-back at server side only

* addressed review comment

* addressed jenkins failure
2021-09-15 10:02:18 +10:00
Hideki Miyazaki 4d49ab6342
add store finished message on Tls13 (#4381)
* add to store finished message on Tls13

* addressed jenkins failure

* jenkins failures

sanity check for size before copying memory

* remove check of finishSz

* addressed review comments
2021-09-14 09:22:16 +10:00
David Garske b6665df6a8
Fixes for sniffer handling of TCP spurious retransmission (#4372)
* Fix for sniffer to better handle spurious retransmission edge case. ZD 12852

* Fix for sniffer to not send alerts during application data processing.

* Fix for missing semi-colon on XFREE.

* Fix for `bench_stats_print` with stack variable name used in `bench_ecc`. Improve benchmark thread cleanup, CPU count calcuation and stat blocking logic.
2021-09-08 09:40:58 +10:00
Hideki Miyazaki d4387493fb
keep CRLInfo at own cert memory (#4374) 2021-09-07 08:11:29 +10: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 2a6b8f4912
Merge pull request #4275 from JacobBarthelmeh/Compatibility-Layer
add set num tickets compat function
2021-08-30 09:26:49 -07:00
Chris Conlon 070029fd08 add support for WOLFSSL_VERIFY_POST_HANDSHAKE verify mode 2021-08-27 14:49:47 -06:00
Jacob Barthelmeh 40a4015491 add no server macro guard 2021-08-27 08:28:50 -06:00
David Garske ef0fb6520d
Merge pull request #4283 from JacobBarthelmeh/Compatibility-Layer-Part2
couple more compatibility functions
2021-08-26 11:50:09 -07:00
David Garske 700b1c56c1 Improve CRL error codes. Add `--enable-crl=io` option. ZD 12791 2021-08-24 11:12:12 -07:00
Jacob Barthelmeh da6e8d394f shift instead of multiply and add comment 2021-08-23 13:24:27 -06:00
John Safranek 18314e5a4f
Merge pull request #4309 from dgarske/sniff_cleanups
Improved sniffer statistics and documentation
2021-08-18 16:03:38 -07:00
John Safranek c2b88a1fca
Merge pull request #4306 from dgarske/pk_tls13
Fixes for PK callbacks with TLS v1.3
2021-08-18 15:42:19 -07:00
Sean Parkinson 8f7e09d9b5
Merge pull request #4294 from dgarske/tls13_earlydata
Fix early data max size handling in TLS v1.3
2021-08-18 08:48:42 +10:00
David Garske 69d01afd3a
Merge pull request #4250 from danielinux/iotsafe
IoT-Safe with TLS demo
2021-08-17 08:26:19 -07:00
David Garske 9898b5d82b Various spelling fixes. 2021-08-16 16:31:18 -07:00
David Garske 6ac03d41ef
Merge pull request #4203 from SparkiDev/tls13_peek_fix_off
TLS 1.3: ability to turn peek change off
2021-08-16 15:25:58 -07:00
Daniele Lacamera 490eeb4003 Support for IoT-Safe with TLS demo 2021-08-16 13:13:30 -07:00
David Garske 70535f51d5 Fixes for PK callbacks with TLS v1.3. Tested with `./configure --enable-pkcallbacks CFLAGS="-DTEST_PK_PRIVKEY -DDEBUG_PK_CB"`. 2021-08-16 13:09:17 -07:00
Juliusz Sosinowicz 6a5f40d698 Code review fixes. 2021-08-14 00:25:00 +02:00
Juliusz Sosinowicz d4391bd997 Parse distinguished names in `DoCertificateRequest`
The CA names sent by the server are now being parsed in `DoCertificateRequest` and are saved on a stack in `ssl->ca_names`.
2021-08-14 00:24:08 +02:00
Juliusz Sosinowicz 647e007eea Implement `wolfSSL_set_client_CA_list` and add 'HIGH' cipher suite 2021-08-14 00:24:08 +02:00
Chris Conlon ca06694bfb
Merge pull request #4282 from miyazakh/SSL_CIPHER_xx
Add SSL_CIPHER_get_xxx_nid support
2021-08-13 13:48:31 -06:00
Juliusz Sosinowicz 7dea1dcd39 OpenResty 1.13.6.2 and 1.19.3.1 support
# New or Updated APIs
- wolfSSL_get_tlsext_status_type
- wolfSSL_X509_chain_up_ref
- wolfSSL_get0_verified_chain
- SSL_CTX_set_cert_cb
- SSL_certs_clear
- SSL_add0_chain_cert ssl_cert_add0_chain_cert
- SSL_add1_chain_cert ssl_cert_add1_chain_cert
- sk_X509_NAME_new_null
- SSL_CTX_set_cert_cb
- SSL_set0_verify_cert_store
- SSL_set_client_CA_list

# Other Changes
- Ignore gdbinit
- Add api.c tests for new API
- Add `WOLFSSL_X509_STORE* x509_store_pt` to `WOLFSSL`
- Add macro to select the `WOLFSSL` specific store when available and the associated `WOLFSSL_CTX` store otherwise. Calls to `ssl->ctx->cm` and `ssl->ctx->x509_store*` were replaced by macros.
- NO-OP when setting existing store
- Add reference counter to `WOLFSSL_X509_STORE`
- Cleanup MD5 redundant declarations
- WOLFSSL_ERROR may map to nothing so make assignment outside of it
- refMutex fields are excluded with SINGLE_THREADED macro
- Chain cert refactor
- Make `wolfSSL_add0_chain_cert` and `wolfSSL_add1_chain_cert` not affect the context associated with the SSL object
- `wolfSSL_CTX_add1_chain_cert` now updates the `ctx->certChain` on success and stores the cert in `ctx->x509Chain` for later free'ing
2021-08-12 23:58:22 +02:00
David Garske 93a1fe4580
Merge pull request #4205 from julek-wolfssl/wpas-include-extra-stuff
Include stuff needed for EAP in hostap
2021-08-12 11:17:23 -07:00
Hideki Miyazaki 0b070166cb
addressed review comments 2021-08-12 10:44:07 +09:00
David Garske 9c3502bea9
Merge pull request #4285 from haydenroche5/alerts
During the handshake, make sure alerts are getting read on the client side in the event of an error.
2021-08-11 15:22:05 -07:00
David Garske 0c74e18eaf Fix early data max size handling. Fixes issue with size checking around `wolfSSL_CTX_set_max_early_data` and `wolfSSL_set_max_early_data`, which was checking against the padded size. Also was adding to the `earlyDataSz` and checking against it with un-padded data size. ZD 12632. 2021-08-10 16:32:41 -07:00
David Garske fdb6c8141e
Merge pull request #4274 from haydenroche5/pyopenssl
Add support for pyOpenSSL.
2021-08-10 11:49:07 -07:00
Hayden Roche ef5510cbcc During the handshake, make sure alerts are getting read on the client side in
the event of an error.
2021-08-09 14:26:53 -07:00
Hideki Miyazaki a066c48f55
fix jenkins failure 2021-08-07 11:13:41 +09:00
David Garske bd6b765b17
Merge pull request #4287 from ejohnstown/ac-upd
flags update
2021-08-06 16:22:15 -07:00
John Safranek 2c62880fd2
flags update
1. Fixed typo in ifdef for HAVE_ED448.
2. Fixed typos in comments in sha512.
3. Add include config.h to bio.c.
2021-08-06 11:28:20 -06:00
Hideki Miyazaki 67e773db91
implement SSL_CIPHER_xxxx 2021-08-05 09:42:55 +09:00
Hayden Roche 35a33b2f00 Add support for pyOpenSSL.
pyOpenSSL needs the OpenSSL function X509_EXTENSION_dup, so this commit adds
that to the compatibility layer. It also needs to be able to access the DER
encoding of the subject alt names in a cert, so that's added as well.
2021-08-04 14:08:43 -07:00
JacobBarthelmeh d39893baa0 add ctx set msg callback 2021-08-04 16:49:01 +07:00
JacobBarthelmeh b1212ff979 set the default number of tickets to 1 2021-08-04 14:40:17 +07:00
Juliusz Sosinowicz 46b061c7bc Include stuff needed for EAP in hostap
Patch that includes the API needed for EAP in hostapd and wpa_supplicant
2021-08-03 17:52:50 +02:00
JacobBarthelmeh 2479346f5c add set num tickets compat function 2021-08-02 23:47:53 +07:00
Per Allansson c41f10e708
CheckForAltNames fixes
- Missing conversion from char to unsigned char caused any IP
  address with a byte > 127 to be wrong
- IPv6 address was converted to wrong format XX:YY:...
   (which also caused a buffer overrun)
- Anything that is not an IPv4 or IPv6 address should be ignored
2021-07-28 09:46:33 +02:00
Sean Parkinson 9452c22653 Small configurations: get compiling
./configure --enable-psk -disable-rsa --disable-dh -disable-ecc
--disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-coding
--disable-filesystem CFLAGS=-DNO_WOLFSSL_SERVER

./configure --enable-psk -disable-rsa --disable-dh -disable-ecc
--disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-coding
--disable-filesystem CFLAGS=-DNO_WOLFSSL_CLIENT
2021-07-23 11:55:08 +10:00
Chris Conlon c544c19013
Merge pull request #4227 from miyazakh/ERR_lib_error_string
add ERR_lib_error_string compatibility layer API
2021-07-21 11:19:29 -06:00
Hideki Miyazaki b76d44dad9
add ERR_lib_error_string 2021-07-21 10:31:00 +09:00
David Garske 673becee74
Merge pull request #4210 from JacobBarthelmeh/Testing
handle edge case of input buffer malloc'd to location immediately aft…
2021-07-20 09:56:27 -07:00
Daniel Pouzzner 186ff2b365 make -DNO_ED25519_KEY_{IMPORT,EXPORT} buildable, and fix api.c and suites.c so that -DNO_ED*_KEY_{IMPORT,EXPORT} pass make check. 2021-07-16 23:07:28 -05:00
Daniel Pouzzner ac92204c15 make -DNO_ED448_KEY_{IMPORT,EXPORT} buildable 2021-07-16 18:21:30 -05:00
Daniel Pouzzner 9b43e57ccf ED: add streaming API to the ED verify routines: wc_ed*_verify_msg_init(), wc_ed*_verify_msg_update(), wc_ed*_verify_msg_final();
harmonize the ED448 API with the ED25519 API by making wc_ed448_verify_msg_ex() and wc_ed448_init_ex() public functions;

track devId and heap pointer in ed*_key.{devId,heap}, and pass them through to sha init functions;

add ed*_key.{sha,sha_clean_flag}, and ed*_hash_{reset,update,final} functions, and use them for all ED hashing ops, to support streaming API and for optimally efficient reuse for the preexisting ED calls;

add ed448_hash() akin to ed25519_hash(), and use it in place of wc_Shake256Hash(), for .sha_clean_flag dynamics.

add to wc_ed*_import_private_key() the ability to import the combined key generated by wc_ed*_export_private() without supplying the redundant public key;

add macro asserts near top of ed*.h to assure the required hash functions are available;

fix {NO,HAVE}_ED*_{SIGN,VERIFY};

wolfcrypt/test/test.c: add missing key initializations in ed*_test();

wolfcrypt/test/test.c: fix unaligned access in myDecryptionFunc() detected by -fsanitize=address,undefined.
2021-07-16 13:49:47 -05:00
Jacob Barthelmeh 12a4517d6b handle edge case of input buffer malloc'd to location immediately after output buffer 2021-07-15 22:38:48 +07:00
Sean Parkinson 2959902a10 TLS 1.3: ability to turn peek change off
Allow post-handshake peeking for handshaking messages to be disabled.
Not all customers want to handle this.
Clear WOLFSSL_ERROR_WANT_READ error on entry to ReceiveData which was
set when peeking found handshake message.
2021-07-15 10:14:13 +10:00
John Safranek f82fd01283
Merge pull request #4202 from JacobBarthelmeh/BuildOptions
fix for build with wpas and disable tls13
2021-07-14 09:07:08 -07:00
JacobBarthelmeh 18399091ce
Merge pull request #4012 from julek-wolfssl/haproxy
HaProxy 2.4-dev18 support
2021-07-14 15:46:04 +07:00
Jacob Barthelmeh 2592a04d8a fix for build with wpas and disable tls13 2021-07-13 15:49:40 +07:00
JacobBarthelmeh 7b9d6a3f5e
Merge pull request #3792 from TakayukiMatsuo/os_keylog
Add wolfSSL_CTX_set_keylog_callback
2021-07-07 15:34:33 +07:00
Juliusz Sosinowicz fc7533fe5e Code review changes 2021-07-06 16:14:25 +02:00
Juliusz Sosinowicz 1acf906612 Code review changes 2021-07-06 15:39:23 +02:00
Juliusz Sosinowicz 6dfc702364 Correct serverDH_Pub length on renegotiation
On a renegotiation the serverDH_Pub buffer may be too short. The previous DhGenKeyPair call may have generated a key that has a shorter binary representation (usually by one byte). Calling DhGenKeyPair with this shorter buffer results in a WC_KEY_SIZE_E error.
2021-07-06 15:39:23 +02:00
Juliusz Sosinowicz 1b6b16c2c3 HaProxy 2.4-dev18 support
*This patch is dependent on https://github.com/wolfSSL/wolfssl/pull/3871 because proto version selection logic is refactored in that pull request.*
This patch contains the following changes:
- Enable more options with `--enable-haproxy`
- Compatibility layer additions
    - `STACK_TYPE_X509_OBJ`
    - `OCSP_id_cmp`
    - `X509_STORE_get0_objects`
    - `X509V3_EXT_nconf_nid`
    - `X509V3_EXT_nconf`
    - `X509_chain_up_ref`
    - `X509_NAME_hash`
    - `sk_X509_NAME_new_null`
    - `X509_OBJECT_get0_X509`
    - `X509_OBJECT_get0_X509_CRL`
    - `ASN1_OCTET_STRING_free`
    - `X509_LOOKUP_TYPE`
    - `OSSL_HANDSHAKE_STATE`
- New `OPENSSL_COMPATIBLE_DEFAULTS` define will set default behaviour that is compatible with OpenSSL
    - WOLFSSL_CTX
        - Enable all compiled in protocols
        - Allow anonymous ciphers
        - Set message grouping
        - Set verify to SSL_VERIFY_NONE
- In `SetSSL_CTX`, don't change `send` and `recv` callback if currently using `BIO`
- `ssl->peerVerifyRet`
    - Return first that occured
    - Set correct value on date error
    - Set revoked error on OCSP or CRL error
    - Save value in session and restore on resumption
    - Add to session serialization
- With `OPENSSL_EXTRA`, send an alert on invalid downgrade attempt
- Handle sni callback `SSL_TLSEXT_ERR_NOACK`
- Add `WOLFSSL_VERIFY_DEFAULT` option for `wolfSSL_CTX_set_verify` and `wolfSSL_set_verify` to allow resetting to default behaviour
2021-07-06 15:39:23 +02:00
TakayukiMatsuo 5df0f7820a Add wolfSSL_CTX_set_keylog_callback 2021-07-03 14:51:23 +09:00
Elms 75e807abc6 Fixes for gcc-10 and `-fsanitize=undefined` for rabbit.c
* One introduced in #4156
* One from previous commit in this PR
2021-06-30 22:20:17 -07:00
Elms 56d879f422 address scan-build issues for clang 6 and 10 2021-06-30 21:58:30 -07:00
Elms dc7beab784 address errors with `-fsanitize=undefined`
- fix null dereferences or undefined `memcpy` calls
 - fix alignment in `myCryptoDevCb`
 - fix default dtls context assignment
 - add align configure option to force data alignment

TESTED:
 `./configure CFLAGS=-fsanitize=undefined\ -DWOLFSSL_GENERAL_ALIGNMENT=1 --enable-all`
2021-06-30 21:58:30 -07:00
Sean Parkinson f56bf3d8ee TLS: Get DH anon working TLS 1.2 and below
Send the server DH parameters in ServerKeyExchange.
./configure '--enable-anon' '--disable-rsa' '--enable-oldtls'
2021-06-29 10:29:39 +10:00
John Safranek 5437883da7
Merge pull request #4164 from dgarske/async_frag
Fix for async with fragmented packets
2021-06-25 08:33:50 -07:00
Sean Parkinson dab6724059 Regression fixes: more configurations
./configure --disable-rsa --disable-ecc --disable-dh --enable-curve25519
&& make
./configure --disable-aescbc --disable-chacha --disable-poly1305
--disable-coding && make
2021-06-25 15:23:51 +10:00
David Garske 45ef68d5c7 Fix for async with fragmented packets where inline crypto could be overwritten on reprocessing fragment. FIxes unit tests with `--enable-all --enable-asynccrypt`. Minor cleanup for line length and free verify RSA buffer sooner.
Reproducible with:

```
./examples/server/server -v 3 -l ECDHE-ECDSA-AES256-GCM-SHA384 -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem -2
./examples/client/client -v 3 -l ECDHE-ECDSA-AES256-GCM-SHA384 -A ./certs/ca-ecc-cert.pem -F 6 -2
```
2021-06-24 16:03:12 -07:00
David Garske 97ab1bb013
Merge pull request #4154 from SparkiDev/hmac_update_ct
TLS hmac: handle truncated mac in Hmac_UpdateFinal_CT()
2021-06-24 09:28:22 -07:00
Juliusz Sosinowicz 4eff3ff3dd Add a reason text for APP_DATA_READY 2021-06-23 13:43:56 +02:00
Sean Parkinson 5cf7e17820 TLS hmac: handle truncated mac in Hmac_UpdateFinal_CT() 2021-06-23 09:54:41 +10:00
John Safranek a5852fe440
Merge pull request #4119 from julek-wolfssl/dtls-seq-num-refactor
Refactor `dtls_expected_peer_handshake_number` handling
2021-06-22 16:29:45 -07:00
Sean Parkinson eccfb4f632
Merge pull request #4125 from dgarske/sniffer_etsi
TLS: Fixes for sniffer and static ephemeral keys
2021-06-23 09:17:13 +10:00
Chris Conlon 4b3bd3e384
Merge pull request #4049 from miyazakh/set_verifyDepth_3
Set verify depth limit
2021-06-22 10:23:43 -06:00
Chris Conlon b050463dce
Merge pull request #4059 from miyazakh/qt_unit_test
fix qt unit test
2021-06-22 10:12:48 -06:00
David Garske 67b87a8883
Merge pull request #4127 from douzzer/wolfsentry-client
outbound connection filtering and wolfSentry integration
2021-06-22 07:27:18 -07:00
David Garske c4ea64b7fc
Merge pull request #4140 from SparkiDev/set_sig_algs 2021-06-21 19:18:10 -07:00
Sean Parkinson 7224fcd9bc TLS: add support for user setting signature algorithms 2021-06-18 16:19:01 +10:00
Hideki Miyazaki 23fc810b3c
added more context 2021-06-18 11:10:13 +09:00
Hideki Miyazaki ddf2a0227f
additional fix for set verify depth to be compliant with openssl limit 2021-06-18 11:00:51 +09:00
Hideki Miyazaki 2bbf7cc0fb
addressed review comments 2021-06-18 10:49:24 +09:00
Daniel Pouzzner 93dfb4c7f4 add outbound connection filtering support to libwolfssl, add wolfSentry support to the test client, and add wolfSentry JSON config file support to the test client and server using --wolfsentry-config.
also, add mygetopt_long() to wolfssl/test.h, and add --help and Japanese counterpart options to test client and server.
2021-06-17 20:05:40 -05:00
Hideki Miyazaki 951de64e2c
set PSK at the beginning 2021-06-18 07:59:35 +09:00
Hideki Miyazaki 976b6ae97c
not push CA, revert error code when being OpensslExtra mode 2021-06-18 07:59:33 +09:00
Sean Parkinson 98ce4e901a TLS EtM: check all padding bytes are the same value
Must be constant time so as not to provide an oracle.
That is, don't leak length of data and padding.
2021-06-18 08:42:48 +10:00
David Garske 4bff3b6c69 Fix issue with WOLFSSL object copying CTX and object free'ing. Track ownership of the static key info. 2021-06-17 15:12:07 -07:00
Sean Parkinson 12c358bc30
Merge pull request #3979 from dgarske/tls13_async
Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
2021-06-15 10:02:19 +10:00
David Garske 831e1713f1
Merge pull request #4076 from TakayukiMatsuo/st_timeout
Add session ticket timeout check in DoSessionTicket
2021-06-14 13:44:32 -07:00
Juliusz Sosinowicz 1ee0c3a7fd Refactor `dtls_expected_peer_handshake_number` handling
Moving the `dtls_expected_peer_handshake_number` value along has been moved to one location. It has also been changed to not keep state before a cookie exchange has been completed.
2021-06-14 15:51:04 +02:00
David Garske 2e4e65f518 Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
* Added async support to `SendTls13ClientHello`, `DoTls13ServerHello` and `DoTls13ClientHello`.
* Cleanup of the example client/server use key share code.
* Fix some scan-build warnings.
ZD 12065
2021-06-11 14:12:12 -07:00
TakayukiMatsuo 1a9b59b183 Add macro guard for LowResTimer 2021-06-11 11:58:55 +09:00
John Safranek 4e881a226a
Merge pull request #4088 from julek-wolfssl/dtls-mtu-define
Change magic number 100 bytes to an enum define
2021-06-10 09:22:08 -07:00
Sean Parkinson 7e0c372e4c TLS 1.3 PSK: use the hash algorithm to choose cipher suite
See RFC 8446: 4.2.11
With TLS 1.3 PSK callback, If the returned cipher suite isn't available,
use the hash from the cipher suite and choose from available list.
Require exact match when: WOLFSSL_TLS13_PSK_NO_MATCH_HASH

Alternative callback for client added that is passed a cipher suite
string. Called for each cipher suite that is to be negotiated.
If cipher suite to be used with PSK then return client identity.
Returning an identity based on cipher suite hash will result in
only one PSK extension being added per hash.
2021-06-10 09:55:27 +10:00
David Garske c6c7dfd5db
Merge pull request #4053 from SparkiDev/cppcheck_fixes_6
cppcheck: fixes from reviewing report
2021-06-09 12:51:30 -07:00
David Garske a6edff7bd5
Merge pull request #4017 from SparkiDev/not_ecc_pk_cb
ECC: Disable ECC but have Curve25519/448 and PK callbacks fix
2021-06-09 12:38:37 -07:00
Sean Parkinson 8ee1dda2f9
Merge pull request #4001 from dgarske/time_long
Improve TLS v1.3 time rollover support and fixes for NO_ASN_TIME
2021-06-08 11:17:55 +10:00
Juliusz Sosinowicz 588a424d8d Change magic number 100 bytes to an enum define 2021-06-04 11:27:57 +02:00
David Garske 21060afb80 Fix for building SP math only (small) with key generation. Fix for WOLFSSL_EXTRA. Fix for RSA without PSS. Fix for ed25519 spelling error. 2021-06-03 10:56:54 -07:00
TakayukiMatsuo 69cf5ef266 Chage to use WOLFSSL_SESSION.bornON instead of WOLFSSL_SESSION.timestamp to hold the ticket creation time. 2021-06-01 15:30:07 +09:00
TakayukiMatsuo 5f7477980c Add session ticket timeout check in DoSessionTicket 2021-06-01 00:09:50 +09:00
Sean Parkinson 6747055d46 TLS: fix build with no TLSv12 but PK callbacks
./configure '--disable-tlsv12' '-enable-pkcallbacks'
Disable non-TLS13 cipher suite test as well.
2021-05-21 10:59:23 +10:00
Sean Parkinson 2c6285ccba cppcheck: fixes from reviewing report 2021-05-20 17:55:06 +10:00
Chris Conlon c75830e2e8
Merge pull request #4011 from miyazakh/set_verify_depth2
fix out of bound access when peer's chain is greater than verifyDepth + 1
2021-05-11 15:38:39 -06:00
John Safranek a608b083b4
Take into account a new flag in the DTLS state export and import. 2021-05-10 09:33:38 -07:00
Sean Parkinson 8779c3a884 ECC: Disable ECC but have Curve25519/448 and PK callbacks fix
Fix ed25519 certificates.
Tidy up testsuite.c
2021-05-10 10:32:55 +10:00
Hideki Miyazaki 0539b99c86
fix boundary access when peer's chain is less than verifyDepth + 1 2021-05-06 14:54:16 +09:00
David Garske f8ecd4b441 Fixes for building with `NO_ASN_TIME`. If used with TLS user must supply `LowResTimer` and `TimeNowInMilliseconds`. 2021-04-30 15:04:31 -07:00
Elms d20f7e7143 fix define gates for `AddFragHeaders` with DTLS
fixes build with `./configure --enable-dtls --disable-asn`
2021-04-24 07:23:50 -07:00
toddouska bbda833909
Merge pull request #3720 from elms/deos/project_files
DEOS: Add project files for shared library
2021-04-23 15:44:33 -07:00
Daniel Pouzzner 0cf9bacf1b WOLFSSL_WOLFSENTRY_HOOKS/HAVE_EX_DATA*: refactor wolfSSL_CRYPTO_cleanup_ex_data() to take only one arg (the WOLFSSL_CRYPTO_EX_DATA *); fix preprocessor gates on wolfSSL_set_ex_data() and wolfSSL_X509_get_ex_new_index(); fix line lengths. 2021-04-21 17:34:47 -05:00
Daniel Pouzzner 0afcd4227b ssl.c/internal.c: refactor _EX_DATA_CLEANUP_HOOKS cleanup in _free() routines to use a common wolfSSL_CRYPTO_cleanup_ex_data() routine; remove superfluous WOLFSSL_API qualifiers in ssl.c. 2021-04-21 12:20:56 -05:00
Daniel Pouzzner 23d8df720e remove WOLFSSL_NETWORK_INTROSPECTION code; add wolfSSL_X509_STORE_set_ex_data_with_cleanup(); refactor WOLFSSL_WOLFSENTRY_HOOKS code in server.c to use HAVE_EX_DATA/HAVE_EX_DATA_CLEANUP_HOOKS. 2021-04-20 23:59:58 -05:00
Daniel Pouzzner 4458ed37c1 fix a couple stray WOLFSSL_NETWORK_INTROSPECTION gates that needed to be WOLFSSL_WOLFSENTRY_HOOKS. 2021-04-20 23:59:58 -05:00
Daniel Pouzzner 1cbe696716 checkpoint: fully functioning demo via examples/server/ and unit.test (which produces a "filtered" error on a subtest when built --enable-wolfsentry). 2021-04-20 23:59:57 -05:00
Daniel Pouzzner 734860f535 WOLFSSL_NETWORK_INTROSPECTION WIP 2021-04-20 23:59:57 -05:00
Daniel Pouzzner ba2cc00e5d initial implementation of WOLFSSL_NETWORK_INTROSPECTION: --enable-network-introspection, struct wolfSSL_network_connection, wolfSSL_*_endpoints*(), NetworkFilterCallback_t, wolfSSL_*set_AcceptFilter(). 2021-04-20 23:59:57 -05:00
John Safranek 38ff193368
Merge pull request #3962 from julek-wolfssl/dtls-allow-future
Change default DTLS future packet behaviour
2021-04-20 17:32:42 -07:00
Elms 57f4adf438 DEOS: updated memory and add DTLS
Tested: DDC-I 9.2.0r94156 and OpenArbor on PPC hardware
2021-04-16 15:39:19 -07:00
Juliusz Sosinowicz 2bc2a911d7 Change default DTLS future packet behaviour
This is a better default for most users. Most users who make use of DTLS, allow messages from "too far into the future". It makes sense that DTLS may lose connection for a period of time and will lose all messages from this period. Losing connection effectively stalls the wolfSSL DTLS connection.
2021-04-16 19:27:39 +02:00
Juliusz Sosinowicz 70a3857ae8 Fragmentation for ServerKeyExchange and CeriticateVerify
- The `ssl->dtlsMtuSz` value is the maximum possible size of the DTLS record layer. We read `ssl->dtlsMtuSz + 100` in case peer has slightly different MTU set.
- The `-u` option in the examples takes the value of the MTU size.
- MTU tests are added in `tests/test-dtls-mtu.conf`
2021-04-16 17:30:51 +02:00
Juliusz Sosinowicz c6077b6767 Refactor DTLS MTU logic
- wolfSSL_GetMaxRecordSize will now take additional cipher data into account
- The set MTU size is understood as the maximum size of a DTLS record. The WOLFSSL_MAX_MTU was adjusted to account for UDP/IP headers.
2021-04-12 21:01:15 +02:00
toddouska 95b91d8913
Merge pull request #3886 from DKubasekRA/fix/RA/v4.7.0-coverity
RA - Fixes for Coverity issues
2021-03-31 10:41:54 -07:00
Stanislav Klima 6c7b3d806a Fixed modifying a const value. 2021-03-25 15:36:30 +01:00
John Safranek 8bee2af550
Merge pull request #3904 from julek-wolfssl/dtls-chacha-poly-fix
Chacha-Poly AEAD fix for SCR
2021-03-24 18:53:46 -07:00
John Safranek f2f2976e96
Merge pull request #3837 from haydenroche5/zd11808
Fix for ZD 11808.
2021-03-24 18:24:04 -07:00
Stanislav Klima ee79e1082a Updated fix of 58787. 2021-03-23 13:19:32 +01:00
Juliusz Sosinowicz 3abcdf059a Chacha-Poly AEAD fix for SCR
Wrong cipher material was being used when using Chacha-Poly AEAD for DTLS 1.2 with secure renegotiation
2021-03-23 10:38:48 +01:00
Stanislav Klima a8abeeb50e Fixed CID 58787. 2021-03-22 09:47:52 +01:00
Hideki Miyazaki ffa6a80725
addressed review comments part 4 2021-03-19 13:13:02 +09:00
Hideki Miyazaki c5327866a4
addressed review comments part 3 2021-03-19 13:13:01 +09:00
Hideki Miyazaki 84368eed3f
addressed review comment part 2 moving BY_DIR_xxx functions to internal 2021-03-19 13:13:00 +09:00
Hideki Miyazaki 4650aaf4fb
addressed review comments part 1 2021-03-19 13:13:00 +09:00
Hideki Miyazaki f9c9de5855
free Mutex 2021-03-19 13:12:59 +09:00
Hideki Miyazaki 2d79578eda
addressed jenkins failure
fix missing mutex initialization
2021-03-19 13:12:59 +09:00
Hideki Miyazaki a13784abe1
fixed jenkins failure 2021-03-19 13:12:58 +09:00
Hideki Miyazaki e73b06e797
add comments and description to new function and API 2021-03-19 13:12:57 +09:00
Hideki Miyazaki 39b0c4eaf8
fixed sanitize errors 2021-03-19 13:12:56 +09:00
Hideki Miyazaki b4a573ca98
Initial implemented X509_LOOKUP_ctrl L_ADD_DIR 2021-03-19 13:12:55 +09:00
David Garske e668b9b5d6
Merge pull request #3876 from kabuobeid/sslSuitesNullCheck
Fix missing NULL check in FreeSuites().  Fixes #3873.
2021-03-16 09:02:10 -07:00
toddouska 3ac03d3d66
Merge pull request #3805 from JacobBarthelmeh/copyright
update copyright date to 2021
2021-03-15 16:16:50 -07:00
Kareem Abuobeid 46b3beeccd Fix missing NULL check in FreeSuites(), with OPENSSL_ALL enabled, this was causing a segfault in when freeing a WOLFSSL object created with wolfSSL_write_dup(). 2021-03-15 16:15:21 -07:00
Sean Parkinson a55e94cf6f ECCSI and SAKKE: add support
Fixes for static code analysis included.
Added const to function parameters.
Zeroise some temporaries.
2021-03-12 09:31:22 +10:00
Jacob Barthelmeh c729318ddd update copyright date 2021-03-11 13:42:46 +07:00
John Safranek fceba6eb6f
Merge pull request #3860 from julek-wolfssl/scr-hello-verify
SCR cookie exchange shouldn't change seq and epoch numbers
2021-03-10 16:11:03 -08:00
toddouska 72eebd6e75
Merge pull request #3795 from JacobBarthelmeh/CAAM
Addition of QNX CAAM driver
2021-03-10 15:04:21 -08:00
Juliusz Sosinowicz 26fb658206 SCR cookie exchange shouldn't change seq and epoch numbers 2021-03-10 18:34:09 +01:00
JacobBarthelmeh 4ad1b52108
Merge pull request #3824 from julek-wolfssl/ssl-bio-use-chain
WOLFSSL_BIO_SSL BIO should use remaining chain for IO
2021-03-10 18:21:09 +07:00
Juliusz Sosinowicz d7838155e5 WOLFSSL_BIO_SSL BIO should use remaining chain for IO
This is accomplished by passing the next BIO in the chain in to the `wolfSSL_set_bio` API.
2021-03-10 10:13:42 +01:00
Juliusz Sosinowicz d4302cc71b Correctly reset the Tx sequence number
All DTLS records after the ClientHello should try to start from the sequence number of the ClientHello if it is available.
2021-03-09 18:30:10 +01:00
Stanislav Klima 9f9bf7345b Fixed CID 13482 2021-03-09 15:12:31 +01:00
Stanislav Klima 9e68d0d1a8 Fixed CID 586938 2021-03-09 12:30:39 +01:00