Commit Graph

1108 Commits (e3b8aaab8638a974c5fb2cbe49d3d767e83cbfd0)
 

Author SHA1 Message Date
Johannes Schindelin e3b8aaab86 Update AUTHORS
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
George Fleury fba4818ae8 Fix memory leak
I was debbuging some code tonight and i found a pointer that is not been
freed, so i think there is maybe a memory leak, so it is...

there is the malloc caller reverse order:

( malloc cl->statEncList )
	<- rfbStatLookupEncoding
	<- rfbStatRecordEncodingSent
	<- rfbSendCursorPos
	<- rfbSendFramebufferUpdate
	<- rfbProcessEvents

I didnt look the whole libvncserver api, but i am using
rfbReverseConnection with rfbProcessEvents, and then when the client
connection dies, i am calling a rfbShutdownServer and rfbScreenCleanup,
but the malloc at rfbStatLookupEncoding isnt been freed.

So to free the stats i added a rfbResetStats(cl) after rfbPrintStats(cl)
at rfbClientConnectionGone in rfbserver.c before free the cl pointer. (at
rfbserver.c line 555). And this, obviously, is correcting the memory leak.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Johannes Schindelin 9d0b80059a Hopefully fix the crash when updating from 0.9.7 or earlier
For backwards-compatibility reasons, we can only add struct members to the
end. That way, existing callers still can use newer libraries, as the
structs are always allocated by the library (and therefore guaranteed to
have the correct size) and still rely on the same position of the parts
the callers know about.

Reported by Luca Falavigna.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Johannes Schindelin 84be9d3f49 SDLvncviewer: make it resizable by default
I got annoyed having to specify -resizable all the time; I never use it in
another mode anymore, since I am on a netbook.

The option -no-resizable was added to be able to switch off that feature.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier bffd9ee33b Merge branch 'websockets' 14 years ago
Christian Beier abec0aa8c3 This build warning is a libvncserver one, not for x11vnc.
Also, make it warn more generally when no known encryption lib is
available.
14 years ago
Christian Beier 7c0aa2a0c0 Merge branch 'websockets' of https://github.com/kanaka/libvncserver into websockets 14 years ago
Gernot Tenchio 78bd41ad5e md5: forced to use function names with leading underscores
Commented out the surrounding '#ifdef _LIBC' to build md5.o with
leading underscores. This is required to match the prototypes defined
in md5.h.
14 years ago
Christian Beier b1561e14a1 Merge branch 'websockets' of https://github.com/kanaka/libvncserver into websockets 14 years ago
Gernot Tenchio 170033a907 rfbcrypto_included: fix c&p errors 14 years ago
Christian Beier 419641f1f9 Merge remote branch 'kanaka/websockets' into websockets
Conflicts, resolved manually:
	libvncserver/Makefile.am
14 years ago
Gernot Tenchio d4cfc260fe rfbcrypto_polarssl: it was way to late last night... 14 years ago
Gernot Tenchio bd9cae3d12 Add support for different crypto implementations 14 years ago
Christian Beier cb0340ccc5 Autotools: Fix OpenSSL and GnuTLS advertisement. 14 years ago
Christian Beier 2046cc9abd Fix libvncserver GnuTLS init.
gnutls_certificate_set_x509_trust_file() returns the number of processed
certs and _not_ GNUTLS_E_SUCCESS (0) on success!
14 years ago
Christian Beier 98a9d49c05 Update AUTHORS regarding the websocket guys. 14 years ago
Gernot Tenchio eab1531525 configure: Add AM_SILENT_RULES
Working with “silent make mode” makes debugging a lot of easier
since warnings wont shadowed by useless compiler noise
14 years ago
Gernot Tenchio f6eeb5d383 cmake: set SOVERSION 14 years ago
Christian Beier fa458d48ec Autotools: Fix OpenSSL and GnuTLS advertisement. 14 years ago
Christian Beier 431518add4 Fix libvncserver GnuTLS init.
gnutls_certificate_set_x509_trust_file() returns the number of processed
certs and _not_ GNUTLS_E_SUCCESS (0) on success!
14 years ago
Christian Beier 507c3c7361 Update AUTHORS regarding the websocket guys. 14 years ago
Gernot Tenchio 2c45d08dd8 websocket: Use a single buffer for both, encoding and decoding 14 years ago
Gernot Tenchio 3eec976558 Merge branch 'kanaka/websockets' into websockets
Conflicts:
	libvncserver/websockets.c
14 years ago
Gernot Tenchio 7d1c1033c5 rfbssl_gnutls: Merge rfbssl_peek/rfbssl_read into one function 14 years ago
Gernot Tenchio b1671e6de9 websockets: fix webSocketCheckDisconnect()
Do not consume the peeked data if no close frame was detected.
14 years ago
Gernot Tenchio 0f2ac00f6e websockets: use 32bit Xor in webSocketsDecodeHybi() 14 years ago
Gernot Tenchio b16e8c2afb cmake: use sha1.c for websocket builds 14 years ago
Gernot Tenchio fd73186769 websockets: nothing to worry about 14 years ago
Gernot Tenchio 7b80ff5b3a websockets: added gcrypt based sha1 digest funtion 14 years ago
Joel Martin d8b7f7a7d6 Add sha1.*. Remove UTF-8 encode. Protocol handling.
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.
14 years ago
Gernot Tenchio 27eadfa899 cmake: make some noise 14 years ago
Gernot Tenchio e22b7acbc8 websockets: remove warning on 64bit platforms 14 years ago
Gernot Tenchio 099e5c8251 websockets: Removed debugging left over 14 years ago
Gernot Tenchio 72b18fdfb7 websockets: Use callback functions for encode/decode 14 years ago
Gernot Tenchio 55234a37fd websockets: Move Hixie disconnect hack to websockets.c
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.
14 years ago
Gernot Tenchio 1408866c86 websockets: Initial HyBi support 14 years ago
Gernot Tenchio 02651bacca cmake: don't link sdl libs to vnc libraries
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Gernot Tenchio 297072a691 websockets: Add wspath member to rfbClientRec
Added wspath member to rfbClientRec which holds the
path component of the initial websocket request.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Gernot Tenchio b543d48677 Move libvncserver/md5* to common
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Gernot Tenchio c2fb69f84d websockets: Add Websockets support to CMakeLists.txt
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Joel Martin 9afe4e1faa websockets: Add SSL cert command line options.
- 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>
14 years ago
Gernot Tenchio a2a6e25699 websockets: add GnuTLS and OpenSSL support
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>
14 years ago
Gernot Tenchio 4aa3586367 websockets: Add encryption support
[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>
14 years ago
Joel Martin 7a77cc32b2 websockets: Properly parse Hixie-76 handshake.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Joel Martin 430b8f2449 websockets: Add UTF-8 encoding support.
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>
14 years ago
Joel Martin 0860c4951f websockets: Better disconnect detection.
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>
14 years ago
Joel Martin 6fac22a74b websockets: Initial WebSockets support.
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>
14 years ago
Johannes Schindelin 629fe03d61 .gitignore: zippy has moved
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier 5dfe0b05a2 Add installation hints to android example README. 14 years ago
William Roberts 8235cf8be7 Reduced memory footprint by 50% 14 years ago