/mbedtls-3.5.0/library/ |
D | ssl_tls.c | 444 static size_t ssl_tls12_session_save(const mbedtls_ssl_session *session, 449 static int ssl_tls12_session_load(mbedtls_ssl_session *session, 493 static void ssl_clear_peer_cert(mbedtls_ssl_session *session) in ssl_clear_peer_cert() argument 496 if (session->peer_cert != NULL) { in ssl_clear_peer_cert() 497 mbedtls_x509_crt_free(session->peer_cert); in ssl_clear_peer_cert() 498 mbedtls_free(session->peer_cert); in ssl_clear_peer_cert() 499 session->peer_cert = NULL; in ssl_clear_peer_cert() 502 if (session->peer_cert_digest != NULL) { in ssl_clear_peer_cert() 504 mbedtls_free(session->peer_cert_digest); in ssl_clear_peer_cert() 505 session->peer_cert_digest = NULL; in ssl_clear_peer_cert() [all …]
|
D | ssl_tls13_client.c | 681 mbedtls_ssl_session *session = ssl->session_negotiate; in ssl_tls13_has_configured_ticket() local 683 session != NULL && session->ticket != NULL && in ssl_tls13_has_configured_ticket() 686 session, MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ALL)); in ssl_tls13_has_configured_ticket() 692 mbedtls_ssl_session *session = ssl->session_negotiate; in ssl_tls13_early_data_has_valid_ticket() local 694 session->tls_version == MBEDTLS_SSL_VERSION_TLS1_3 && in ssl_tls13_early_data_has_valid_ticket() 695 (session->ticket_flags & in ssl_tls13_early_data_has_valid_ticket() 698 ssl, session->ciphersuite); in ssl_tls13_early_data_has_valid_ticket() 708 mbedtls_ssl_session *session = ssl->session_negotiate; in ssl_tls13_ticket_get_identity() local 714 *hash_alg = ssl_tls13_get_ciphersuite_hash_alg(session->ciphersuite); in ssl_tls13_ticket_get_identity() 715 *identity = session->ticket; in ssl_tls13_ticket_get_identity() [all …]
|
D | ssl_tls13_server.c | 114 mbedtls_ssl_session *session) in ssl_tls13_offered_psks_check_identity_match_ticket() argument 146 session, in ssl_tls13_offered_psks_check_identity_match_ticket() 174 session->ticket_flags); in ssl_tls13_offered_psks_check_identity_match_ticket() 178 session, in ssl_tls13_offered_psks_check_identity_match_ticket() 188 if (now < session->start) { in ssl_tls13_offered_psks_check_identity_match_ticket() 192 (long long) now, (long long) session->start)); in ssl_tls13_offered_psks_check_identity_match_ticket() 196 age_in_s = (uint64_t) (now - session->start); in ssl_tls13_offered_psks_check_identity_match_ticket() 229 age_diff_in_ms -= (obfuscated_ticket_age - session->ticket_age_add); in ssl_tls13_offered_psks_check_identity_match_ticket() 244 mbedtls_ssl_session_free(session); in ssl_tls13_offered_psks_check_identity_match_ticket() 259 mbedtls_ssl_session *session) in ssl_tls13_offered_psks_check_identity_match() argument [all …]
|
D | ssl_cache.c | 88 mbedtls_ssl_session *session) in mbedtls_ssl_cache_get() argument 105 ret = mbedtls_ssl_session_load(session, in mbedtls_ssl_cache_get() 106 entry->session, in mbedtls_ssl_cache_get() 132 if (entry->session != NULL) { in ssl_cache_entry_zeroize() 133 mbedtls_platform_zeroize(entry->session, entry->session_len); in ssl_cache_entry_zeroize() 134 mbedtls_free(entry->session); in ssl_cache_entry_zeroize() 241 if (cur->session != NULL) { in ssl_cache_pick_writing_slot() 260 const mbedtls_ssl_session *session) in mbedtls_ssl_cache_set() argument 284 ret = mbedtls_ssl_session_save(session, NULL, 0, &session_serialized_len); in mbedtls_ssl_cache_set() 297 ret = mbedtls_ssl_session_save(session, in mbedtls_ssl_cache_set() [all …]
|
D | ssl_ticket.c | 299 const mbedtls_ssl_session *session, in mbedtls_ssl_ticket_write() argument 349 if ((ret = mbedtls_ssl_session_save(session, in mbedtls_ssl_ticket_write() 418 mbedtls_ssl_session *session, in mbedtls_ssl_ticket_parse() argument 499 if ((ret = mbedtls_ssl_session_load(session, ticket, clear_len)) != 0) { in mbedtls_ssl_ticket_parse() 508 if (current_time < session->start || in mbedtls_ssl_ticket_parse() 509 (uint32_t) (current_time - session->start) > ctx->ticket_lifetime) { in mbedtls_ssl_ticket_parse()
|
D | ssl_tls12_server.c | 479 mbedtls_ssl_session session; in ssl_parse_session_ticket_ext() local 481 mbedtls_ssl_session_init(&session); in ssl_parse_session_ticket_ext() 507 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, &session, in ssl_parse_session_ticket_ext() 509 mbedtls_ssl_session_free(&session); in ssl_parse_session_ticket_ext() 526 session.id_len = ssl->session_negotiate->id_len; in ssl_parse_session_ticket_ext() 527 memcpy(&session.id, ssl->session_negotiate->id, session.id_len); in ssl_parse_session_ticket_ext() 530 memcpy(ssl->session_negotiate, &session, sizeof(mbedtls_ssl_session)); in ssl_parse_session_ticket_ext() 533 mbedtls_platform_zeroize(&session, sizeof(mbedtls_ssl_session)); in ssl_parse_session_ticket_ext() 2106 mbedtls_ssl_session * const session = ssl->session_negotiate; in ssl_handle_id_based_session_resumption() local 2113 if (session->id_len == 0) { in ssl_handle_id_based_session_resumption() [all …]
|
D | ssl_misc.h | 2740 int mbedtls_ssl_session_set_hostname(mbedtls_ssl_session *session, 2746 mbedtls_ssl_session *session, unsigned int flags) in mbedtls_ssl_session_get_ticket_flags() argument 2748 return session->ticket_flags & in mbedtls_ssl_session_get_ticket_flags() 2753 mbedtls_ssl_session *session, unsigned int flags) in mbedtls_ssl_session_set_ticket_flags() argument 2755 session->ticket_flags |= (flags & MBEDTLS_SSL_TLS1_3_TICKET_FLAGS_MASK); in mbedtls_ssl_session_set_ticket_flags() 2759 mbedtls_ssl_session *session, unsigned int flags) in mbedtls_ssl_session_clear_ticket_flags() argument 2761 session->ticket_flags &= ~(flags & MBEDTLS_SSL_TLS1_3_TICKET_FLAGS_MASK); in mbedtls_ssl_session_clear_ticket_flags()
|
D | ssl_tls13_generic.c | 1287 if (ssl->session) { in mbedtls_ssl_tls13_handshake_wrapup() 1288 mbedtls_ssl_session_free(ssl->session); in mbedtls_ssl_tls13_handshake_wrapup() 1289 mbedtls_free(ssl->session); in mbedtls_ssl_tls13_handshake_wrapup() 1291 ssl->session = ssl->session_negotiate; in mbedtls_ssl_tls13_handshake_wrapup()
|
D | ssl_tls12_client.c | 3441 if (ssl->session != NULL && ssl->session->ticket != NULL) { in ssl_parse_new_session_ticket() 3442 mbedtls_platform_zeroize(ssl->session->ticket, in ssl_parse_new_session_ticket() 3443 ssl->session->ticket_len); in ssl_parse_new_session_ticket() 3444 mbedtls_free(ssl->session->ticket); in ssl_parse_new_session_ticket() 3445 ssl->session->ticket = NULL; in ssl_parse_new_session_ticket() 3446 ssl->session->ticket_len = 0; in ssl_parse_new_session_ticket()
|
/mbedtls-3.5.0/tests/src/test_helpers/ |
D | ssl_helpers.c | 1440 int mbedtls_test_ssl_tls12_populate_session(mbedtls_ssl_session *session, in mbedtls_test_ssl_tls12_populate_session() argument 1445 session->start = mbedtls_time(NULL) - 42; in mbedtls_test_ssl_tls12_populate_session() 1447 session->tls_version = MBEDTLS_SSL_VERSION_TLS1_2; in mbedtls_test_ssl_tls12_populate_session() 1448 session->ciphersuite = 0xabcd; in mbedtls_test_ssl_tls12_populate_session() 1449 session->id_len = sizeof(session->id); in mbedtls_test_ssl_tls12_populate_session() 1450 memset(session->id, 66, session->id_len); in mbedtls_test_ssl_tls12_populate_session() 1451 memset(session->master, 17, sizeof(session->master)); in mbedtls_test_ssl_tls12_populate_session() 1466 session->peer_cert = mbedtls_calloc(1, sizeof(*session->peer_cert)); in mbedtls_test_ssl_tls12_populate_session() 1467 if (session->peer_cert == NULL) { in mbedtls_test_ssl_tls12_populate_session() 1470 *session->peer_cert = tmp_crt; in mbedtls_test_ssl_tls12_populate_session() [all …]
|
/mbedtls-3.5.0/include/mbedtls/ |
D | ssl_cache.h | 70 unsigned char *MBEDTLS_PRIVATE(session); /*!< serialized session */ 109 mbedtls_ssl_session *session); 124 const mbedtls_ssl_session *session);
|
D | ssl.h | 870 mbedtls_ssl_session *session); 892 const mbedtls_ssl_session *session); 1649 … mbedtls_ssl_session *MBEDTLS_PRIVATE(session); /*!< negotiated session data */ 2487 const mbedtls_ssl_session *session, 2517 mbedtls_ssl_session *session, 3064 int mbedtls_ssl_set_session(mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session); 3099 int mbedtls_ssl_session_load(mbedtls_ssl_session *session, 3128 int mbedtls_ssl_session_save(const mbedtls_ssl_session *session, 4656 mbedtls_ssl_session *session); 5298 void mbedtls_ssl_session_init(mbedtls_ssl_session *session); [all …]
|
/mbedtls-3.5.0/tests/suites/ |
D | test_suite_ssl.function | 2118 /* Prepare a dummy session to work on */ 2139 /* Restore session from serialized data */ 2143 * Make sure both session structures are identical 2255 mbedtls_ssl_session session; 2263 mbedtls_ssl_session_init(&session); 2265 /* Prepare a dummy session to work on */ 2271 &session, 0, endpoint_type) == 0); 2276 &session, ticket_len, crt_file) == 0); 2280 TEST_ASSERT(mbedtls_ssl_session_save(&session, NULL, 0, &len0) 2287 /* Serialize to buffer and free live session */ [all …]
|
D | test_suite_ssl.data | 815 SSL session serialization: Wrong major version 819 SSL session serialization: Wrong minor version 823 SSL session serialization: Wrong patch version 827 SSL session serialization: Wrong config 831 TLS 1.3: CLI: session serialization: Wrong major version 835 TLS 1.3: CLI: session serialization: Wrong minor version 839 TLS 1.3: CLI: session serialization: Wrong patch version 843 TLS 1.3: CLI: session serialization: Wrong config 847 TLS 1.3: SRV: session serialization: Wrong major version 851 TLS 1.3: SRV: session serialization: Wrong minor version [all …]
|
/mbedtls-3.5.0/tests/ |
D | Descriptions.txt | 21 covered by compat.sh: session resumption (using session cache or tickets),
|
/mbedtls-3.5.0/tests/include/test/ |
D | ssl_helpers.h | 486 int mbedtls_test_ssl_tls12_populate_session(mbedtls_ssl_session *session, 491 int mbedtls_test_ssl_tls13_populate_session(mbedtls_ssl_session *session,
|
/mbedtls-3.5.0/programs/ssl/ |
D | ssl_server2.c | 1388 int dummy_ticket_write(void *p_ticket, const mbedtls_ssl_session *session, in dummy_ticket_write() argument 1405 if ((ret = mbedtls_ssl_session_save(session, p, end - p, in dummy_ticket_write() 1415 int dummy_ticket_parse(void *p_ticket, mbedtls_ssl_session *session, in dummy_ticket_parse() argument 1421 if ((ret = mbedtls_ssl_session_load(session, buf + 4, len - 4)) != 0) { in dummy_ticket_parse() 1431 session->start = mbedtls_time(NULL) + 10; in dummy_ticket_parse() 1434 session->start = mbedtls_time(NULL) - 10 - 7 * 24 * 3600; in dummy_ticket_parse() 1437 session->start = mbedtls_time(NULL) - 10; in dummy_ticket_parse() 1440 session->start = mbedtls_time(NULL); in dummy_ticket_parse() 1442 session->ticket_age_add -= 1000; in dummy_ticket_parse() 1447 session->ticket_flags = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_NONE; in dummy_ticket_parse() [all …]
|
/mbedtls-3.5.0/docs/ |
D | 3.0-migration-guide.md | 844 1. Users who manually inspect parts of the current session through 847 2. Users of session resumption who query the current session 900 to configure a custom session cache implementation different 903 Those users will need to modify the API of their session cache 905 session IDs and values being instances of `mbedtls_ssl_session`: 911 mbedtls_ssl_session *session ); 915 const mbedtls_ssl_session *session ); 919 onwards, portable session cache implementations must not access fields of 921 find themselves unable to migrate their session cache functionality without 979 the same session. This use of `mbedtls_ssl_get_session()` [all …]
|
/mbedtls-3.5.0/ |
D | ChangeLog | 72 its session id. 118 * In TLS 1.3, when using a ticket for session resumption, tweak its age 172 * Fix TLS 1.3 session resumption when the established pre-shared key is 174 session where the cipher suite is TLS_AES_256_GCM_SHA384. 283 mechanism (session resumption). 312 calculation that can be used to derive the session secret in TLS 1.2, 379 * Fix TLS 1.3 session resumption. Fixes #6488. 546 an invalid session id length. 647 on DTLS 1.2 session resumption. After DTLS 1.2 session resumption with 770 and mbedtls_ssl_free() would cause an internal session buffer to [all …]
|
/mbedtls-3.5.0/programs/ |
D | README.md | 44 …ecure channel using RSA for authentication and Diffie-Hellman to generate a shared AES session key.
|
/mbedtls-3.5.0/docs/architecture/ |
D | tls13-support.md | 34 - Mbed TLS supports session resumption via the ticket mechanism.
|
/mbedtls-3.5.0/docs/architecture/psa-migration/ |
D | strategy.md | 11 G3. Allow isolation of short-term secrets (for example, TLS session keys).
|