summaryrefslogtreecommitdiffstats
path: root/libvncserver
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'kanaka/websockets' into websocketsGernot Tenchio2011-08-303-251/+171
|\ | | | | | | | | Conflicts: libvncserver/websockets.c
| * rfbssl_gnutls: Merge rfbssl_peek/rfbssl_read into one functionGernot Tenchio2011-08-301-53/+35
| |
| * websockets: fix webSocketCheckDisconnect()Gernot Tenchio2011-08-301-1/+1
| | | | | | | | Do not consume the peeked data if no close frame was detected.
| * websockets: use 32bit Xor in webSocketsDecodeHybi()Gernot Tenchio2011-08-291-5/+10
| |
| * Add sha1.*. Remove UTF-8 encode. Protocol handling.Joel Martin2011-08-252-176/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add common/sha1.h and common/sha1.c so that we have the SHA routines even if openssl is not available. From the IETF SHA RFC example code. Remove the UTF-8 encoding hack. This was really just an experiment. If the protocol passed in the handshake has "binary" then don't base64 encode for the HyBi protocol. This will allow noVNC to request the binary data be passed raw and not base64 encoded. Unfortunately, the client doesn't speak first in VNC protocol (bad original design). If it did then we could determine whether to base64 encode or not based on the first HyBi frame from the client and whether the binary bit is set or not. Oh well. Misc Cleanup: - Always free response and buf in handshake routine. - Remove some unused variables.
* | websockets: nothing to worry aboutGernot Tenchio2011-08-251-4/+5
| |
* | websockets: added gcrypt based sha1 digest funtionGernot Tenchio2011-08-251-0/+15
| |
* | websockets: remove warning on 64bit platformsGernot Tenchio2011-08-251-1/+1
|/
* websockets: Removed debugging left overGernot Tenchio2011-08-251-1/+1
|
* websockets: Use callback functions for encode/decodeGernot Tenchio2011-08-251-17/+32
|
* websockets: Move Hixie disconnect hack to websockets.cGernot Tenchio2011-08-253-76/+79
| | | | | | Move the hixie disconnect hack to websockets.c. Removed the remaining websockets vars from rfbClientPtr, so all websockets stuff is hidden behind an opaque pointer.
* websockets: Initial HyBi supportGernot Tenchio2011-08-253-45/+392
|
* websockets: Add wspath member to rfbClientRecGernot Tenchio2011-08-172-0/+2
| | | | | | | Added wspath member to rfbClientRec which holds the path component of the initial websocket request. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Move libvncserver/md5* to commonGernot Tenchio2011-08-173-597/+1
| | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Add SSL cert command line options.Joel Martin2011-08-172-0/+15
| | | | | | | - Add --sslcertfile and --sslkeyfile. These should really be combined with the existing x11vnc command line options for SSL support. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: add GnuTLS and OpenSSL supportGernot Tenchio2011-08-173-1/+433
| | | | | | | | | | For now, only OpenSSL support is activated through configure, since GnuTLS is only used in LibVNCClient. [jes: separated this out from the commit adding encryption support, added autoconf support.] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Add encryption supportGernot Tenchio2011-08-176-26/+196
| | | | | | | [jes: moved out GnuTLS and OpenSSL support, added a dummy support, to separate changes better, and to keep things compiling] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Properly parse Hixie-76 handshake.Joel Martin2011-08-171-21/+28
| | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Add UTF-8 encoding support.Joel Martin2011-08-172-46/+88
| | | | | | | | | | | | | | | This is not completely standard UTF-8 encoding. Only code points 0-255 are encoded and never encoded to more than two octets. Since '\x00' is a WebSockets framing character, it's easier for all parties to encode zero as '\xc4\x80', i.e. 194+128, i.e. UTF-8 256. This means that a random stream will be slightly more than 50% larger using this encoding scheme. But it's easy CPU-wise for client and server to decode/encode. This is especially important for clients written in languages that have weak bitops, like Javascript (i.e. the noVNC client). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Better disconnect detection.Joel Martin2011-08-171-0/+5
| | | | | | | If the only thing we are waiting on is a WebSockets terminator, then remove it from the stream early on in rfbProcessClientNormalMessage. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Initial WebSockets support.Joel Martin2011-08-176-2/+1164
| | | | | | | | | | | | | | Has a bug: WebSocket client disconnects are not detected. rfbSendFramebufferUpdate is doing a MSG_PEEK recv to determine if enough data is available which prevents a disconnect from being detected. Otherwise it's working pretty well. [jes: moved added struct members to the end for binary compatibility with previous LibVNCServer versions, removed an unused variable] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* tightPng: check even for SendGradientRect.Joel Martin2011-07-221-0/+6
| | | | Signed-off-by: Christian Beier <dontmind@freeshell.org>
* tightPng: Add initial tightPng encoding support.Joel Martin2011-07-224-48/+331
| | | | | | | http://wiki.qemu.org/VNC_Tight_PNG Signed-off-by: Joel Martin <github@martintribe.org> Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Remove some unused variables.Christian Beier2011-06-012-3/+0
|
* Fix rfbProcessNewConnection to return some value instead of void.George Kiagiadakis2011-06-011-6/+9
| | | | | | BUG: 256891 Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Split two event-loop related functions out of the rfbProcessEvents() mechanism.George Kiagiadakis2011-06-012-56/+79
| | | | | | | This is required to be able to do proper event loop integration with Qt. Idea was taken from vino's libvncserver fork. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Fix buffer overflowCristian Rodríguez2011-05-091-1/+1
| | | | | Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org> Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Revert "Fix memory corruption bug."Christian Beier2011-04-301-2/+0
| | | | | | This reverts commit c1363fa9583ed41b94fbc79b3ff410b7d5189407. The proper fix was already in 804335f9d296440bb708ca844f5d89b58b50b0c6.
* Fix memory corruption bug.George Kiagiadakis2011-04-281-0/+2
| | | | | | | | This bug occured when a second telepathy tubes client was connected after the first one had disconnected and the channel (thus, the screen too) had been destroyed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Fix compilation in c89 mode.George Kiagiadakis2011-04-284-6/+6
| | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Fix regression in Ultra encoding introduced by commit ↵Christian Beier2011-03-171-1/+1
| | | | | | fe1ca16e9b75b5f38ab374c8dfff92d2c3ea4532. My bad. There we see what the encodings test is good for ;-)
* Fix (most) MinGW32 compiler warnings.Christian Beier2011-03-172-4/+4
|
* Fix remaining compiler warnings.Christian Beier2011-03-172-9/+0
|
* Set proper file permissions for source files.Christian Beier2011-03-1019-0/+0
|
* Call WSAGetLastError() everywhere errno is read after a Winsock call.Christian Beier2011-03-033-0/+12
| | | | | Winsock does NOT update errno for us, we have fetch the last error manually using WSAGetLastError().
* Update minilzo library used for Ultra encoding to ver 2.04.Christian Beier2011-02-261-1/+1
| | | | | | | | | | According to the minilzo README, this brings a significant speedup on 64-bit architechtures. Changes compared to old version 1.08 can be found here: http://www.oberhumer.com/opensource/lzo/lzonews.php Signed-off-by: Christian Beier <dontmind@freeshell.org>
* libvncserver: Make RRE, CoRRE and Ultra encodings thread-safe.Christian Beier2011-02-076-159/+96
| | | | | | | This adds generic before/after encoding buffers to the rfbClient struct, so there is no need for thread local storage. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Remove unneeded files concerning CVS.Christian Beier2011-01-312-8/+0
| | | | | | We have a git repo nowadays and I guess we won't go back to CVS. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Put files used by both libs into a 'common' dir.Christian Beier2011-01-258-5019/+5
| | | | | | | | | No functional changes. All files used by _both_ libvncserver and libvncclient are put into a 'common' directory and references from other files as well as Autotools and CMake build systems are updated. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Fix two errors found by cppcheckebola_rulez2011-01-201-1/+5
| | | | | Signed-off-by: Vic Lee <llyzs@163.com> Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Remove never used protocol version name string.runge2011-01-011-8/+3
|
* libvncserver sockets: check cl->screen before accessing itTobias Doerffel2010-12-011-2/+2
| | | | | | | | | In commit 079394ca5b14d8067b95a9cf95a834828b4425a6 new code with insufficient checks was introduced causing a segfault when doing a HTTP server connection. Such connections have no screen set in the client data structure. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
* libvncserver: fix endless loop when server closed client in threaded mode.Christian Beier2010-11-181-5/+5
| | | | Signed-off-by: Christian Beier <dontmind@freeshell.org>
* libvncserver sockets: favor per-screen maxclientwait over global one when set.Christian Beier2010-11-181-3/+8
| | | | Signed-off-by: Christian Beier <dontmind@freeshell.org>
* libvncserver cleanup: remove rfbKeyFrame remnants.Christian Beier2010-11-112-4/+0
|
* libvnc[server|client]: implement xvp VNC extension.Christian Beier2010-11-023-2/+64
| | | | | | | This implements the xvp VNC extension, which is described in the community version of the RFB protocol: http://tigervnc.sourceforge.net/cgi-bin/rfbproto It is also mentioned in the official RFB protocol.
* Added missing initialization of extension mutexTobias Doerffel2010-10-291-0/+5
| | | | | | | | | | When not calling rfbRegisterProtocolExtension() the extension mutex is uninitialized but used upon calling rfbGetExtensionIterator() and rfbReleaseExtensionIterator() in rfbNewTCPOrUDPClient(). This causes libvncserver to crash on Win32 when building with thread support. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com> Signed-off-by: Christian Beier <dontmind@freeshell.org>
* In rfbSendDirContent() we have to make sure to call closedir() beforeTobias Doerffel2010-10-201-1/+5
| | | | | | returning. This did not happen if rfbSendFileTransferMessage() failed. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Non-blocking sockets for Windows.Christian Beier2010-09-133-39/+31
| | | | | | | | | | | Expands the SetNonBlocking() function in libvncclient/sockets.c to also work under Windows and also changes it to honour maybe already present socket flags. A similar function was introduced for libvncserver as well and all the #ifdef'ed fnctl calls replaced with calls to that one. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Cleanup: remove CORBA stuff.Christian Beier2010-09-133-20/+1
| | | | | | | The header file and most of the functions referred to do not exist in libvncserver. Signed-off-by: Christian Beier <dontmind@freeshell.org>