wolfssl/tests
tmael 1106e5ff0e
TLS v1.3: Support a stateful ticket and test HAVE_EXT_CACHE (#5960)
* Add TLSv1.3 stateful support
Fix internal and external session cache

* session cache fixes

* Refactor

- implement wolfSSL_CTX_flush_sessions
- use wolfSSL_CTX_flush_sessions to make test_wolfSSL_CTX_add_session_ext deterministic
- add dtls to test_wolfSSL_CTX_add_session_ext
- DoClientTicket_ex does not modify ssl object
- only call session remove callback on:
  - timeout
  - session is being overwritten/removed from the cache

* Session fixes

- restore bogus ID on session duplicate
- don't evict on overwrite
- use memmove instead on memcpy as `ssl->session == session` is possible
- ignore ClientSession parameter in AddSessionToCache on NO_SESSION_CACHE_REF
- use sessionID when altSessionID not present

* Session fixes

- DoClientTicketFinalize: always copy in the ID as teh altSessionID
- don't overwrite ex_data when overwriting cacheSession and cacheSession owns it

* Callback wants to retain a copy

* wolfSSL_GetSessionClient: ssl->ctx->get_sess_cb does not apply here

* test_wolfSSL_CTX_add_session_ext 

gate expected results on WOLFSSL_DTLS_NO_HVR_ON_RESUME

* TlsSessionIdIsValid: copy return can't be ignored

* Silence unused parameter

* test_wolfSSL_CTX_add_session_ext: handle async case

* Gate wolfSSL_SSL_CTX_remove_session on NO_SESSION_CACHE

* ssl.c: style fixes

* Add twcase_get_sessionCb_cleanup to free external cache

* Remove hard tab

* Correct build error in wolfSSL_CTX_flush_sessions

* Jenkins fixes:

- altSessionID only available with WOLFSSL_TICKET_HAVE_ID
- slim out psk_sess_free_cb_ctx

* Stateful dtls case has 2 accesses. Stateless just one.

* Add version numbering to hostap logs

* Import internal.h for test_wolfSSL_SESSION_get_ex_new_index

* wolfSSL_SetSession: don't check SslSessionCacheOff for session setting

* wolfSSL_SetSession: fully set expired session for OpenSSL compatibility

* wolfSSL_SetSession: check if setting same object

* AddSession: always populate the session object to allow re-use

* Add logging to wolfSSL_NewSession and wolfSSL_FreeSession

* Always setup session object

* Check if session has been setup before setting it

* Print errors in async test

* Make SetupSession available outside NO_SESSION_CACHE

* Review comments

* Fix ticBuf leak and TlsSessionIdIsValid logic

* Fix unmatched curly brackets

* TlsSessionIdIsValid: always need to check copy var

* TlsResumptionIsValid: set resume to FALSE default

* wolfSSL_SetSession: remove now variable since only used in one place

* Move internalCacheLookupOff into HAVE_EXT_CACHE block

---------

Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2023-04-21 06:46:08 -07:00
..
CONF_FILES_README.md
NCONF_test.cnf
README
TXT_DB.txt
api.c TLS v1.3: Support a stateful ticket and test HAVE_EXT_CACHE (#5960) 2023-04-21 06:46:08 -07:00
hash.c
include.am
quic.c
srp.c
suites.c eliminate XREWIND() macro, add XSEEK_SET definitions, and refactor all XREWIND()s to XFSEEK()s, to fix clang-tidy-17 bugprone-unsafe-functions warning on rewind(); 2023-04-05 20:28:51 -05:00
test-altchains.conf
test-chains.conf
test-dhprime.conf
test-dtls-downgrade.conf
test-dtls-fails-cipher.conf
test-dtls-fails.conf
test-dtls-group.conf
test-dtls-mtu.conf
test-dtls-reneg-client.conf
test-dtls-reneg-server.conf
test-dtls-resume.conf
test-dtls-sha2.conf
test-dtls-srtp-fails.conf
test-dtls-srtp.conf
test-dtls.conf
test-dtls13-cid.conf
test-dtls13-downgrade-fails.conf
test-dtls13-downgrade.conf
test-dtls13-pq-2.conf
test-dtls13-pq.conf
test-dtls13-psk.conf
test-dtls13.conf
test-ecc-cust-curves.conf
test-ed448.conf
test-ed25519.conf
test-enckeys.conf
test-fails.conf
test-maxfrag-dtls.conf
test-maxfrag.conf
test-p521.conf
test-psk-no-id-sha2.conf
test-psk-no-id.conf
test-psk.conf
test-rsapss.conf
test-sctp-sha2.conf
test-sctp.conf
test-sha2.conf
test-sig.conf
test-tls-downgrade.conf
test-tls13-down.conf
test-tls13-ecc.conf
test-tls13-pq-2.conf
test-tls13-pq.conf
test-tls13-psk.conf
test-tls13.conf
test-trustpeer.conf
test.conf
unit.c
unit.h fix several more C89 "comma at end of enumerator list" spots in 64-bit-only headers, missed in earlier passes; in tests/unit.h, add a WOLF_C89 definition of AssertPtr() without pragmas, to avoid a -Wdeclaration-after-statement. 2023-04-18 12:23:24 -05:00
w64wrapper.c

README

Before creating any new configure files (.conf) read the CONF_FILES_README.md