From 113f2696fe4103474cb2703e3d2f8848304fdd3d Mon Sep 17 00:00:00 2001 From: speidy Date: Sat, 8 Feb 2014 13:34:01 +0200 Subject: libxrdp: work on fastpath --- libxrdp/libxrdp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 70c8a124..a9150111 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -290,6 +290,8 @@ int APP_CC xrdp_iso_send(struct xrdp_iso* self, struct stream* s); int APP_CC xrdp_iso_incoming(struct xrdp_iso* self); +int APP_CC +xrdp_iso_detect_tpkt(struct xrdp_iso *self, struct stream *s); /* xrdp_mcs.c */ struct xrdp_mcs* APP_CC -- cgit v1.2.1 From cbf5d50a5c96de83178e910318db540334f289b1 Mon Sep 17 00:00:00 2001 From: speidy Date: Sun, 9 Feb 2014 01:42:04 +0200 Subject: libxrdp: work on fastpath input --- libxrdp/libxrdp.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index a9150111..b15cc989 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -42,6 +42,8 @@ struct xrdp_tcp { struct trans* trans; struct xrdp_iso* iso_layer; /* owner */ + struct xrdp_fastpath* fastpath_layer; /* owner */ + }; /* iso */ @@ -73,11 +75,21 @@ struct xrdp_mcs struct list* channel_list; }; +/* fastpath */ +struct xrdp_fastpath +{ + struct xrdp_sec* sec_layer; /* owner */ + struct xrdp_tcp* tcp_layer; + int numEvents; + int secFlags; +}; + /* sec */ struct xrdp_sec { struct xrdp_rdp* rdp_layer; /* owner */ struct xrdp_mcs* mcs_layer; + struct xrdp_fastpath* fastpath_layer; struct xrdp_channel* chan_layer; char server_random[32]; char client_random[64]; @@ -494,4 +506,12 @@ int APP_CC xrdp_channel_process(struct xrdp_channel* self, struct stream* s, int chanid); +/* xrdp_fastpath.c */ +struct xrdp_fastpath *APP_CC +xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans); +void APP_CC +xrdp_fastpath_delete(struct xrdp_fastpath *self); +int APP_CC +xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s); + #endif -- cgit v1.2.1 From f525c0f8e76b1e2b8294c4a61c0da4d24e0406b4 Mon Sep 17 00:00:00 2001 From: speidy Date: Mon, 10 Feb 2014 05:48:03 +0200 Subject: libxrdp: work on fastpath input --- libxrdp/libxrdp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index b15cc989..4059dbed 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -82,6 +82,7 @@ struct xrdp_fastpath struct xrdp_tcp* tcp_layer; int numEvents; int secFlags; + int firstPacket; }; /* sec */ @@ -373,6 +374,8 @@ xrdp_rdp_process_confirm_active(struct xrdp_rdp* self, struct stream* s); int APP_CC xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s); int APP_CC +xrdp_rdp_process_fastpath_data_input(struct xrdp_rdp *self, struct stream *s); +int APP_CC xrdp_rdp_disconnect(struct xrdp_rdp* self); int APP_CC xrdp_rdp_send_deactive(struct xrdp_rdp* self); -- cgit v1.2.1 From f8d26973d09f2139f696f3ae1ebdde602ecf820c Mon Sep 17 00:00:00 2001 From: speidy Date: Mon, 10 Feb 2014 06:26:55 +0200 Subject: libxrdp: work on fastpath input, fix length issue in fastpath_recv --- libxrdp/libxrdp.h | 1 - 1 file changed, 1 deletion(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 4059dbed..91f21974 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -82,7 +82,6 @@ struct xrdp_fastpath struct xrdp_tcp* tcp_layer; int numEvents; int secFlags; - int firstPacket; }; /* sec */ -- cgit v1.2.1 From 866fde498efe893144b0b596999f18af90a743c3 Mon Sep 17 00:00:00 2001 From: speidy Date: Tue, 4 Mar 2014 23:56:26 +0200 Subject: libxrdp: move fastpath callback calls from xrdp_rdp to xrdp_fastpath --- libxrdp/libxrdp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 2843089b..4e7218d6 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -72,6 +72,7 @@ struct xrdp_fastpath { struct xrdp_sec* sec_layer; /* owner */ struct trans* trans; + struct xrdp_session* session; int numEvents; int secFlags; }; @@ -386,8 +387,6 @@ xrdp_rdp_process_confirm_active(struct xrdp_rdp* self, struct stream* s); int APP_CC xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s); int APP_CC -xrdp_rdp_process_fastpath_data_input(struct xrdp_rdp *self, struct stream *s); -int APP_CC xrdp_rdp_disconnect(struct xrdp_rdp* self); int APP_CC xrdp_rdp_send_deactive(struct xrdp_rdp* self); @@ -551,5 +550,6 @@ void APP_CC xrdp_fastpath_delete(struct xrdp_fastpath *self); int APP_CC xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s); - +int APP_CC +xrdp_fastpath_process_input_event(struct xrdp_fastpath *self, struct stream *s); #endif -- cgit v1.2.1 From cf39a90d8052856518c87bff5e9f66e4855ab004 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Thu, 6 Mar 2014 23:28:57 -0800 Subject: libxrdp: detect client fastpath caps --- libxrdp/libxrdp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 4e7218d6..7a4342db 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -346,6 +346,8 @@ xrdp_sec_delete(struct xrdp_sec* self); int APP_CC xrdp_sec_init(struct xrdp_sec* self, struct stream* s); int APP_CC +xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s); +int APP_CC xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan); int APP_CC xrdp_sec_send(struct xrdp_sec* self, struct stream* s, int chan); -- cgit v1.2.1 From ff8821c308be44e20a340a02d84de3359fcdc700 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Fri, 7 Mar 2014 12:45:33 -0800 Subject: libxrdp: fastpath output, orders working --- libxrdp/libxrdp.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 7a4342db..da8ebc3f 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -346,6 +346,10 @@ xrdp_sec_delete(struct xrdp_sec* self); int APP_CC xrdp_sec_init(struct xrdp_sec* self, struct stream* s); int APP_CC +xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s); +int APP_CC +xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s); +int APP_CC xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s); int APP_CC xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan); @@ -370,6 +374,8 @@ xrdp_rdp_init(struct xrdp_rdp* self, struct stream* s); int APP_CC xrdp_rdp_init_data(struct xrdp_rdp* self, struct stream* s); int APP_CC +xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s); +int APP_CC xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code); int APP_CC xrdp_rdp_send(struct xrdp_rdp* self, struct stream* s, int pdu_type); @@ -377,6 +383,9 @@ int APP_CC xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s, int data_pdu_type); int APP_CC +xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s, + int data_pdu_type); +int APP_CC xrdp_rdp_send_data_update_sync(struct xrdp_rdp* self); int APP_CC xrdp_rdp_incoming(struct xrdp_rdp* self); @@ -554,4 +563,9 @@ int APP_CC xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s); int APP_CC xrdp_fastpath_process_input_event(struct xrdp_fastpath *self, struct stream *s); +int APP_CC +xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s); +int APP_CC +xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s); + #endif -- cgit v1.2.1 From d18704d74060e41f45e7b772544d375fdf80099c Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 9 Mar 2014 12:11:36 -0700 Subject: libxrdp: work on fastpath fragments --- libxrdp/libxrdp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index da8ebc3f..39e36d4b 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -346,6 +346,8 @@ xrdp_sec_delete(struct xrdp_sec* self); int APP_CC xrdp_sec_init(struct xrdp_sec* self, struct stream* s); int APP_CC +xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self); +int APP_CC xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s); int APP_CC xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s); -- cgit v1.2.1 From a801e44bfa9dfd0e0e3831027109c3fadd9874c1 Mon Sep 17 00:00:00 2001 From: speidy Date: Mon, 10 Mar 2014 03:39:39 +0200 Subject: o libxrdp: move rdp capabilites form xrdp_rdp to a new file xrdp_caps.c o move monitor layout call to demand active. --- libxrdp/libxrdp.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 39e36d4b..1ddf345c 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -392,12 +392,6 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp* self); int APP_CC xrdp_rdp_incoming(struct xrdp_rdp* self); int APP_CC -xrdp_rdp_send_demand_active(struct xrdp_rdp* self); -int APP_CC -xrdp_rdp_send_monitorlayout(struct xrdp_rdp* self); -int APP_CC -xrdp_rdp_process_confirm_active(struct xrdp_rdp* self, struct stream* s); -int APP_CC xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s); int APP_CC xrdp_rdp_disconnect(struct xrdp_rdp* self); @@ -570,4 +564,9 @@ xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s); int APP_CC xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s); +/* xrdp_caps.c */ +int APP_CC +xrdp_caps_send_demand_active(struct xrdp_rdp *self); +int APP_CC +xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s); #endif -- cgit v1.2.1 From 6d7e315b0c0a1e56e135614f1e2e96fa19870975 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 18 Mar 2014 00:07:11 -0700 Subject: work on surface command --- libxrdp/libxrdp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 1ddf345c..b909dd72 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -376,6 +376,8 @@ xrdp_rdp_init(struct xrdp_rdp* self, struct stream* s); int APP_CC xrdp_rdp_init_data(struct xrdp_rdp* self, struct stream* s); int APP_CC +xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self); +int APP_CC xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s); int APP_CC xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code); -- cgit v1.2.1 From d672eb8995b646198bae3c5bcb1683dfa0318143 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Mon, 2 Jun 2014 22:00:51 -0700 Subject: no logic change, indent --- libxrdp/libxrdp.h | 570 +++++++++++++++++++++++++++--------------------------- 1 file changed, 285 insertions(+), 285 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index b909dd72..2ea8b61d 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -41,40 +41,40 @@ /* iso */ struct xrdp_iso { - struct xrdp_mcs* mcs_layer; /* owner */ - int requestedProtocol; - int selectedProtocol; - struct trans* trans; + struct xrdp_mcs *mcs_layer; /* owner */ + int requestedProtocol; + int selectedProtocol; + struct trans *trans; }; /* used in mcs */ struct mcs_channel_item { - char name[16]; - int flags; - int chanid; + char name[16]; + int flags; + int chanid; }; /* mcs */ struct xrdp_mcs { - struct xrdp_sec* sec_layer; /* owner */ - struct xrdp_iso* iso_layer; - int userid; - int chanid; - struct stream* client_mcs_data; - struct stream* server_mcs_data; - struct list* channel_list; + struct xrdp_sec *sec_layer; /* owner */ + struct xrdp_iso *iso_layer; + int userid; + int chanid; + struct stream *client_mcs_data; + struct stream *server_mcs_data; + struct list *channel_list; }; /* fastpath */ struct xrdp_fastpath { - struct xrdp_sec* sec_layer; /* owner */ - struct trans* trans; - struct xrdp_session* session; - int numEvents; - int secFlags; + struct xrdp_sec *sec_layer; /* owner */ + struct trans *trans; + struct xrdp_session *session; + int numEvents; + int secFlags; }; /* Encryption Methods */ @@ -95,175 +95,175 @@ struct xrdp_fastpath /* sec */ struct xrdp_sec { - struct xrdp_rdp* rdp_layer; /* owner */ - struct xrdp_mcs* mcs_layer; - struct xrdp_fastpath* fastpath_layer; - struct xrdp_channel* chan_layer; - char server_random[32]; - char client_random[64]; - char client_crypt_random[72]; - struct stream client_mcs_data; - struct stream server_mcs_data; - int decrypt_use_count; - int encrypt_use_count; - char decrypt_key[16]; - char encrypt_key[16]; - char decrypt_update_key[16]; - char encrypt_update_key[16]; - int crypt_method; - int rc4_key_len; /* 8 = 40 bit, 16 = 128 bit */ - int crypt_level; - char sign_key[16]; - void* decrypt_rc4_info; - void* encrypt_rc4_info; - char pub_exp[4]; - char pub_mod[64]; - char pub_sig[64]; - char pri_exp[64]; - int channel_code; - int multimon; - char fips_encrypt_key[24]; - char fips_decrypt_key[24]; - char fips_sign_key[20]; - void* encrypt_fips_info; - void* decrypt_fips_info; - void* sign_fips_info; + struct xrdp_rdp *rdp_layer; /* owner */ + struct xrdp_mcs *mcs_layer; + struct xrdp_fastpath *fastpath_layer; + struct xrdp_channel *chan_layer; + char server_random[32]; + char client_random[64]; + char client_crypt_random[72]; + struct stream client_mcs_data; + struct stream server_mcs_data; + int decrypt_use_count; + int encrypt_use_count; + char decrypt_key[16]; + char encrypt_key[16]; + char decrypt_update_key[16]; + char encrypt_update_key[16]; + int crypt_method; + int rc4_key_len; /* 8 = 40 bit, 16 = 128 bit */ + int crypt_level; + char sign_key[16]; + void *decrypt_rc4_info; + void *encrypt_rc4_info; + char pub_exp[4]; + char pub_mod[64]; + char pub_sig[64]; + char pri_exp[64]; + int channel_code; + int multimon; + char fips_encrypt_key[24]; + char fips_decrypt_key[24]; + char fips_sign_key[20]; + void *encrypt_fips_info; + void *decrypt_fips_info; + void *sign_fips_info; }; /* channel */ struct xrdp_channel { - struct xrdp_sec* sec_layer; - struct xrdp_mcs* mcs_layer; + struct xrdp_sec *sec_layer; + struct xrdp_mcs *mcs_layer; }; /* rdp */ struct xrdp_rdp { - struct xrdp_session* session; - struct xrdp_sec* sec_layer; - int share_id; - int mcs_channel; - struct xrdp_client_info client_info; - struct xrdp_mppc_enc* mppc_enc; - void* rfx_enc; + struct xrdp_session *session; + struct xrdp_sec *sec_layer; + int share_id; + int mcs_channel; + struct xrdp_client_info client_info; + struct xrdp_mppc_enc *mppc_enc; + void *rfx_enc; }; /* state */ struct xrdp_orders_state { - int last_order; /* last order sent */ - - int clip_left; /* RDP_ORDER_BOUNDS, RDP_ORDER_LASTBOUNDS */ - int clip_top; - int clip_right; - int clip_bottom; - - int rect_x; /* RDP_ORDER_RECT */ - int rect_y; - int rect_cx; - int rect_cy; - int rect_color; - - int scr_blt_x; /* RDP_ORDER_SCREENBLT */ - int scr_blt_y; - int scr_blt_cx; - int scr_blt_cy; - int scr_blt_rop; - int scr_blt_srcx; - int scr_blt_srcy; - - int pat_blt_x; /* RDP_ORDER_PATBLT */ - int pat_blt_y; - int pat_blt_cx; - int pat_blt_cy; - int pat_blt_rop; - int pat_blt_bg_color; - int pat_blt_fg_color; - struct xrdp_brush pat_blt_brush; - - int dest_blt_x; /* RDP_ORDER_DESTBLT */ - int dest_blt_y; - int dest_blt_cx; - int dest_blt_cy; - int dest_blt_rop; - - int line_mix_mode; /* RDP_ORDER_LINE */ - int line_startx; - int line_starty; - int line_endx; - int line_endy; - int line_bg_color; - int line_rop; - struct xrdp_pen line_pen; - - int mem_blt_color_table; /* RDP_ORDER_MEMBLT */ - int mem_blt_cache_id; - int mem_blt_x; - int mem_blt_y; - int mem_blt_cx; - int mem_blt_cy; - int mem_blt_rop; - int mem_blt_srcx; - int mem_blt_srcy; - int mem_blt_cache_idx; - - int text_font; /* RDP_ORDER_TEXT2 */ - int text_flags; - int text_unknown; - int text_mixmode; - int text_fg_color; - int text_bg_color; - int text_clip_left; - int text_clip_top; - int text_clip_right; - int text_clip_bottom; - int text_box_left; - int text_box_top; - int text_box_right; - int text_box_bottom; - int text_x; - int text_y; - int text_len; - char* text_data; - - int com_blt_srcidx; /* RDP_ORDER_COMPOSITE */ /* 2 */ - int com_blt_srcformat; /* 2 */ - int com_blt_srcwidth; /* 2 */ - int com_blt_srcrepeat; /* 1 */ - int com_blt_srctransform[10]; /* 40 */ - int com_blt_mskflags; /* 1 */ - int com_blt_mskidx; /* 2 */ - int com_blt_mskformat; /* 2 */ - int com_blt_mskwidth; /* 2 */ - int com_blt_mskrepeat; /* 1 */ - int com_blt_op; /* 1 */ - int com_blt_srcx; /* 2 */ - int com_blt_srcy; /* 2 */ - int com_blt_mskx; /* 2 */ - int com_blt_msky; /* 2 */ - int com_blt_dstx; /* 2 */ - int com_blt_dsty; /* 2 */ - int com_blt_width; /* 2 */ - int com_blt_height; /* 2 */ - int com_blt_dstformat; /* 2 */ + int last_order; /* last order sent */ + + int clip_left; /* RDP_ORDER_BOUNDS, RDP_ORDER_LASTBOUNDS */ + int clip_top; + int clip_right; + int clip_bottom; + + int rect_x; /* RDP_ORDER_RECT */ + int rect_y; + int rect_cx; + int rect_cy; + int rect_color; + + int scr_blt_x; /* RDP_ORDER_SCREENBLT */ + int scr_blt_y; + int scr_blt_cx; + int scr_blt_cy; + int scr_blt_rop; + int scr_blt_srcx; + int scr_blt_srcy; + + int pat_blt_x; /* RDP_ORDER_PATBLT */ + int pat_blt_y; + int pat_blt_cx; + int pat_blt_cy; + int pat_blt_rop; + int pat_blt_bg_color; + int pat_blt_fg_color; + struct xrdp_brush pat_blt_brush; + + int dest_blt_x; /* RDP_ORDER_DESTBLT */ + int dest_blt_y; + int dest_blt_cx; + int dest_blt_cy; + int dest_blt_rop; + + int line_mix_mode; /* RDP_ORDER_LINE */ + int line_startx; + int line_starty; + int line_endx; + int line_endy; + int line_bg_color; + int line_rop; + struct xrdp_pen line_pen; + + int mem_blt_color_table; /* RDP_ORDER_MEMBLT */ + int mem_blt_cache_id; + int mem_blt_x; + int mem_blt_y; + int mem_blt_cx; + int mem_blt_cy; + int mem_blt_rop; + int mem_blt_srcx; + int mem_blt_srcy; + int mem_blt_cache_idx; + + int text_font; /* RDP_ORDER_TEXT2 */ + int text_flags; + int text_unknown; + int text_mixmode; + int text_fg_color; + int text_bg_color; + int text_clip_left; + int text_clip_top; + int text_clip_right; + int text_clip_bottom; + int text_box_left; + int text_box_top; + int text_box_right; + int text_box_bottom; + int text_x; + int text_y; + int text_len; + char *text_data; + + int com_blt_srcidx; /* RDP_ORDER_COMPOSITE */ /* 2 */ + int com_blt_srcformat; /* 2 */ + int com_blt_srcwidth; /* 2 */ + int com_blt_srcrepeat; /* 1 */ + int com_blt_srctransform[10]; /* 40 */ + int com_blt_mskflags; /* 1 */ + int com_blt_mskidx; /* 2 */ + int com_blt_mskformat; /* 2 */ + int com_blt_mskwidth; /* 2 */ + int com_blt_mskrepeat; /* 1 */ + int com_blt_op; /* 1 */ + int com_blt_srcx; /* 2 */ + int com_blt_srcy; /* 2 */ + int com_blt_mskx; /* 2 */ + int com_blt_msky; /* 2 */ + int com_blt_dstx; /* 2 */ + int com_blt_dsty; /* 2 */ + int com_blt_width; /* 2 */ + int com_blt_height; /* 2 */ + int com_blt_dstformat; /* 2 */ }; /* orders */ struct xrdp_orders { - struct stream* out_s; - struct xrdp_rdp* rdp_layer; - struct xrdp_session* session; - struct xrdp_wm* wm; - - char* order_count_ptr; /* pointer to count, set when sending */ - int order_count; - int order_level; /* inc for every call to xrdp_orders_init */ - struct xrdp_orders_state orders_state; - void* jpeg_han; - int rfx_min_pixel; + struct stream *out_s; + struct xrdp_rdp *rdp_layer; + struct xrdp_session *session; + struct xrdp_wm *wm; + + char *order_count_ptr; /* pointer to count, set when sending */ + int order_count; + int order_level; /* inc for every call to xrdp_orders_init */ + struct xrdp_orders_state orders_state; + void *jpeg_han; + int rfx_min_pixel; }; #define PROTO_RDP_40 1 @@ -271,17 +271,17 @@ struct xrdp_orders struct xrdp_mppc_enc { - int protocol_type; /* PROTO_RDP_40, PROTO_RDP_50 etc */ - char *historyBuffer; /* contains uncompressed data */ - char *outputBuffer; /* contains compressed data */ - char *outputBufferPlus; - int historyOffset; /* next free slot in historyBuffer */ - int buf_len; /* length of historyBuffer, protocol dependant */ - int bytes_in_opb; /* compressed bytes available in outputBuffer */ - int flags; /* PACKET_COMPRESSED, PACKET_AT_FRONT, PACKET_FLUSHED etc */ - int flagsHold; - int first_pkt; /* this is the first pkt passing through enc */ - tui16 *hash_table; + int protocol_type; /* PROTO_RDP_40, PROTO_RDP_50 etc */ + char *historyBuffer; /* contains uncompressed data */ + char *outputBuffer; /* contains compressed data */ + char *outputBufferPlus; + int historyOffset; /* next free slot in historyBuffer */ + int buf_len; /* length of historyBuffer, protocol dependant */ + int bytes_in_opb; /* compressed bytes available in outputBuffer */ + int flags; /* PACKET_COMPRESSED, PACKET_AT_FRONT, PACKET_FLUSHED etc */ + int flagsHold; + int first_pkt; /* this is the first pkt passing through enc */ + tui16 *hash_table; }; int APP_CC @@ -292,59 +292,59 @@ void APP_CC mppc_enc_free(struct xrdp_mppc_enc *enc); /* xrdp_tcp.c */ -struct xrdp_tcp* APP_CC -xrdp_tcp_create(struct xrdp_iso* owner, struct trans* trans); +struct xrdp_tcp * APP_CC +xrdp_tcp_create(struct xrdp_iso *owner, struct trans *trans); void APP_CC -xrdp_tcp_delete(struct xrdp_tcp* self); +xrdp_tcp_delete(struct xrdp_tcp *self); int APP_CC -xrdp_tcp_init(struct xrdp_tcp* self, struct stream* s); +xrdp_tcp_init(struct xrdp_tcp *self, struct stream *s); int APP_CC -xrdp_tcp_recv(struct xrdp_tcp* self, struct stream* s, int len); +xrdp_tcp_recv(struct xrdp_tcp *self, struct stream *s, int len); int APP_CC -xrdp_tcp_send(struct xrdp_tcp* self, struct stream* s); +xrdp_tcp_send(struct xrdp_tcp *self, struct stream *s); /* xrdp_iso.c */ -struct xrdp_iso* APP_CC -xrdp_iso_create(struct xrdp_mcs* owner, struct trans* trans); +struct xrdp_iso * APP_CC +xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans); void APP_CC -xrdp_iso_delete(struct xrdp_iso* self); +xrdp_iso_delete(struct xrdp_iso *self); int APP_CC -xrdp_iso_init(struct xrdp_iso* self, struct stream* s); +xrdp_iso_init(struct xrdp_iso *self, struct stream *s); int APP_CC -xrdp_iso_recv(struct xrdp_iso* self, struct stream* s); +xrdp_iso_recv(struct xrdp_iso *self, struct stream *s); int APP_CC -xrdp_iso_send(struct xrdp_iso* self, struct stream* s); +xrdp_iso_send(struct xrdp_iso *self, struct stream *s); int APP_CC -xrdp_iso_incoming(struct xrdp_iso* self); +xrdp_iso_incoming(struct xrdp_iso *self); int APP_CC xrdp_iso_detect_tpkt(struct xrdp_iso *self, struct stream *s); /* xrdp_mcs.c */ -struct xrdp_mcs* APP_CC -xrdp_mcs_create(struct xrdp_sec* owner, struct trans* trans, - struct stream* client_mcs_data, - struct stream* server_mcs_data); +struct xrdp_mcs * APP_CC +xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans, + struct stream *client_mcs_data, + struct stream *server_mcs_data); void APP_CC -xrdp_mcs_delete(struct xrdp_mcs* self); +xrdp_mcs_delete(struct xrdp_mcs *self); int APP_CC -xrdp_mcs_init(struct xrdp_mcs* self, struct stream* s); +xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s); int APP_CC -xrdp_mcs_recv(struct xrdp_mcs* self, struct stream* s, int* chan); +xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan); int APP_CC -xrdp_mcs_send(struct xrdp_mcs* self, struct stream* s, int chan); +xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan); int APP_CC -xrdp_mcs_incoming(struct xrdp_mcs* self); +xrdp_mcs_incoming(struct xrdp_mcs *self); int APP_CC -xrdp_mcs_disconnect(struct xrdp_mcs* self); +xrdp_mcs_disconnect(struct xrdp_mcs *self); /* xrdp_sec.c */ -struct xrdp_sec* APP_CC -xrdp_sec_create(struct xrdp_rdp* owner, struct trans* trans, int crypt_level, +struct xrdp_sec * APP_CC +xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans, int crypt_level, int channel_code, int multimon); void APP_CC -xrdp_sec_delete(struct xrdp_sec* self); +xrdp_sec_delete(struct xrdp_sec *self); int APP_CC -xrdp_sec_init(struct xrdp_sec* self, struct stream* s); +xrdp_sec_init(struct xrdp_sec *self, struct stream *s); int APP_CC xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self); int APP_CC @@ -354,166 +354,166 @@ xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s); int APP_CC xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s); int APP_CC -xrdp_sec_recv(struct xrdp_sec* self, struct stream* s, int* chan); +xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan); int APP_CC -xrdp_sec_send(struct xrdp_sec* self, struct stream* s, int chan); +xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan); int APP_CC -xrdp_sec_process_mcs_data(struct xrdp_sec* self); +xrdp_sec_process_mcs_data(struct xrdp_sec *self); int APP_CC -xrdp_sec_out_mcs_data(struct xrdp_sec* self); +xrdp_sec_out_mcs_data(struct xrdp_sec *self); int APP_CC -xrdp_sec_incoming(struct xrdp_sec* self); +xrdp_sec_incoming(struct xrdp_sec *self); int APP_CC -xrdp_sec_disconnect(struct xrdp_sec* self); +xrdp_sec_disconnect(struct xrdp_sec *self); /* xrdp_rdp.c */ -struct xrdp_rdp* APP_CC -xrdp_rdp_create(struct xrdp_session* session, struct trans* trans); +struct xrdp_rdp * APP_CC +xrdp_rdp_create(struct xrdp_session *session, struct trans *trans); void APP_CC -xrdp_rdp_delete(struct xrdp_rdp* self); +xrdp_rdp_delete(struct xrdp_rdp *self); int APP_CC -xrdp_rdp_init(struct xrdp_rdp* self, struct stream* s); +xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s); int APP_CC -xrdp_rdp_init_data(struct xrdp_rdp* self, struct stream* s); +xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s); int APP_CC xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self); int APP_CC xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s); int APP_CC -xrdp_rdp_recv(struct xrdp_rdp* self, struct stream* s, int* code); +xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code); int APP_CC -xrdp_rdp_send(struct xrdp_rdp* self, struct stream* s, int pdu_type); +xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type); int APP_CC -xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s, +xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s, int data_pdu_type); int APP_CC xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s, int data_pdu_type); int APP_CC -xrdp_rdp_send_data_update_sync(struct xrdp_rdp* self); +xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self); int APP_CC -xrdp_rdp_incoming(struct xrdp_rdp* self); +xrdp_rdp_incoming(struct xrdp_rdp *self); int APP_CC -xrdp_rdp_process_data(struct xrdp_rdp* self, struct stream* s); +xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s); int APP_CC -xrdp_rdp_disconnect(struct xrdp_rdp* self); +xrdp_rdp_disconnect(struct xrdp_rdp *self); int APP_CC -xrdp_rdp_send_deactive(struct xrdp_rdp* self); +xrdp_rdp_send_deactive(struct xrdp_rdp *self); /* xrdp_orders.c */ -struct xrdp_orders* APP_CC -xrdp_orders_create(struct xrdp_session* session, - struct xrdp_rdp* rdp_layer); +struct xrdp_orders * APP_CC +xrdp_orders_create(struct xrdp_session *session, + struct xrdp_rdp *rdp_layer); void APP_CC -xrdp_orders_delete(struct xrdp_orders* self); +xrdp_orders_delete(struct xrdp_orders *self); int APP_CC -xrdp_orders_reset(struct xrdp_orders* self); +xrdp_orders_reset(struct xrdp_orders *self); int APP_CC -xrdp_orders_init(struct xrdp_orders* self); +xrdp_orders_init(struct xrdp_orders *self); int APP_CC -xrdp_orders_send(struct xrdp_orders* self); +xrdp_orders_send(struct xrdp_orders *self); int APP_CC -xrdp_orders_force_send(struct xrdp_orders* self); +xrdp_orders_force_send(struct xrdp_orders *self); int APP_CC -xrdp_orders_check(struct xrdp_orders* self, int max_size); +xrdp_orders_check(struct xrdp_orders *self, int max_size); int APP_CC -xrdp_orders_rect(struct xrdp_orders* self, int x, int y, int cx, int cy, - int color, struct xrdp_rect* rect); +xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy, + int color, struct xrdp_rect *rect); int APP_CC -xrdp_orders_screen_blt(struct xrdp_orders* self, int x, int y, +xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int srcx, int srcy, - int rop, struct xrdp_rect* rect); + int rop, struct xrdp_rect *rect); int APP_CC -xrdp_orders_pat_blt(struct xrdp_orders* self, int x, int y, +xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int rop, int bg_color, - int fg_color, struct xrdp_brush* brush, - struct xrdp_rect* rect); + int fg_color, struct xrdp_brush *brush, + struct xrdp_rect *rect); int APP_CC -xrdp_orders_dest_blt(struct xrdp_orders* self, int x, int y, +xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int rop, - struct xrdp_rect* rect); + struct xrdp_rect *rect); int APP_CC -xrdp_orders_line(struct xrdp_orders* self, int mix_mode, +xrdp_orders_line(struct xrdp_orders *self, int mix_mode, int startx, int starty, int endx, int endy, int rop, int bg_color, - struct xrdp_pen* pen, - struct xrdp_rect* rect); + struct xrdp_pen *pen, + struct xrdp_rect *rect); int APP_CC -xrdp_orders_mem_blt(struct xrdp_orders* self, int cache_id, +xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id, int color_table, int x, int y, int cx, int cy, int rop, int srcx, int srcy, - int cache_idx, struct xrdp_rect* rect); + int cache_idx, struct xrdp_rect *rect); int APP_CC -xrdp_orders_composite_blt(struct xrdp_orders* self, int srcidx, +xrdp_orders_composite_blt(struct xrdp_orders *self, int srcidx, int srcformat, int srcwidth, - int srcrepeat, int* srctransform, int mskflags, + int srcrepeat, int *srctransform, int mskflags, int mskidx, int mskformat, int mskwidth, int mskrepeat, int op, int srcx, int srcy, int mskx, int msky, int dstx, int dsty, int width, int height, int dstformat, - struct xrdp_rect* rect); + struct xrdp_rect *rect); int APP_CC -xrdp_orders_text(struct xrdp_orders* self, +xrdp_orders_text(struct xrdp_orders *self, int font, int flags, int mixmode, int fg_color, int bg_color, int clip_left, int clip_top, int clip_right, int clip_bottom, int box_left, int box_top, int box_right, int box_bottom, - int x, int y, char* data, int data_len, - struct xrdp_rect* rect); + int x, int y, char *data, int data_len, + struct xrdp_rect *rect); int APP_CC -xrdp_orders_send_palette(struct xrdp_orders* self, int* palette, +xrdp_orders_send_palette(struct xrdp_orders *self, int *palette, int cache_id); int APP_CC -xrdp_orders_send_raw_bitmap(struct xrdp_orders* self, - int width, int height, int bpp, char* data, +xrdp_orders_send_raw_bitmap(struct xrdp_orders *self, + int width, int height, int bpp, char *data, int cache_id, int cache_idx); int APP_CC -xrdp_orders_send_bitmap(struct xrdp_orders* self, - int width, int height, int bpp, char* data, +xrdp_orders_send_bitmap(struct xrdp_orders *self, + int width, int height, int bpp, char *data, int cache_id, int cache_idx); int APP_CC -xrdp_orders_send_font(struct xrdp_orders* self, - struct xrdp_font_char* font_char, +xrdp_orders_send_font(struct xrdp_orders *self, + struct xrdp_font_char *font_char, int font_index, int char_index); int APP_CC -xrdp_orders_send_raw_bitmap2(struct xrdp_orders* self, - int width, int height, int bpp, char* data, +xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, + int width, int height, int bpp, char *data, int cache_id, int cache_idx); int APP_CC -xrdp_orders_send_bitmap2(struct xrdp_orders* self, - int width, int height, int bpp, char* data, +xrdp_orders_send_bitmap2(struct xrdp_orders *self, + int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints); int APP_CC -xrdp_orders_send_bitmap3(struct xrdp_orders* self, - int width, int height, int bpp, char* data, +xrdp_orders_send_bitmap3(struct xrdp_orders *self, + int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints); int APP_CC -xrdp_orders_send_brush(struct xrdp_orders* self, int width, int height, - int bpp, int type, int size, char* data, int cache_id); +xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height, + int bpp, int type, int size, char *data, int cache_id); int APP_CC -xrdp_orders_send_create_os_surface(struct xrdp_orders* self, int id, +xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id, int width, int height, - struct list* del_list); + struct list *del_list); int APP_CC -xrdp_orders_send_switch_os_surface(struct xrdp_orders* self, int id); +xrdp_orders_send_switch_os_surface(struct xrdp_orders *self, int id); /* xrdp_bitmap_compress.c */ int APP_CC -xrdp_bitmap_compress(char* in_data, int width, int height, - struct stream* s, int bpp, int byte_limit, - int start_line, struct stream* temp_s, +xrdp_bitmap_compress(char *in_data, int width, int height, + struct stream *s, int bpp, int byte_limit, + int start_line, struct stream *temp_s, int e); int APP_CC -xrdp_bitmap32_compress(char* in_data, int width, int height, - struct stream* s, int bpp, int byte_limit, - int start_line, struct stream* temp_s, +xrdp_bitmap32_compress(char *in_data, int width, int height, + struct stream *s, int bpp, int byte_limit, + int start_line, struct stream *temp_s, int e); int APP_CC -xrdp_jpeg_compress(void *handle, char* in_data, int width, int height, - struct stream* s, int bpp, int byte_limit, - int start_line, struct stream* temp_s, +xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, + struct stream *s, int bpp, int byte_limit, + int start_line, struct stream *temp_s, int e, int quality); int APP_CC @@ -540,16 +540,16 @@ xrdp_jpeg_deinit(void *handle); /* xrdp_channel.c */ struct xrdp_channel* APP_CC -xrdp_channel_create(struct xrdp_sec* owner, struct xrdp_mcs* mcs_layer); +xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer); void APP_CC -xrdp_channel_delete(struct xrdp_channel* self); +xrdp_channel_delete(struct xrdp_channel *self); int APP_CC -xrdp_channel_init(struct xrdp_channel* self, struct stream* s); +xrdp_channel_init(struct xrdp_channel *self, struct stream *s); int APP_CC -xrdp_channel_send(struct xrdp_channel* self, struct stream* s, int channel_id, +xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id, int total_data_len, int flags); int APP_CC -xrdp_channel_process(struct xrdp_channel* self, struct stream* s, +xrdp_channel_process(struct xrdp_channel *self, struct stream *s, int chanid); /* xrdp_fastpath.c */ -- cgit v1.2.1 From b142a59e69ee2b4a721641fe7f5dc9dadb2bb020 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 17 Jun 2014 22:41:10 -0700 Subject: libxrdp: changes for planar compression --- libxrdp/libxrdp.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 2ea8b61d..ddfe260b 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -117,9 +117,10 @@ struct xrdp_sec void *decrypt_rc4_info; void *encrypt_rc4_info; char pub_exp[4]; - char pub_mod[64]; + char pub_mod[256]; char pub_sig[64]; - char pri_exp[64]; + char pri_exp[256]; + int rsa_key_bytes; /* 64 or 256 */ int channel_code; int multimon; char fips_encrypt_key[24]; @@ -509,7 +510,7 @@ int APP_CC xrdp_bitmap32_compress(char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, - int e); + int e, int flags); int APP_CC xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, -- cgit v1.2.1 From a16b83ac8a1cb97fc2b16c79c6bf96c63a26016a Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Wed, 18 Jun 2014 21:10:15 -0700 Subject: libxrdp: remove some alloc / free --- libxrdp/libxrdp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index ddfe260b..68ec1573 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -265,6 +265,9 @@ struct xrdp_orders struct xrdp_orders_state orders_state; void *jpeg_han; int rfx_min_pixel; + /* shared */ + struct stream *s; + struct stream *temp_s; }; #define PROTO_RDP_40 1 -- cgit v1.2.1 From bd810c0695f36f9713043b8e085b05b420069532 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Wed, 18 Jun 2014 22:02:58 -0700 Subject: support 2048 bit RSA keys --- libxrdp/libxrdp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 68ec1573..e56f70dd 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -100,8 +100,8 @@ struct xrdp_sec struct xrdp_fastpath *fastpath_layer; struct xrdp_channel *chan_layer; char server_random[32]; - char client_random[64]; - char client_crypt_random[72]; + char client_random[256]; + char client_crypt_random[256 + 8]; /* 64 + 8, 256 + 8 */ struct stream client_mcs_data; struct stream server_mcs_data; int decrypt_use_count; -- cgit v1.2.1 From 9795ce010a8d461090cc79af6957713d35053bb1 Mon Sep 17 00:00:00 2001 From: Idan Freiberg Date: Thu, 10 Jul 2014 15:40:16 +0300 Subject: libxrdp: changes in rdp security layer negotiation --- libxrdp/libxrdp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index e56f70dd..f702c280 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -42,8 +42,10 @@ struct xrdp_iso { struct xrdp_mcs *mcs_layer; /* owner */ + int rdpNegData; /* bool */ int requestedProtocol; int selectedProtocol; + int failureCode; struct trans *trans; }; -- cgit v1.2.1 From f0b6c6b1d178419ae82ad1c8ea2d74c97cc2f27b Mon Sep 17 00:00:00 2001 From: Idan Freiberg Date: Tue, 15 Jul 2014 18:29:40 +0300 Subject: libxrdp: started adding TLS support --- libxrdp/libxrdp.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index f702c280..c2800abf 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -36,6 +36,7 @@ #include "libxrdpinc.h" #include "file_loc.h" #include "xrdp_client_info.h" +#include /* iso */ @@ -131,6 +132,7 @@ struct xrdp_sec void *encrypt_fips_info; void *decrypt_fips_info; void *sign_fips_info; + struct xrdp_tls *tls; }; /* channel */ @@ -290,6 +292,30 @@ struct xrdp_mppc_enc tui16 *hash_table; }; + +/* xrdp_tls */ +struct xrdp_tls { + SSL *ssl; + SSL_CTX *ctx; + char *cert; + char *key; + struct trans *trans; +}; + +/* xrdp_tls.c */ +struct xrdp_tls *APP_CC +xrdp_tls_create(struct trans *trans, const char *key, const char *cert); +int APP_CC +xrdp_tls_accept(struct xrdp_tls *self); +int APP_CC +xrdp_tls_disconnect(struct xrdp_tls *self); +void APP_CC +xrdp_tls_delete(struct xrdp_tls *self); +int APP_CC +xrdp_tls_read(struct xrdp_tls *tls, unsigned char *data, int length); +int APP_CC +xrdp_tls_write(struct xrdp_tls *tls, unsigned char *data, int length); + int APP_CC compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len); struct xrdp_mppc_enc * APP_CC -- cgit v1.2.1 From 7ab1d887aecf7883b1254cd97ecfee02de45b74a Mon Sep 17 00:00:00 2001 From: Idan Freiberg Date: Thu, 17 Jul 2014 14:29:23 +0300 Subject: libxrdp: work on TLS support --- libxrdp/libxrdp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index c2800abf..4ce39eb3 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -312,9 +312,9 @@ xrdp_tls_disconnect(struct xrdp_tls *self); void APP_CC xrdp_tls_delete(struct xrdp_tls *self); int APP_CC -xrdp_tls_read(struct xrdp_tls *tls, unsigned char *data, int length); +xrdp_tls_force_read_s(struct trans *self, struct stream *in_s, int size); int APP_CC -xrdp_tls_write(struct xrdp_tls *tls, unsigned char *data, int length); +xrdp_tls_force_write_s(struct trans *self, struct stream *out_s); int APP_CC compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len); -- cgit v1.2.1 From afdf638c7b56e7420e32853df6299d9217e0f8d4 Mon Sep 17 00:00:00 2001 From: Idan Freiberg Date: Wed, 23 Jul 2014 15:31:45 +0300 Subject: libxrdp, common: work on TLS mode --- libxrdp/libxrdp.h | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'libxrdp/libxrdp.h') diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 4ce39eb3..0bda9f45 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -36,7 +36,6 @@ #include "libxrdpinc.h" #include "file_loc.h" #include "xrdp_client_info.h" -#include /* iso */ @@ -123,16 +122,13 @@ struct xrdp_sec char pub_mod[256]; char pub_sig[64]; char pri_exp[256]; - int rsa_key_bytes; /* 64 or 256 */ - int channel_code; - int multimon; + int rsa_key_bytes; /* 64 or 256 , 0 = no rdp security */ char fips_encrypt_key[24]; char fips_decrypt_key[24]; char fips_sign_key[20]; void *encrypt_fips_info; void *decrypt_fips_info; void *sign_fips_info; - struct xrdp_tls *tls; }; /* channel */ @@ -293,29 +289,6 @@ struct xrdp_mppc_enc }; -/* xrdp_tls */ -struct xrdp_tls { - SSL *ssl; - SSL_CTX *ctx; - char *cert; - char *key; - struct trans *trans; -}; - -/* xrdp_tls.c */ -struct xrdp_tls *APP_CC -xrdp_tls_create(struct trans *trans, const char *key, const char *cert); -int APP_CC -xrdp_tls_accept(struct xrdp_tls *self); -int APP_CC -xrdp_tls_disconnect(struct xrdp_tls *self); -void APP_CC -xrdp_tls_delete(struct xrdp_tls *self); -int APP_CC -xrdp_tls_force_read_s(struct trans *self, struct stream *in_s, int size); -int APP_CC -xrdp_tls_force_write_s(struct trans *self, struct stream *out_s); - int APP_CC compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len); struct xrdp_mppc_enc * APP_CC @@ -370,9 +343,8 @@ int APP_CC xrdp_mcs_disconnect(struct xrdp_mcs *self); /* xrdp_sec.c */ -struct xrdp_sec * APP_CC -xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans, int crypt_level, - int channel_code, int multimon); +struct xrdp_sec *APP_CC +xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans); void APP_CC xrdp_sec_delete(struct xrdp_sec *self); int APP_CC @@ -392,8 +364,6 @@ xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan); int APP_CC xrdp_sec_process_mcs_data(struct xrdp_sec *self); int APP_CC -xrdp_sec_out_mcs_data(struct xrdp_sec *self); -int APP_CC xrdp_sec_incoming(struct xrdp_sec *self); int APP_CC xrdp_sec_disconnect(struct xrdp_sec *self); -- cgit v1.2.1