[Qemu-devel] [PATCH v2] TLS support for VNC Websockets

2013-04-23 Thread Tim Hardeck
ork before) Nevertheless to my knowledge there is no HTML 5 VNC client which supports it and the Websocket connection can be encrypted with regular TLS now so it should be fine for most use cases. Signed-off-by: Tim Hardeck --- Changes v2 * a peek buffer of 4 Byte is enough --- qemu-options.hx

Re: [Qemu-devel] [PATCH] Initial TLS support for VNC Websockets

2013-04-19 Thread Tim Hardeck
Hi, did anybody had time yet to review my patch? Regards Tim -- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5, 90409 Nürnberg, Germany T: +49 (0) 911 74053-0 F: +49 (0) 911 74053-483 http://www.suse.de/ signature.asc Descri

Re: [Qemu-devel] VNC Websocket TLS support design decisions

2013-04-12 Thread Tim Hardeck
Hi, I have sent in my current implementation some minutes ago. On 04/11/2013 03:33 PM, Tim Hardeck wrote: Websockets over TLS need certificates. We already have the "x509" vnc parameter for VNC-TLS to provide the certificates but user might have one webserver certificate and one f

[Qemu-devel] [PATCH] Initial TLS support for VNC Websockets

2013-04-12 Thread Tim Hardeck
ork before) Nevertheless to my knowledge there is no HTML 5 VNC client which supports it and the Websocket connection can be encrypted with regular TLS now so it should be fine for most use cases. Signed-off-by: Tim Hardeck --- qemu-options.hx | 2 ++ ui/vnc-tls.c| 61 +++

[Qemu-devel] VNC Websocket TLS support design decisions

2013-04-11 Thread Tim Hardeck
Hi, I am working on TLS support for VNC Websockets in QEMU and while I already got it working I need to make some design decisions. Websockets over TLS need certificates. We already have the "x509" vnc parameter for VNC-TLS to provide the certificates but user might have one webserver certifi

