Lines Matching refs:con
1959 SSL *con=NULL; in sv_body() local
1988 if (con == NULL) { in sv_body()
1989 con=SSL_new(ctx); in sv_body()
1993 SSL_set_tlsext_debug_callback(con, tlsext_cb); in sv_body()
1994 SSL_set_tlsext_debug_arg(con, bio_s_out); in sv_body()
2006 SSL_set0_kssl_ctx(con, kctx); in sv_body()
2012 SSL_set_session_id_context(con, context, in sv_body()
2015 SSL_clear(con); in sv_body()
2018 SSL_set_tlsext_opaque_prf_input(con, "Test server", 11); in sv_body()
2022 if (SSL_version(con) == DTLS1_VERSION) in sv_body()
2040 SSL_set_options(con, SSL_OP_NO_QUERY_MTU); in sv_body()
2041 SSL_set_mtu(con, socket_mtu - 28); in sv_body()
2048 SSL_set_options(con, SSL_OP_COOKIE_EXCHANGE); in sv_body()
2065 SSL_set_bio(con,sbio,sbio); in sv_body()
2066 SSL_set_accept_state(con); in sv_body()
2071 SSL_set_debug(con, 1); in sv_body()
2072 BIO_set_callback(SSL_get_rbio(con),bio_dump_callback); in sv_body()
2073 BIO_set_callback_arg(SSL_get_rbio(con),(char *)bio_s_out); in sv_body()
2077 SSL_set_msg_callback(con, msg_cb); in sv_body()
2078 SSL_set_msg_callback_arg(con, bio_s_out); in sv_body()
2083 SSL_set_tlsext_debug_callback(con, tlsext_cb); in sv_body()
2084 SSL_set_tlsext_debug_arg(con, bio_s_out); in sv_body()
2095 read_from_sslcon = SSL_pending(con); in sv_body()
2134 if ((SSL_version(con) == DTLS1_VERSION) && in sv_body()
2135 DTLSv1_get_timeout(con, &timeout)) in sv_body()
2142 if ((SSL_version(con) == DTLS1_VERSION) && DTLSv1_handle_timeout(con) > 0) in sv_body()
2193 if (SSL_version(con) != DTLS1_VERSION) in sv_body()
2205 SSL_heartbeat(con); in sv_body()
2213 SSL_renegotiate(con); in sv_body()
2214 i=SSL_do_handshake(con); in sv_body()
2223 SSL_set_verify(con, in sv_body()
2225 SSL_renegotiate(con); in sv_body()
2226 i=SSL_do_handshake(con); in sv_body()
2235 BIO_write(SSL_get_wbio(con),str,strlen(str)); in sv_body()
2239 print_stats(bio_s_out,SSL_get_SSL_CTX(con)); in sv_body()
2250 { static count=0; if (++count == 100) { count=0; SSL_renegotiate(con); } } in sv_body()
2252 k=SSL_write(con,&(buf[l]),(unsigned int)i); in sv_body()
2254 while (SSL_get_error(con,k) == SSL_ERROR_WANT_X509_LOOKUP) in sv_body()
2262 k=SSL_write(con,&(buf[l]),(unsigned int)i); in sv_body()
2265 switch (SSL_get_error(con,k)) in sv_body()
2293 if (!SSL_is_init_finished(con)) in sv_body()
2295 i=init_ssl_connection(con); in sv_body()
2311 i=SSL_read(con,(char *)buf,bufsize); in sv_body()
2313 while (SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP) in sv_body()
2321 i=SSL_read(con,(char *)buf,bufsize); in sv_body()
2324 switch (SSL_get_error(con,i)) in sv_body()
2332 if (SSL_pending(con)) goto again; in sv_body()
2353 if (con != NULL) in sv_body()
2357 SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); in sv_body()
2359 SSL_shutdown(con); in sv_body()
2361 SSL_free(con); in sv_body()
2383 static int init_ssl_connection(SSL *con) in init_ssl_connection() argument
2400 i=SSL_accept(con); in init_ssl_connection()
2402 while (i <= 0 && SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP) in init_ssl_connection()
2410 i=SSL_accept(con); in init_ssl_connection()
2422 verify_error=SSL_get_verify_result(con); in init_ssl_connection()
2433 PEM_write_bio_SSL_SESSION(bio_s_out,SSL_get_session(con)); in init_ssl_connection()
2435 peer=SSL_get_peer_certificate(con); in init_ssl_connection()
2447 if (SSL_get_shared_ciphers(con,buf,sizeof buf) != NULL) in init_ssl_connection()
2449 str=SSL_CIPHER_get_name(SSL_get_current_cipher(con)); in init_ssl_connection()
2453 SSL_get0_next_proto_negotiated(con, &next_proto_neg, &next_proto_neg_len); in init_ssl_connection()
2464 = SSL_get_selected_srtp_profile(con); in init_ssl_connection()
2471 if (SSL_cache_hit(con)) BIO_printf(bio_s_out,"Reused session-id\n"); in init_ssl_connection()
2472 if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) & in init_ssl_connection()
2477 client_princ = kssl_ctx_get0_client_princ(SSL_get0_kssl_ctx(con)); in init_ssl_connection()
2485 SSL_get_secure_renegotiation_support(con) ? "" : " NOT"); in init_ssl_connection()
2495 if (!SSL_export_keying_material(con, exportedkeymat, in init_ssl_connection()
2562 SSL *con; in www_body() local
2590 if ((con=SSL_new(ctx)) == NULL) goto err; in www_body()
2594 SSL_set_tlsext_debug_callback(con, tlsext_cb); in www_body()
2595 SSL_set_tlsext_debug_arg(con, bio_s_out); in www_body()
2605 if(context) SSL_set_session_id_context(con, context, in www_body()
2616 SSL_set_bio(con,sbio,sbio); in www_body()
2617 SSL_set_accept_state(con); in www_body()
2620 BIO_set_ssl(ssl_bio,con,BIO_CLOSE); in www_body()
2628 SSL_set_debug(con, 1); in www_body()
2629 BIO_set_callback(SSL_get_rbio(con),bio_dump_callback); in www_body()
2630 BIO_set_callback_arg(SSL_get_rbio(con),(char *)bio_s_out); in www_body()
2634 SSL_set_msg_callback(con, msg_cb); in www_body()
2635 SSL_set_msg_callback_arg(con, bio_s_out); in www_body()
2642 i=SSL_accept(con); in www_body()
2644 while (i <= 0 && SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP) in www_body()
2652 i=SSL_accept(con); in www_body()
2655 switch (SSL_get_error(con,i)) in www_body()
2671 SSL_renegotiate(con); in www_body()
2672 SSL_write(con,NULL,0); in www_body()
2724 SSL_get_secure_renegotiation_support(con) ? in www_body()
2730 sk=SSL_get_ciphers(con); in www_body()
2742 p=SSL_get_shared_ciphers(con,buf,bufsize); in www_body()
2765 BIO_printf(io,(SSL_cache_hit(con) in www_body()
2768 c=SSL_get_current_cipher(con); in www_body()
2772 SSL_SESSION_print(io,SSL_get_session(con)); in www_body()
2774 print_stats(io,SSL_get_SSL_CTX(con)); in www_body()
2776 peer=SSL_get_peer_certificate(con); in www_body()
2895 SSL_renegotiate(con); in www_body()
2902 { static count=0; if (++count == 13) { SSL_renegotiate(con); } } in www_body()
2940 SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); in www_body()