Lines Matching refs:con

72 static void print_connection_info(SSL *con);
2442 SSL *con = NULL; in sv_body() local
2464 con = SSL_new(ctx); in sv_body()
2465 if (con == NULL) { in sv_body()
2471 SSL_set_tlsext_debug_callback(con, tlsext_cb); in sv_body()
2472 SSL_set_tlsext_debug_arg(con, bio_s_out); in sv_body()
2476 && !SSL_set_session_id_context(con, context, in sv_body()
2483 if (!SSL_clear(con)) { in sv_body()
2513 if (socket_mtu < DTLS_get_link_min_mtu(con)) { in sv_body()
2515 DTLS_get_link_min_mtu(con)); in sv_body()
2520 SSL_set_options(con, SSL_OP_NO_QUERY_MTU); in sv_body()
2521 if (!DTLS_set_link_mtu(con, socket_mtu)) { in sv_body()
2535 SSL_set_options(con, SSL_OP_COOKIE_EXCHANGE); in sv_body()
2559 SSL_set_bio(con, sbio, sbio); in sv_body()
2560 SSL_set_accept_state(con); in sv_body()
2563 BIO_set_callback_ex(SSL_get_rbio(con), count_reads_callback); in sv_body()
2567 SSL_set_msg_callback(con, SSL_trace); in sv_body()
2570 SSL_set_msg_callback(con, msg_cb); in sv_body()
2571 SSL_set_msg_callback_arg(con, bio_s_msg ? bio_s_msg : bio_s_out); in sv_body()
2575 SSL_set_tlsext_debug_callback(con, tlsext_cb); in sv_body()
2576 SSL_set_tlsext_debug_arg(con, bio_s_out); in sv_body()
2585 edret = SSL_read_early_data(con, buf, bufsize, &readbytes); in sv_body()
2589 switch (SSL_get_error(con, 0)) { in sv_body()
2611 if (SSL_get_early_data_status(con) == SSL_EARLY_DATA_NOT_SENT) in sv_body()
2618 if (SSL_is_init_finished(con)) in sv_body()
2619 print_connection_info(con); in sv_body()
2632 read_from_sslcon = SSL_has_pending(con) in sv_body()
2633 || (async && SSL_waiting_for_async(con)); in sv_body()
2663 if (SSL_is_dtls(con) && DTLSv1_get_timeout(con, &timeout)) in sv_body()
2670 if ((SSL_is_dtls(con)) && DTLSv1_handle_timeout(con) > 0) in sv_body()
2716 if (SSL_version(con) != DTLS1_VERSION) in sv_body()
2724 SSL_renegotiate(con); in sv_body()
2725 i = SSL_do_handshake(con); in sv_body()
2730 SSL_set_verify(con, in sv_body()
2733 SSL_renegotiate(con); in sv_body()
2734 i = SSL_do_handshake(con); in sv_body()
2740 SSL_key_update(con, buf[0] == 'K' ? in sv_body()
2743 i = SSL_do_handshake(con); in sv_body()
2748 SSL_set_verify(con, SSL_VERIFY_PEER, NULL); in sv_body()
2749 i = SSL_verify_client_post_handshake(con); in sv_body()
2754 i = SSL_do_handshake(con); in sv_body()
2761 BIO_write(SSL_get_wbio(con), str, sizeof(str) -1); in sv_body()
2764 print_stats(bio_s_out, SSL_get_SSL_CTX(con)); in sv_body()
2777 SSL_renegotiate(con); in sv_body()
2780 k = SSL_write(con, &(buf[l]), (unsigned int)i); in sv_body()
2782 while (SSL_get_error(con, k) == SSL_ERROR_WANT_X509_LOOKUP) { in sv_body()
2787 k = SSL_write(con, &(buf[l]), (unsigned int)i); in sv_body()
2790 switch (SSL_get_error(con, k)) { in sv_body()
2796 wait_for_async(con); in sv_body()
2836 if ((!async || !SSL_waiting_for_async(con)) in sv_body()
2837 && !SSL_is_init_finished(con)) { in sv_body()
2845 BIO_set_callback_arg(SSL_get_rbio(con), (char *)&read_counter); in sv_body()
2846 i = init_ssl_connection(con); in sv_body()
2847 BIO_set_callback_arg(SSL_get_rbio(con), NULL); in sv_body()
2866 i = SSL_read(con, (char *)buf, bufsize); in sv_body()
2868 while (SSL_get_error(con, i) == SSL_ERROR_WANT_X509_LOOKUP) { in sv_body()
2873 i = SSL_read(con, (char *)buf, bufsize); in sv_body()
2876 switch (SSL_get_error(con, i)) { in sv_body()
2883 if (SSL_has_pending(con)) in sv_body()
2889 wait_for_async(con); in sv_body()
2917 if (con != NULL) { in sv_body()
2919 do_ssl_shutdown(con); in sv_body()
2920 SSL_free(con); in sv_body()
2935 static int is_retryable(SSL *con, int i) in is_retryable() argument
2937 int err = SSL_get_error(con, i); in is_retryable()
2945 static int init_ssl_connection(SSL *con) in init_ssl_connection() argument
2959 i = DTLSv1_listen(con, client); in init_ssl_connection()
2961 i = SSL_stateless(con); in init_ssl_connection()
2968 wbio = SSL_get_wbio(con); in init_ssl_connection()
2985 i = SSL_accept(con); in init_ssl_connection()
2991 i = SSL_accept(con); in init_ssl_connection()
2994 retry = is_retryable(con, i); in init_ssl_connection()
2998 && SSL_get_error(con, i) == SSL_ERROR_WANT_X509_LOOKUP in init_ssl_connection()
2999 && SSL_get_state(con) == TLS_ST_SR_CLNT_HELLO) { in init_ssl_connection()
3002 i = SSL_accept(con); in init_ssl_connection()
3004 retry = is_retryable(con, i); in init_ssl_connection()
3011 && SSL_get_error(con, i) == SSL_ERROR_WANT_X509_LOOKUP) { in init_ssl_connection()
3017 i = SSL_accept(con); in init_ssl_connection()
3019 retry = is_retryable(con, i); in init_ssl_connection()
3022 } while (i < 0 && SSL_waiting_for_async(con)); in init_ssl_connection()
3034 verify_err = SSL_get_verify_result(con); in init_ssl_connection()
3044 print_connection_info(con); in init_ssl_connection()
3048 static void print_connection_info(SSL *con) in print_connection_info() argument
3061 print_ssl_summary(con); in print_connection_info()
3063 PEM_write_bio_SSL_SESSION(bio_s_out, SSL_get_session(con)); in print_connection_info()
3065 peer = SSL_get0_peer_certificate(con); in print_connection_info()
3073 if (SSL_get_negotiated_server_cert_type(con) == TLSEXT_cert_type_rpk) in print_connection_info()
3075 if (SSL_get_negotiated_client_cert_type(con) == TLSEXT_cert_type_rpk) in print_connection_info()
3078 EVP_PKEY *client_rpk = SSL_get0_peer_rpk(con); in print_connection_info()
3086 if (SSL_get_shared_ciphers(con, buf, sizeof(buf)) != NULL) in print_connection_info()
3088 str = SSL_CIPHER_get_name(SSL_get_current_cipher(con)); in print_connection_info()
3089 ssl_print_sigalgs(bio_s_out, con); in print_connection_info()
3091 ssl_print_point_formats(bio_s_out, con); in print_connection_info()
3092 ssl_print_groups(bio_s_out, con, 0); in print_connection_info()
3094 print_ca_names(bio_s_out, con); in print_connection_info()
3098 SSL_get0_next_proto_negotiated(con, &next_proto_neg, &next_proto_neg_len); in print_connection_info()
3108 = SSL_get_selected_srtp_profile(con); in print_connection_info()
3115 if (SSL_session_reused(con)) in print_connection_info()
3118 ssl_print_secure_renegotiation_notes(bio_s_out, con); in print_connection_info()
3120 if ((SSL_get_options(con) & SSL_OP_NO_RENEGOTIATION)) in print_connection_info()
3128 if (SSL_export_keying_material(con, exportedkeymat, in print_connection_info()
3143 if (BIO_get_ktls_send(SSL_get_wbio(con))) in print_connection_info()
3145 if (BIO_get_ktls_recv(SSL_get_rbio(con))) in print_connection_info()
3157 SSL *con; in www_body() local
3196 if ((con = SSL_new(ctx)) == NULL) in www_body()
3200 SSL_set_tlsext_debug_callback(con, tlsext_cb); in www_body()
3201 SSL_set_tlsext_debug_arg(con, bio_s_out); in www_body()
3205 && !SSL_set_session_id_context(con, context, in www_body()
3207 SSL_free(con); in www_body()
3213 SSL_free(con); in www_body()
3222 SSL_free(con); in www_body()
3229 SSL_set_bio(con, sbio, sbio); in www_body()
3230 SSL_set_accept_state(con); in www_body()
3233 BIO_set_ssl(ssl_bio, con, BIO_CLOSE); in www_body()
3251 BIO_set_callback_ex(SSL_get_rbio(con), bio_dump_callback); in www_body()
3252 BIO_set_callback_arg(SSL_get_rbio(con), (char *)bio_s_out); in www_body()
3257 SSL_set_msg_callback(con, SSL_trace); in www_body()
3260 SSL_set_msg_callback(con, msg_cb); in www_body()
3261 SSL_set_msg_callback_arg(con, bio_s_msg ? bio_s_msg : bio_s_out); in www_body()
3270 edret = SSL_read_early_data(con, buf, bufsize, &readbytes); in www_body()
3274 switch (SSL_get_error(con, 0)) { in www_body()
3294 if (!BIO_should_retry(io) && !SSL_waiting_for_async(con)) { in www_body()
3327 SSL_set_verify(con, in www_body()
3330 i = SSL_renegotiate(con); in www_body()
3333 i = SSL_do_handshake(con); in www_body()
3336 SSL_get_error(con, i)); in www_body()
3387 ssl_print_secure_renegotiation_notes(io, con); in www_body()
3393 sk = SSL_get_ciphers(con); in www_body()
3403 p = SSL_get_shared_ciphers(con, buf, bufsize); in www_body()
3422 ssl_print_sigalgs(io, con); in www_body()
3424 ssl_print_groups(io, con, 0); in www_body()
3426 print_ca_names(io, con); in www_body()
3427 BIO_printf(io, (SSL_session_reused(con) in www_body()
3429 c = SSL_get_current_cipher(con); in www_body()
3432 SSL_SESSION_print(io, SSL_get_session(con)); in www_body()
3434 print_stats(io, SSL_get_SSL_CTX(con)); in www_body()
3436 peer = SSL_get0_peer_certificate(con); in www_body()
3531 if (use_sendfile_for_req && !BIO_get_ktls_send(SSL_get_wbio(con))) { in www_body()
3555 i = SSL_sendfile(con, fd, offset, filesize, 0); in www_body()
3586 SSL_renegotiate(con); in www_body()
3594 SSL_renegotiate(con); in www_body()
3599 && !SSL_waiting_for_async(con)) { in www_body()
3626 do_ssl_shutdown(con); in www_body()
3641 SSL *con; in rev_body() local
3659 if ((con = SSL_new(ctx)) == NULL) in rev_body()
3663 SSL_set_tlsext_debug_callback(con, tlsext_cb); in rev_body()
3664 SSL_set_tlsext_debug_arg(con, bio_s_out); in rev_body()
3667 && !SSL_set_session_id_context(con, context, in rev_body()
3669 SSL_free(con); in rev_body()
3676 SSL_free(con); in rev_body()
3681 SSL_set_bio(con, sbio, sbio); in rev_body()
3682 SSL_set_accept_state(con); in rev_body()
3685 BIO_set_ssl(ssl_bio, con, BIO_CLOSE); in rev_body()
3697 BIO_set_callback_ex(SSL_get_rbio(con), bio_dump_callback); in rev_body()
3698 BIO_set_callback_arg(SSL_get_rbio(con), (char *)bio_s_out); in rev_body()
3703 SSL_set_msg_callback(con, SSL_trace); in rev_body()
3706 SSL_set_msg_callback(con, msg_cb); in rev_body()
3707 SSL_set_msg_callback_arg(con, bio_s_msg ? bio_s_msg : bio_s_out); in rev_body()
3731 print_ssl_summary(con); in rev_body()
3784 do_ssl_shutdown(con); in rev_body()