Lines Matching refs:session

44     return sc->session->peer_rpk != NULL || sc->session->peer != NULL;  in received_server_cert()
293 && s->session->ext.tick != NULL in ossl_statem_client_read_transition()
855 s->session->cipher = s->s3.tmp.new_cipher; in ossl_statem_client_post_work()
857 s->session->compress_meth = 0; in ossl_statem_client_post_work()
860 s->session->compress_meth = 0; in ossl_statem_client_post_work()
862 s->session->compress_meth = s->s3.tmp.new_compression->id; in ossl_statem_client_post_work()
1172 SSL_SESSION *sess = s->session; in tls_construct_client_hello()
1259 session_id = s->session->session_id; in tls_construct_client_hello()
1260 if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) { in tls_construct_client_hello()
1276 assert(s->session->session_id_length <= sizeof(s->session->session_id)); in tls_construct_client_hello()
1277 sess_id_len = s->session->session_id_length; in tls_construct_client_hello()
1280 memcpy(s->tmp_session_id, s->session->session_id, sess_id_len); in tls_construct_client_hello()
1421 if (s->session->cipher != NULL) in set_client_ciphersuite()
1422 s->session->cipher_id = s->session->cipher->id; in set_client_ciphersuite()
1423 if (s->hit && (s->session->cipher_id != c->id)) { in set_client_ciphersuite()
1427 if (!ossl_assert(s->session->cipher != NULL)) { in set_client_ciphersuite()
1436 || md != ssl_md(sctx, s->session->cipher->algorithm2)) { in set_client_ciphersuite()
1510 if (session_id_len > sizeof(s->session->session_id) in tls_process_server_hello()
1619 && s->ext.session_secret_cb != NULL && s->session->ext.tick) { in tls_process_server_hello()
1627 master_key_length = sizeof(s->session->master_key); in tls_process_server_hello()
1628 if (s->ext.session_secret_cb(ussl, s->session->master_key, in tls_process_server_hello()
1633 s->session->master_key_length = master_key_length; in tls_process_server_hello()
1634 s->session->cipher = pref_cipher ? in tls_process_server_hello()
1643 && session_id_len == s->session->session_id_length in tls_process_server_hello()
1644 && memcmp(PACKET_data(&session_id), s->session->session_id, in tls_process_server_hello()
1650 if (s->sid_ctx_length != s->session->sid_ctx_length in tls_process_server_hello()
1651 || memcmp(s->session->sid_ctx, s->sid_ctx, s->sid_ctx_length)) { in tls_process_server_hello()
1665 if (s->session->session_id_length > 0) { in tls_process_server_hello()
1673 s->session->ssl_version = s->version; in tls_process_server_hello()
1681 s->session->session_id_length = session_id_len; in tls_process_server_hello()
1684 memcpy(s->session->session_id, PACKET_data(&session_id), in tls_process_server_hello()
1690 if (s->version != s->session->ssl_version) { in tls_process_server_hello()
1717 if (s->session->compress_meth != 0) { in tls_process_server_hello()
1722 if (s->hit && compression != s->session->compress_meth) { in tls_process_server_hello()
1902 EVP_PKEY_free(sc->session->peer_rpk); in tls_process_server_rpk()
1903 sc->session->peer_rpk = peer_rpk; in tls_process_server_rpk()
1914 if (sc->session->peer_rpk == NULL) { in tls_post_process_server_rpk()
1922 if (ssl_verify_rpk(sc, sc->session->peer_rpk) > 0 in tls_post_process_server_rpk()
1926 if ((clu = ssl_cert_lookup_by_pkey(sc->session->peer_rpk, &certidx, in tls_post_process_server_rpk()
1945 X509_free(sc->session->peer); in tls_post_process_server_rpk()
1946 sc->session->peer = NULL; in tls_post_process_server_rpk()
1947 sk_X509_pop_free(sc->session->peer_chain, X509_free); in tls_post_process_server_rpk()
1948 sc->session->peer_chain = NULL; in tls_post_process_server_rpk()
1949 sc->session->verify_result = sc->verify_result; in tls_post_process_server_rpk()
1982 if ((s->session->peer_chain = sk_X509_new_null()) == NULL) { in tls_process_server_certificate()
2040 if (!sk_X509_push(s->session->peer_chain, x)) { in tls_process_server_certificate()
2050 OSSL_STACK_OF_X509_free(s->session->peer_chain); in tls_process_server_certificate()
2051 s->session->peer_chain = NULL; in tls_process_server_certificate()
2074 i = ssl_verify_cert_chain(s, s->session->peer_chain); in tls_post_process_server_certificate()
2103 x = sk_X509_value(s->session->peer_chain, 0); in tls_post_process_server_certificate()
2130 X509_free(s->session->peer); in tls_post_process_server_certificate()
2132 s->session->peer = x; in tls_post_process_server_certificate()
2133 s->session->verify_result = s->verify_result; in tls_post_process_server_certificate()
2135 EVP_PKEY_free(s->session->peer_rpk); in tls_post_process_server_certificate()
2136 s->session->peer_rpk = NULL; in tls_post_process_server_certificate()
2188 OPENSSL_free(s->session->psk_identity_hint); in tls_process_ske_psk_preamble()
2189 s->session->psk_identity_hint = NULL; in tls_process_ske_psk_preamble()
2191 &s->session->psk_identity_hint)) { in tls_process_ske_psk_preamble()
2399 s->session->kex_group = curve_id; in tls_process_ske_ecdhe()
2726 if (SSL_CONNECTION_IS_TLS13(s) || s->session->session_id_length > 0) { in tls_process_new_session_ticket()
2733 if ((new_sess = ssl_session_dup(s->session, 0)) == 0) { in tls_process_new_session_ticket()
2745 SSL_CTX_remove_session(s->session_ctx, s->session); in tls_process_new_session_ticket()
2748 SSL_SESSION_free(s->session); in tls_process_new_session_ticket()
2749 s->session = new_sess; in tls_process_new_session_ticket()
2752 s->session->time = ossl_time_now(); in tls_process_new_session_ticket()
2753 ssl_session_calculate_timeout(s->session); in tls_process_new_session_ticket()
2755 OPENSSL_free(s->session->ext.tick); in tls_process_new_session_ticket()
2756 s->session->ext.tick = NULL; in tls_process_new_session_ticket()
2757 s->session->ext.ticklen = 0; in tls_process_new_session_ticket()
2759 s->session->ext.tick = OPENSSL_malloc(ticklen); in tls_process_new_session_ticket()
2760 if (s->session->ext.tick == NULL) { in tls_process_new_session_ticket()
2764 if (!PACKET_copy_bytes(pkt, s->session->ext.tick, ticklen)) { in tls_process_new_session_ticket()
2769 s->session->ext.tick_lifetime_hint = ticket_lifetime_hint; in tls_process_new_session_ticket()
2770 s->session->ext.tick_age_add = age_add; in tls_process_new_session_ticket()
2771 s->session->ext.ticklen = ticklen; in tls_process_new_session_ticket()
2814 if (!EVP_Digest(s->session->ext.tick, ticklen, in tls_process_new_session_ticket()
2815 s->session->session_id, &sess_len, in tls_process_new_session_ticket()
2822 s->session->session_id_length = sess_len; in tls_process_new_session_ticket()
2823 s->session->not_resumable = 0; in tls_process_new_session_ticket()
2844 s->session->master_key, in tls_process_new_session_ticket()
2849 s->session->master_key_length = hashlen; in tls_process_new_session_ticket()
3009 s->session->psk_identity_hint, in tls_construct_cke_psk_preamble()
3039 OPENSSL_free(s->session->psk_identity); in tls_construct_cke_psk_preamble()
3040 s->session->psk_identity = tmpidentity; in tls_construct_cke_psk_preamble()
3513 OPENSSL_free(s->session->srp_username); in tls_construct_cke_srp()
3514 s->session->srp_username = OPENSSL_strdup(s->srp_ctx.login); in tls_construct_cke_srp()
3515 if (s->session->srp_username == NULL) { in tls_construct_cke_srp()
3953 if (s->session->peer_rpk != NULL) in ssl3_check_cert_and_algorithm()
3957 if (ssl_check_srvr_ecc_cert_and_alg(s->session->peer, s)) in ssl3_check_cert_and_algorithm()