Re: [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS

2013-02-17 Thread Tim Hardeck
Hi, On Thu, 2012-10-18 at 11:23 +0200, Gerd Hoffmann wrote: > On 10/18/12 11:16, Andre Przywara wrote: > > In my installation of GNU-TLS (v3.0.23) the type > > gnutls_anon_server_credentials is marked deprecated, so -Werror > > breaks compilation. > > Simply replacing it with the newer ..._t versi

Re: [Qemu-devel] [PATCH] vnc: Clean up vncws_send_handshake_response()

2013-01-25 Thread Tim Hardeck
Hi Markus, thanks for your input. On Wed, 2013-01-23 at 18:16 +0100, Markus Armbruster wrote: > Use appropriate types, drop superfluous casts, use sizeof, don't > exploit that this particular call of gnutls_fingerprint() doesn't > change its last argument. your patch does work fine but if we exp

Re: [Qemu-devel] [PATCH] vnc: Clean up vncws_send_handshake_response()

2013-01-24 Thread Tim Hardeck
Hi Markus, On 01/23/2013 06:16 PM, Markus Armbruster wrote: > Use appropriate types, drop superfluous casts, use sizeof, don't > exploit that this particular call of gnutls_fingerprint() doesn't > change its last argument. > > Signed-off-by: Markus Armbruster Reviewed-

[Qemu-devel] [PATCH 3/3] vnc: fix possible uninitialized removals

2013-01-21 Thread Tim Hardeck
Some VncState values are not initialized before the Websocket handshake. If it fails QEMU segfaults during the cleanup. To prevent this behavior intialization checks are added. Signed-off-by: Tim Hardeck --- ui/vnc.c | 11 --- ui/vnc.h |1 + 2 files changed, 9 insertions(+), 3

[Qemu-devel] [PATCH 1/3] vnc: added buffer_advance function

2013-01-21 Thread Tim Hardeck
Following Anthony Liguori's Websocket implementation I have added the buffer_advance function to VNC and replaced all related buffer memmove operations with it. Signed-off-by: Tim Hardeck Reviewed-by: Anthony Liguori --- ui/vnc.c | 13 + ui/vnc.h |1 + 2 files change

[Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support

2013-01-21 Thread Tim Hardeck
rts of the implementation base on Anthony Liguori's QEMU Websocket patch from 2010 and on Joel Martin's LibVNC Websocket implementation. Signed-off-by: Tim Hardeck --- configure| 27 +- qemu-options.hx |8 ++ ui/Makefil

[Qemu-devel] [PATCH 0/3 v7] vnc: added initial websocket protocol support

2013-01-21 Thread Tim Hardeck
te to prevent crashes during vnc_disconnect - the previously added initialization checks didn't prevent segfaults when a websocket client was connected Changes v6 * incorporated suggestions from "Blue Swirl" * updated vncws_handshake_read to check for the header end tag and to not reset th

Re: [Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support

2013-01-11 Thread Tim Hardeck
On 01/08/2013 01:38 AM, Anthony Liguori wrote: > Better, but I still think it's better to advance the buffer based on the > parsed header sizes that to assume there's no additional data. I have used buffer_advance in the patch set v6. Does anything else need to be changed? Regards Tim -- SUSE L

[Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support

2013-01-08 Thread Tim Hardeck
rts of the implementation base on Anthony Liguori's QEMU Websocket patch from 2010 and on Joel Martin's LibVNC Websocket implementation. Signed-off-by: Tim Hardeck --- configure| 27 +- qemu-options.hx |8 ++ ui/Makefil

[Qemu-devel] [PATCH 3/3] vnc: fix possible uninitialized removals

2013-01-08 Thread Tim Hardeck
Some VncState values are not initialized before the Websocket handshake. If it fails QEMU segfaults during the cleanup. To prevent this behavior intialization checks are added. Signed-off-by: Tim Hardeck --- ui/vnc.c | 11 --- ui/vnc.h |1 + 2 files changed, 9 insertions(+), 3

[Qemu-devel] [PATCH 1/3] vnc: added buffer_advance function

2013-01-08 Thread Tim Hardeck
Following Anthony Liguori's Websocket implementation I have added the buffer_advance function to VNC and replaced all related buffer memmove operations with it. Signed-off-by: Tim Hardeck --- ui/vnc.c | 13 + ui/vnc.h |1 + 2 files changed, 10 insertions(+), 4 dele

[Qemu-devel] [PATCH 0/3 v6] vnc: added initial websocket protocol support

2013-01-08 Thread Tim Hardeck
te to prevent crashes during vnc_disconnect - the previously added initialization checks didn't prevent segfaults when a websocket client was connected Changes v6 * incorporated suggestions from "Blue Swirl" * updated vncws_handshake_read to check for the header end tag and t

Re: [Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support

2013-01-07 Thread Tim Hardeck
Hi Anthony, thanks for your feedback. On Mon, 2013-01-07 at 13:52 -0600, Anthony Liguori wrote: > Tim Hardeck writes: > > +void vncws_handshake_read(void *opaque) > > +{ > > +VncState *vs = opaque; > > +long ret; > > +buffer_reserve(&

Re: [Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support

2013-01-05 Thread Tim Hardeck
Hi, thanks for your suggestions. On Fri, 2013-01-04 at 20:20 +, Blue Swirl wrote: > On Wed, Jan 2, 2013 at 1:29 PM, Tim Hardeck wrote: > > + * We are working around a bug present in GCC < 4.6 which prevented > > + * it from recognizing anonymous

[Qemu-devel] [PATCH 0/3 v5] vnc: added initial websocket protocol support

2013-01-02 Thread Tim Hardeck
te to prevent crashes during vnc_disconnect - the previously added initialization checks didn't prevent segfaults when a websocket client was connected Tim Hardeck (3): vnc: added buffer_advance function vnc: added initial websocket protocol support vnc: fix possible uninitialized removals

[Qemu-devel] [PATCH 1/3] vnc: added buffer_advance function

2013-01-02 Thread Tim Hardeck
Following Anthony Liguori's Websocket implementation I have added the buffer_advance function to VNC and replaced all related buffer memmove operations with it. Signed-off-by: Tim Hardeck --- ui/vnc.c | 13 + ui/vnc.h |1 + 2 files changed, 10 insertions(+), 4 dele

[Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support

2013-01-02 Thread Tim Hardeck
rts of the implementation base on Anthony Liguori's QEMU Websocket patch from 2010 and on Joel Martin's LibVNC Websocket implementation. Signed-off-by: Tim Hardeck --- configure| 27 +- qemu-options.hx |8 ++ ui/Makefil

[Qemu-devel] [PATCH 3/3] vnc: fix possible uninitialized removals

2013-01-02 Thread Tim Hardeck
Some VncState values are not initialized before the Websocket handshake. If it fails QEMU segfaults during the cleanup. To prevent this behavior intialization checks are added. Signed-off-by: Tim Hardeck --- ui/vnc.c | 11 --- ui/vnc.h |1 + 2 files changed, 9 insertions(+), 3

[Qemu-devel] [Bug 1087974] Re: [regression] vnc tight png produces garbled output

2012-12-14 Thread Tim Hardeck
The patch does fix the issue for me, thanks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1087974 Title: [regression] vnc tight png produces garbled output Status in QEMU: New Bug description:

Re: [Qemu-devel] [PATCH 2/3 v4] vnc: added initial websocket protocol support

2012-12-12 Thread Tim Hardeck
On 12/11/2012 11:04 AM, Stefan Hajnoczi wrote: > On Fri, Dec 07, 2012 at 03:56:34PM +0100, Tim Hardeck wrote: > > Thanks for addressing my review comments. > >> @@ -1328,13 +1358,14 @@ void vnc_client_read(void *opaque) >> >> void vnc_write(VncState *vs

[Qemu-devel] [Bug 1087974] Re: [regression] vnc tight png produces garbled output

2012-12-11 Thread Tim Hardeck
If you had opened vnc.html before the rfb.js might be still in the browser cache, at least I had a similar issue once. I have tested this with Chrome but I think it happened in Firefox too. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

[Qemu-devel] [Bug 1087974] Re: [regression] vnc tight png produces garbled output

2012-12-11 Thread Tim Hardeck
** Attachment added: "screenshot of the issue" https://bugs.launchpad.net/qemu/+bug/1087974/+attachment/3457223/+files/tight-png-compression-issue.png -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs

[Qemu-devel] [Bug 1087974] Re: [regression] vnc tight png produces garbled output

2012-12-11 Thread Tim Hardeck
* make sure that qemu is compiled with --enable-vnc-png * git clone git://github.com/kanaka/noVNC * edit include/rfb.js at line 50 and comment out or remove all encodings above "['TIGHT_PNG',-260 ]," * open vnc.html in Firefox or Chrome *apply either my patch to QEMU https://lists.nongnu

[Qemu-devel] [Bug 1087974] Re: [regression] vnc tight png produces garbled output

2012-12-10 Thread Tim Hardeck
47683d669f993308c2b84bed4ce64aafb5d7ced4 is the first bad commit commit 47683d669f993308c2b84bed4ce64aafb5d7ced4 Author: Gerd Hoffmann Date: Thu Oct 11 12:04:33 2012 +0200 pixman/vnc: remove rgb_prepare_row* functions Let pixman do it instead. Signed-off-by: Gerd Hoffmann :04000

[Qemu-devel] [Bug 1087974] [NEW] [regression] vnc tight png produces garbled output

2012-12-08 Thread Tim Hardeck
Public bug reported: VNC Tight PNG compression did work fine two or three month ago but don't anymore. Now when Tight PNG is used parts of the desktop are shown but they are scrambled together. I have always tested this feature against QEMU git with noVNC by only allowing Tight PNG compression.

[Qemu-devel] [PATCH 3/3] vnc: fix possible uninitialized removals

2012-12-07 Thread Tim Hardeck
Some VncState values are not initialized before the Websocket handshake. If it fails QEMU segfaults during the cleanup. To prevent this behavior intialization checks are added. Signed-off-by: Tim Hardeck --- ui/vnc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH 2/3 v4] vnc: added initial websocket protocol support

2012-12-07 Thread Tim Hardeck
rts of the implementation base on Anthony Liguori's QEMU Websocket patch from 2010 and on Joel Martin's LibVNC Websocket implementation. Signed-off-by: Tim Hardeck --- configure| 27 +- qemu-options.hx |8 ++ ui/Makefil

[Qemu-devel] [PATCH 1/3] vnc: added buffer_advance function

2012-12-07 Thread Tim Hardeck
Following Anthony Liguori's Websocket implementation I have added the buffer_advance function to VNC and replaced all related buffer memmove operations with it. Signed-off-by: Tim Hardeck --- ui/vnc.c | 13 + ui/vnc.h |1 + 2 files changed, 10 insertions(+), 4 dele

[Qemu-devel] [PATCH 0/3 v4] vnc: added initial websocket protocol support

2012-12-07 Thread Tim Hardeck
oved websockets encoding from vnc_write to its own client_write function * moved websockets decoding to its own client_read function * added initialization checks to vnc_disconnect to prevent crashes if a regular client connects to the websocket port Tim Hardeck (3): vnc: added buffer_advance function v

Re: [Qemu-devel] [PATCH v3] vnc: added initial websocket protocol support

2012-12-05 Thread Tim Hardeck
Hi Stefan, On 12/03/2012 05:22 PM, Stefan Hajnoczi wrote: > Thanks for the patch, Tim. Some general code review comments below. Thanks for the code review. I am going to incorporate them in my new patch. > I hope someone has time to review the VNC and WebSocket specific stuff. > I didn't check

[Qemu-devel] [PATCH v3] vnc: added initial websocket protocol support

2012-11-23 Thread Tim Hardeck
rts of the implementation base on Anthony Liguori's QEMU Websocket patch from 2010 and on Joel Martin's LibVNC Websocket implementation. Signed-off-by: Tim Hardeck --- Changes v2 * removed automatic websocket recognition * added new lwebsock socket on port 5700 + display when t

Re: [Qemu-devel] [PATCH v2] vnc: added initial websockets support

2012-11-20 Thread Tim Hardeck
On 11/20/2012 10:47 AM, Daniel P. Berrange wrote: > On Tue, Nov 20, 2012 at 10:21:58AM +0100, Tim Hardeck wrote: >> This patch adds basic Websockets version 13 - RFC 6455 - support to QEMU >> VNC. Binary encoding support on the client side is required. >> >> Because of

[Qemu-devel] [PATCH v2] vnc: added initial websockets support

2012-11-20 Thread Tim Hardeck
C Websocket connections. +By defintion the Websocket port is 5700+@var{display}. If @var{host} is +specified connections will only be allowed from this host. + @item password Require that password based authentication is used for client connections. diff --git a/ui/Makefile.objs b/ui/Makefile.obj

Re: [Qemu-devel] [PATCH] vnc: added initial websockets support

2012-11-19 Thread Tim Hardeck
On 11/19/2012 10:07 AM, Stefan Hajnoczi wrote: > On Mon, Nov 19, 2012 at 12:29:44AM +0100, Tim Hardeck wrote: >> Hi Stefan, >> >> thanks for your input but how should it be implemented? >> >> I personally would like activating Websockets as a VNC option like: &quo

Re: [Qemu-devel] [PATCH] vnc: added initial websockets support

2012-11-19 Thread Tim Hardeck
On 11/19/2012 09:56 AM, Gerd Hoffmann wrote: > On 11/19/12 00:29, Tim Hardeck wrote: >> Hi Stefan, >> >> thanks for your input but how should it be implemented? >> >> I personally would like activating Websockets as a VNC option like: >> " -vnc :0 -v

Re: [Qemu-devel] [PATCH] vnc: added initial websockets support

2012-11-18 Thread Tim Hardeck
vnc option. So is allowing more than one VNC command line entry in combination with having more than one VNC thread for the same display worth working on or do you have something different in mind? Regards Tim On Sun, 2012-11-18 at 10:31 +0100, Stefan Hajnoczi wrote: > On Fri, Nov 16, 2012 at

[Qemu-devel] [PATCH] vnc: added initial websockets support

2012-11-16 Thread Tim Hardeck
enabled. Parts of the implementation base on Anthony Liguori's QEMU Websockets patch from 2010 and on Joel Martin's LibVNC Websockets implementation. Signed-off-by: Tim Hardeck --- configure| 34 +++- ui/Makefile.objs |1 + ui/vnc-ws.c

[Qemu-devel] [PATCH] vnc: added initial websockets support

2012-11-16 Thread Tim Hardeck
have used parts of the LibVNC websockets implementation that's why I have added the GPL header to the new files. I hope that it is fine that way. Tim Hardeck (1): vnc: added initial websockets support configure| 34 +++- ui/Makefile.objs |1 + ui/vnc-ws.c |

Re: [Qemu-devel] [PATCH 2/2] qemu queue: fix uninitialized removals

2012-10-17 Thread Tim Hardeck
Hi Andreas, On Wednesday 17 October 2012 17:00:15 Andreas Färber wrote: > Tim, > > Am 14.10.2012 15:08, schrieb Tim Hardeck: > > When calling QTAILQ_REMOVE or QLIST_REMOVE on an unitialized list > > QEMU segfaults. > > Can this be reproduced by a user today? Or is this

[Qemu-devel] [PATCH 0/2] fix segfaults triggered by failed vnc handshakes

2012-10-14 Thread Tim Hardeck
While trying to adapt Anthony Liguori's websockets patches to the current standard I ran into some segfaults. They were triggered during disconnects due to failed VNC handshakes. I have added checks to prevent them. Tim Hardeck (2): vnc: fix segfault due to failed handshake qemu queue

[Qemu-devel] [PATCH 1/2] vnc: fix segfault due to failed handshake

2012-10-14 Thread Tim Hardeck
When the VNC server disconnects due to a failed handshake we don't have vs->bh allocated yet. Check for this case and don't delete it. Signed-off-by: Tim Hardeck --- ui/vnc.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index 01b

[Qemu-devel] [PATCH 2/2] qemu queue: fix uninitialized removals

2012-10-14 Thread Tim Hardeck
When calling QTAILQ_REMOVE or QLIST_REMOVE on an unitialized list QEMU segfaults. Check for this case specifically on item removal. Signed-off-by: Tim Hardeck --- qemu-queue.h |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu-queue.h b/qemu-queue.h index

[Qemu-devel] [PATCH 0/2] fix segfaults triggered by failed vnc handshakes

2012-10-09 Thread Tim Hardeck
While trying to adapt Anthony Liguori's websockets patches to the current standard I ran into some segfaults. They were triggered during disconnects due to failed VNC handshakes. I have added checks to prevent them. Tim Hardeck (2): vnc: fix segfault due to failed handshake qemu queue

[Qemu-devel] [PATCH 1/2] vnc: fix segfault due to failed handshake

2012-10-09 Thread Tim Hardeck
When the VNC server disconnects due to a failed handshake we don't have vs->bh allocated yet. Check for this case and don't delete it. Signed-off-by: Tim Hardeck --- ui/vnc.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index 01b

[Qemu-devel] [PATCH 2/2] qemu queue: fix uninitialized removals

2012-10-09 Thread Tim Hardeck
When calling QTAILQ_REMOVE or QLIST_REMOVE on an unitialized list QEMU segfaults. Check for this case specifically on item removal. Signed-off-by: Tim Hardeck --- qemu-queue.h |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu-queue.h b/qemu-queue.h index