Lines Matching refs:session

268                        && s->session->ext.tick != NULL  in ossl_statem_client_read_transition()
796 s->session->cipher = s->s3.tmp.new_cipher; in ossl_statem_client_post_work()
798 s->session->compress_meth = 0; in ossl_statem_client_post_work()
801 s->session->compress_meth = 0; in ossl_statem_client_post_work()
803 s->session->compress_meth = s->s3.tmp.new_compression->id; in ossl_statem_client_post_work()
1101 SSL_SESSION *sess = s->session; in tls_construct_client_hello()
1187 session_id = s->session->session_id; in tls_construct_client_hello()
1188 if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) { in tls_construct_client_hello()
1204 assert(s->session->session_id_length <= sizeof(s->session->session_id)); in tls_construct_client_hello()
1205 sess_id_len = s->session->session_id_length; in tls_construct_client_hello()
1208 memcpy(s->tmp_session_id, s->session->session_id, sess_id_len); in tls_construct_client_hello()
1345 if (s->session->cipher != NULL) in set_client_ciphersuite()
1346 s->session->cipher_id = s->session->cipher->id; in set_client_ciphersuite()
1347 if (s->hit && (s->session->cipher_id != c->id)) { in set_client_ciphersuite()
1354 != ssl_md(s->ctx, s->session->cipher->algorithm2)) { in set_client_ciphersuite()
1417 if (session_id_len > sizeof(s->session->session_id) in tls_process_server_hello()
1526 && s->ext.session_secret_cb != NULL && s->session->ext.tick) { in tls_process_server_hello()
1533 master_key_length = sizeof(s->session->master_key); in tls_process_server_hello()
1534 if (s->ext.session_secret_cb(s, s->session->master_key, in tls_process_server_hello()
1539 s->session->master_key_length = master_key_length; in tls_process_server_hello()
1540 s->session->cipher = pref_cipher ? in tls_process_server_hello()
1549 && session_id_len == s->session->session_id_length in tls_process_server_hello()
1550 && memcmp(PACKET_data(&session_id), s->session->session_id, in tls_process_server_hello()
1556 if (s->sid_ctx_length != s->session->sid_ctx_length in tls_process_server_hello()
1557 || memcmp(s->session->sid_ctx, s->sid_ctx, s->sid_ctx_length)) { in tls_process_server_hello()
1571 if (s->session->session_id_length > 0) { in tls_process_server_hello()
1579 s->session->ssl_version = s->version; in tls_process_server_hello()
1587 s->session->session_id_length = session_id_len; in tls_process_server_hello()
1590 memcpy(s->session->session_id, PACKET_data(&session_id), in tls_process_server_hello()
1596 if (s->version != s->session->ssl_version) { in tls_process_server_hello()
1623 if (s->session->compress_meth != 0) { in tls_process_server_hello()
1628 if (s->hit && compression != s->session->compress_meth) { in tls_process_server_hello()
1775 if ((s->session->peer_chain = sk_X509_new_null()) == NULL) { in tls_process_server_certificate()
1834 if (!sk_X509_push(s->session->peer_chain, x)) { in tls_process_server_certificate()
1844 sk_X509_pop_free(s->session->peer_chain, X509_free); in tls_process_server_certificate()
1845 s->session->peer_chain = NULL; in tls_process_server_certificate()
1862 i = ssl_verify_cert_chain(s, s->session->peer_chain); in tls_post_process_server_certificate()
1892 x = sk_X509_value(s->session->peer_chain, 0); in tls_post_process_server_certificate()
1918 X509_free(s->session->peer); in tls_post_process_server_certificate()
1920 s->session->peer = x; in tls_post_process_server_certificate()
1921 s->session->verify_result = s->verify_result; in tls_post_process_server_certificate()
1958 OPENSSL_free(s->session->psk_identity_hint); in tls_process_ske_psk_preamble()
1959 s->session->psk_identity_hint = NULL; in tls_process_ske_psk_preamble()
1961 &s->session->psk_identity_hint)) { in tls_process_ske_psk_preamble()
2009 *pkey = X509_get0_pubkey(s->session->peer); in tls_process_ske_srp()
2097 *pkey = X509_get0_pubkey(s->session->peer); in tls_process_ske_dhe()
2162 *pkey = X509_get0_pubkey(s->session->peer); in tls_process_ske_ecdhe()
2164 *pkey = X509_get0_pubkey(s->session->peer); in tls_process_ske_ecdhe()
2168 s->session->kex_group = curve_id; in tls_process_ske_ecdhe()
2484 if (SSL_IS_TLS13(s) || s->session->session_id_length > 0) { in tls_process_new_session_ticket()
2491 if ((new_sess = ssl_session_dup(s->session, 0)) == 0) { in tls_process_new_session_ticket()
2503 SSL_CTX_remove_session(s->session_ctx, s->session); in tls_process_new_session_ticket()
2506 SSL_SESSION_free(s->session); in tls_process_new_session_ticket()
2507 s->session = new_sess; in tls_process_new_session_ticket()
2510 s->session->time = time(NULL); in tls_process_new_session_ticket()
2511 ssl_session_calculate_timeout(s->session); in tls_process_new_session_ticket()
2513 OPENSSL_free(s->session->ext.tick); in tls_process_new_session_ticket()
2514 s->session->ext.tick = NULL; in tls_process_new_session_ticket()
2515 s->session->ext.ticklen = 0; in tls_process_new_session_ticket()
2517 s->session->ext.tick = OPENSSL_malloc(ticklen); in tls_process_new_session_ticket()
2518 if (s->session->ext.tick == NULL) { in tls_process_new_session_ticket()
2522 if (!PACKET_copy_bytes(pkt, s->session->ext.tick, ticklen)) { in tls_process_new_session_ticket()
2527 s->session->ext.tick_lifetime_hint = ticket_lifetime_hint; in tls_process_new_session_ticket()
2528 s->session->ext.tick_age_add = age_add; in tls_process_new_session_ticket()
2529 s->session->ext.ticklen = ticklen; in tls_process_new_session_ticket()
2572 if (!EVP_Digest(s->session->ext.tick, ticklen, in tls_process_new_session_ticket()
2573 s->session->session_id, &sess_len, in tls_process_new_session_ticket()
2580 s->session->session_id_length = sess_len; in tls_process_new_session_ticket()
2581 s->session->not_resumable = 0; in tls_process_new_session_ticket()
2602 s->session->master_key, in tls_process_new_session_ticket()
2607 s->session->master_key_length = hashlen; in tls_process_new_session_ticket()
2763 psklen = s->psk_client_callback(s, s->session->psk_identity_hint, in tls_construct_cke_psk_preamble()
2793 OPENSSL_free(s->session->psk_identity); in tls_construct_cke_psk_preamble()
2794 s->session->psk_identity = tmpidentity; in tls_construct_cke_psk_preamble()
2826 if (s->session->peer == NULL) { in tls_construct_cke_rsa()
2834 pkey = X509_get0_pubkey(s->session->peer); in tls_construct_cke_rsa()
3024 peer_cert = s->session->peer; in tls_construct_cke_gost()
3186 peer_cert = s->session->peer; in tls_construct_cke_gost18()
3258 OPENSSL_free(s->session->srp_username); in tls_construct_cke_srp()
3259 s->session->srp_username = OPENSSL_strdup(s->srp_ctx.login); in tls_construct_cke_srp()
3260 if (s->session->srp_username == NULL) { in tls_construct_cke_srp()
3542 clu = ssl_cert_lookup_by_pkey(X509_get0_pubkey(s->session->peer), &idx); in ssl3_check_cert_and_algorithm()
3551 if (ssl_check_srvr_ecc_cert_and_alg(s->session->peer, s)) in ssl3_check_cert_and_algorithm()