x11vnc: fix build error if libssl is missing or --without-ssl supplied.

pull/1/head
runge 17 years ago
parent 171db9c542
commit d3326942e2

@ -1,3 +1,7 @@
2007-06-14 Karl Runge <runge@karlrunge.com>
* configure.ac: add a note on what you must do if you want to
re-run autoconf from the LibVNCServer-X.Y.Z.tar.gz tarball.
2007-05-26 Karl Runge <runge@karlrunge.com>
* configure.ac, Makefile.am, x11vnc/Makefile.am: change
configure to make more of a split between libvncserver and

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -20,6 +20,7 @@ $USER's $DESKTOP desktop ($DISPLAY)
<param name=PORT value=$PORT>
<param name="Open New Window" value=yes>
<param name="ignoreMSLogonCheck" value=yes>
<param name="delayAuthPanel" value=yes>
$PARAMS
</APPLET>
<BR>

@ -20,6 +20,7 @@ $USER's $DESKTOP desktop ($DISPLAY)
<param name=PORT value=$PORT>
<param name="Open New Window" value=yes>
<param name="ignoreMSLogonCheck" value=yes>
<param name="delayAuthPanel" value=yes>
$PARAMS
</APPLET>
<BR>

File diff suppressed because it is too large Load Diff

@ -675,8 +675,20 @@ AC_CONFIG_FILES([Makefile
test/Makefile
libvncserver-config
LibVNCServer.spec])
#
# x11vnc only:
#
if test "$build_x11vnc" = "yes"; then
#
# NOTE: if you are using the LibVNCServer-X.Y.Z.tar.gz source
# tarball and nevertheless want to run autoconf (i.e. aclocal,
# autoheader, automake, autoconf) AGAIN (perhaps you have a
# special target system, e.g. embedded) then you will need to
# comment out the following 'AC_CONFIG_FILES' line to avoid
# automake error messages like:
#
# configure.ac:690: required file `x11vnc/Makefile.in' not found
#
AC_CONFIG_FILES([x11vnc/Makefile x11vnc/misc/Makefile])
fi

@ -1,3 +1,10 @@
2007-06-14 Karl Runge <runge@karlrunge.com>
* x11vnc: add detectors if ultravnc chat or file xfer took place,
if so ping clients more frequently. Fix compile bug if libssl
not available.
* ssvnc: add ultravnc ftp jar feature. Add certificate management
"Verify All Certs".
2007-05-26 Karl Runge <runge@karlrunge.com>
* x11vnc: set to version 0.9.2, back to NCACHE -12 for testing.
in -unixpw, initial Escape means no echo username (see ssvnc).

File diff suppressed because it is too large Load Diff

@ -95,16 +95,21 @@ The enhanced TightVNC viewer features are:
- ZRLE VNC encoding support (RealVNC's encoding)
- Cursor alphablending with x11vnc at 32bpp (-alpha option)
- Option "-unixpw ..." for use with "x11vnc -unixpw" login dialogs.
- Support for UltraVNC extensions: Single Window, Disable
Server-side Input, 1/n Server side scaling, Text Chat (shell
terminal UI). Both UltraVNC and x11vnc servers support these
extensions
- Extremely low color modes: 64 and 8 colors in 8bpp
(-use64/-bgr222, -use8/-bgr111)
- Medium color mode: 16bpp mode even for 32bpp Viewer display
(-16bpp/-bgr565)
- Cursor alphablending with x11vnc at 32bpp (-alpha option)
- Maintains its own BackingStore if the X server does not
- x11vnc's client-side caching -ncache method cropping option
(-ycrop n). This will "hide" the large pixel buffer cache
below the actual display. Set to actual height or use -1 for
@ -113,6 +118,14 @@ The enhanced TightVNC viewer features are:
- Scrollbar width setting: -sbwidth n, the default is very thin,
2 pixels, for less distracting -ycrop usage.
- Improvements to the Popup menu, all of these can now be changed
dynamically via the menu: ViewOnly, Toggle Bell, CursorShape
updates, X11 Cursor, Cursor Alphablending, Toggle Tight/ZRLE,
Toggle JPEG, FullColor/16bpp/8bpp (256/64/8 colors), Greyscale
for low color modes.
- Maintains its own BackingStore if the X server does not
- The default for localhost:0 connections is not raw encoding
(local machine). Default assumes you are using SSH tunnel. Use
-rawlocal to revert.
@ -123,17 +136,6 @@ The enhanced TightVNC viewer features are:
- Fix for Popup menu positioning for old window managers
(-popupfix option).
- Improvements to the Popup menu, all of these can now be changed
dynamically via the menu: ViewOnly, Toggle Bell, CursorShape
updates, X11 Cursor, Cursor Alphablending, Toggle Tight/ZRLE,
Toggle JPEG, FullColor/16bpp/8bpp (256/64/8 colors), Greyscale
for low color modes.
- Support for UltraVNC extensions: Single Window, Disable
Server-side Input, 1/n Server side scaling, Text Chat (shell
terminal UI). Both UltraVNC and x11vnc servers support these
extensions
- Run vncviewer -help for all options.
@ -161,7 +163,7 @@ Unix and Mac OS X:
Unpack the archive:
% gzip -dc ssvnc-1.0.15.tar.gz | tar xvf -
% gzip -dc ssvnc-1.0.18.tar.gz | tar xvf -
Run the GUI:
@ -171,18 +173,24 @@ Unix and Mac OS X:
On MacOSX you could also click on the SSVNC app in the Finder.
The smaller file "ssvnc_no_windows-1.0.15.tar.gz"
The smaller file "ssvnc_no_windows-1.0.18.tar.gz"
could have been used as well.
On MacOSX there is also a SSVNC.app directory icon you can click on
in Finder to start the application.
On MacOSX if you don't like the Chicken of the VNC (e.g. no local
cursors, no screen size rescaling, and no password prompting), and you
have the XDarwin X server installed, you can set DISPLAY before starting
ssvnc (or type DISPLAY=... in Host:Disp and hit Return). Then our
enhanced TightVNC viewer will be used instead of COTVNC.
Windows:
Unzip, using WinZip or a similar utility, the zip file:
ssvnc-1.0.15.zip
ssvnc-1.0.18.zip
Run the GUI, e.g.:
@ -194,7 +202,7 @@ Windows:
select Open, and then OK to launch it.
The smaller file "ssvnc_windows_only-1.0.15.zip"
The smaller file "ssvnc_windows_only-1.0.18.zip"
could have been used as well.
You can make a Windows shortcut to this program if you want to.

@ -5,6 +5,15 @@
dir=`dirname "$0"`
if [ "X$SSVNC_DYLD_LIBRARY_PATH" != "X" ]; then
if [ "X$DYLD_LIBRARY_PATH" = "X" ] ; then
DYLD_LIBRARY_PATH=$SSVNC_DYLD_LIBRARY_PATH
else
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$SSVNC_DYLD_LIBRARY_PATH
fi
export DYLD_LIBRARY_PATH
fi
if [ "X$DISPLAY" != "X" ]; then
"$dir/vncviewer.x11" "$@"
else

@ -126,6 +126,11 @@ fi
SSVNC_BASEDIR="$dir"
export SSVNC_BASEDIR
if [ -f "$dir/util/ultraftp.jar" ]; then
SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"
export SSVNC_ULTRA_FTP_JAR
fi
if [ "X$WISH" = "Xwish" ]; then
exec ssvnc.tcl "$@"
else

@ -86,6 +86,13 @@ fi
PATH=$PATH:/usr/bin:/bin
export PATH
if [ "X$FULLNAME" = "XKarl J. Runge" ]; then
VNCVIEWER_POPUP_FIX=1
export VNCVIEWER_POPUP_FIX
PATH=`echo "$PATH" | sed -e 's,runge/bin/override,-------------,'`
fi
# Set this for ss_vncviewer to pick up:
#
if [ "X$1" = "X-cotvnc" ]; then
@ -195,6 +202,11 @@ else
PATH="$dir:$dir/$name:$dir/util:$PATH"
fi
if [ -f "$dir/util/ultraftp.jar" ]; then
SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"
export SSVNC_ULTRA_FTP_JAR
fi
base=`basename "$0"`
if [ "X$1" = "X-ssl" ]; then
shift

@ -8,7 +8,7 @@ exec wish "$0" "$@"
# ssvnc.tcl: gui wrapper to the programs in this
# package. Also sets up service port forwarding.
#
set version 1.0.17
set version 1.0.18
set buck_zero $argv0
@ -187,32 +187,67 @@ proc help {} {
the Help under Options for more info.
Proxies:
Proxies/Gateways:
If an intermediate proxy is needed to make the SSL connection
(e.g. web gateway out of a firewall) enter it in the "Proxy/Gateway"
entry box, or Alternatively supply both hosts separated by spaces
(with the proxy second) in the VNC Host:Display box:
entry box:
host:number gwhost:port
VNC Host-Display: host:number
Proxy/Gateway: gw-host:port
e.g.:
VNC Host-Display: far-away.east:0
Proxy/Gateway: mygateway.com:8080
Or Alternatively one can supply both hosts separated by
spaces (with the proxy second) in the VNC Host:Display box:
VNC Host-Display: far-away.east:0 mygateway.com:8080
This looks a little strange, but it actually how SSVNC stores the
host info internally.
E.g.: far-away.east:0 mygateway.com:8080
If the "double proxy" case is required (e.g. coming out of a web
proxied firewall environment), separate them via a comma, e.g.:
proxied firewall environment and then into a 2nd proxy to ultimately
reach the VNC server), separate them via a comma, e.g.:
far-away:0 local-proxy:8080,mygateway.com:443
VNC Host-Display: far-away:0
Proxy/Gateway: local-proxy:8080,mygateway.com:443
(either as above, or putting the 2nd string in the "Proxy/Gateway"
entry box).
(either as above, or alternatively putting both strings in Host:Display)
See the ss_vncviewer description and x11vnc FAQ for info on proxies:
http://www.karlrunge.com/x11vnc/#ss_vncviewer
http://www.karlrunge.com/x11vnc/#faq-ssl-java-viewer-proxy
Proxies also apply to SSH mode, it is a usually a gateway machine to
log into via SSH that is not the workstation running the VNC server.
SSH Proxies/Gateways:
Proxy/Gateway also applies to SSH mode, it is a usually a gateway
machine to log into via SSH that is not the workstation running the
VNC server.
For example if a company had a central login server: "ssh.company.com"
(accessible from the internet) and the internal workstation name was
"joes-pc", one could put in for the
VNC Host:Display: joes-pc:0
Proxy/Gateway: ssh.company.com
It is OK if the hostname "joes-pc" only resolves inside the firewall.
The 2nd leg, from ssh.company.com -> joes-pc is done by a ssh -L
redir and is not encrypted (but viewer -> ssh.company.com is encrypted).
To SSH encrypt both legs, try the "double gateway" using the above
"comma" notation:
VNC Host:Display: :0
Proxy/Gateway: ssh.company.com,joes-pc
this requires an SSH server running on joes-pc. Use username@host
(e.g. joe@joes-pc jsmith@ssh.company.com if the user name differs).
Remote SSH Command:
@ -421,10 +456,16 @@ proc help {} {
the latter is preferred because when you reconnect with it will
find the already running one. The former one will keep creating
new X sessions if called repeatedly.
12) You can change the X DISPLAY variable by typing DISPLAY=... into
VNC Host:Display and hitting Return or clicking Connect. Same for
HOME=. Setting SLEEP=n increases the amount of time waited before
starting the viewer. On Mac, you can set DYLD_LIBRARY_PATH=... too.
It should propagate down the the viewer.
}
global version
set msg " SSVNC version: $version\n$msg"
set msg " SSVNC version: $version\n$msg"
.h.f.t insert end $msg
jiggle_text .h.f.t
@ -443,55 +484,79 @@ proc help_certs {} {
set msg {
Description:
*IMPORTANT*: Only with SSL Certificate verification (either manually or via
Certificate Authority) can Man-In-The-Middle attacks be prevented. Otherwise,
only passive network sniffing attacks are prevented.
The SSL Certificate files described below can have been created externally
(e.g. by x11vnc), you can import it via "Import Certificate" if you like.
OR you can click on "Create Certificate ..." to use this program to generate a
Certificate + Private Key pair. In that case you will need to distribute one
of the generated files to the VNC Server.
You can also retrieve the remote VNC Server's Cert via the "Fetch Cert" button
on the main panel. After you check that it is the correct Cert (e.g. by
comparing MD5 hash or other info), you can save it. It will be set as the
"ServerCert" to verify against for the connection. To make this verification
check permanent, you will need to save the profile via Options -> Save Profile.
If "Verify All Certs" is checked, you are forced to do this check, and so the
first time you connect to a new server you may need to follow a few dialogs to
inspect and save the server certificate. In this case certificates are saved
in the 'Accepted Certs' directory. When "Verify All Certs" is checked all
hosts or profiles with "CertsDir" set to "ACCEPTED_CERTS" (and no "ServerCert"
setting) will be check against the accepted certificates.
Note that "Verify All Certs" is on by default so that users who do not
*IMPORTANT*: Only with SSL Certificate verification (either manually or via a
Certificate Authority certificate) can Man-In-The-Middle attacks be prevented.
Otherwise, only passive network sniffing attacks are prevented.
The SSL Certificate files described below may have been created externally
(e.g. by x11vnc or openssl): you can import them via "Import Certificate".
OR you can click on "Create Certificate ..." to use THIS program to generate
a Certificate + Private Key pair for you (in this case you will need to
distribute one of the generated files to the VNC Server).
Then you associate the Saved cert with the VNC server, see the panel entry
box description below, and then Connect. You will usually want to Save this
association in a VNC Server profile for the next time you connect.
Fetch Cert:
You can also retrieve and view the VNC Server's Cert via the "Fetch Cert"
button on the main panel. After you check that it is the correct Cert (e.g. by
comparing MD5 hash or other info), you can save it. The file it was saved
as will be set as the "ServerCert" to verify against for the next connection.
To make this verification check permanent, you will need to save the profile
via Options -> Save Profile.
Verify All Certs:
If "Verify All Certs" is checked on the main panel, you are always forced
to check unrecognized server certs, and so the first time you connect to
a new server you may need to follow a few dialogs to inspect and save the
server certificate.
Under "Verify All Certs", new certificates are saved in the 'Accepted Certs'
directory. When the checkbox is set all host profiles with "CertsDir" set to
"ACCEPTED_CERTS" (and an empty "ServerCert" setting) will be checked against
the pool of accepted certificates in the 'Accepted Certs' directory.
Note that we have "Verify All Certs" on by default so that users who do not
understand the SSL Man-In-The-Middle problem will not be left completely
vulnerable to it (everyone still must make the effort to verify new certificates
by an external method to be completely safe)
vulnerable to it. Everyone still must make the effort to verify new
certificates by an external method to be completely safe.
To have "Verify All Certs" toggled off at startup, use "ssvnc -nv" or set
SSVNC_NO_VERIFY_ALL=1 before starting. If you do not even want to see the
button, use "ssvnc -nvb" or SSVNC_NO_VERIFY_ALL_BUTTON=1.
Note: due to a deficiency in openssl "Fetch Cert" may be slow on Windows. Also:
"Fetch Cert" and "Verify All Certs" do not currently work in "SSH + SSL" mode.
Note: "Fetch Cert" and "Verify All Certs" do not currently work in "SSH +
SSL" mode. In this case to have server authentication "ServerCert" must be
set explicitly to a file (or "CertDir" to a directory).
CA:
One can make SSL VNC server authentication more "automatic" as it is in
Web Browsers going to HTTPS sites, by using a Certificate Authority (CA)
cert (e.g. a professional one like Verisign or Thawte, or one your company
or organization creates) for the "ServerCert". This is described in detail
here: http://www.karlrunge.com/x11vnc/ssl.html
CA's are not often used, but if the number of VNC Servers scales up it can
be very convenient because the viewers (i.e. SSVNC) only need the CA cert,
not all of the Server certs.
One can make SSL VNC server authentication "automatic" as it is in Web
Browsers going to HTTPS sites, by using a Certificate Authority (CA) cert
(e.g. a professional one like Verisign or Thawte, or one your company or
organization creates). This is described in detail here:
http://www.karlrunge.com/x11vnc/ssl.html You simply use the CA cert in the
entries described below.
Now what goes into the panel's entry boxes is described.
Your Certificate + Key:
You can specify your own SSL certificate (PEM) file in "MyCert" in which case it
is used to authenticate you (the viewer) to the remote VNC Server. If this fails
You can specify YOUR own SSL certificate (PEM) file in "MyCert" in which case it
is used to authenticate YOU (the viewer) to the remote VNC Server. If this fails
the remote VNC Server will drop the connection.
So the Server could use this method to authenticate Viewers instead of the
more common practice of using a VNC password or x11vnc's -unixpw mode.
Server Certificates:
@ -508,6 +573,7 @@ proc help_certs {} {
The former corresponds to the "CAfile" STUNNEL parameter.
The latter corresponds to the "CApath" STUNNEL parameter.
See stunnel(8) or www.stunnel.org for more information.
If the remote VNC Server fails to authenticate itself with respect to the specified
@ -517,17 +583,19 @@ proc help_certs {} {
Once selected, if you click Info or the Right Mouse button on "Browse..."
then information about the certificate will be displayed.
If "CertsDir" is set to the token "ACCEPTED_CERTS" (and "ServerCert" is
unset) then the certificates accumulated in the special 'Accepted Certs'
directory will be used. "ACCEPTED_CERTS" is the default for every server
("Verify All Certs"). Note that if you ever need to clean this directory,
each cert is saved in two files, for example:
If, as is the default, "CertsDir" is set to the token "ACCEPTED_CERTS" (and
"ServerCert" is unset) then the certificates accumulated in the special
'Accepted Certs' directory will be used. "ACCEPTED_CERTS" is the default for
every server ("Verify All Certs"). Note that if you ever need to clean this
directory, each cert is saved in two files, for example:
bf-d0-d6-9c-68-5a-fe-24-c6-60-ba-b4-14-e6-66-14=hostname-0.crt
and
9eb7c8be.0
This is because of the way OpenSSL must use hash-based filenames in Cert dirs.
The file will have a "full filename:" line indicating the fingerprint and
hostname associated with it. Be sure to remove both files.
Notes:
@ -546,9 +614,10 @@ proc help_certs {} {
x11vnc -ssl SAVE ...
and then copy the Server certificate to the local (viewer-side) machine.
x11vnc prints out to the screen the Server certificate it generates.
You can set "ServerCert" to it directly or use the "Import Certificate"
action to save it to a file. Or use the "Fetch Cert" method.
x11vnc prints out to the screen the Server certificate it generates. You can
set "ServerCert" to it directly or use the "Import Certificate" action to
save it to a file. Or use the "Fetch Cert" method to retrieve it (be sure
to verify the MD5 fingerprint, etc).
x11vnc also has command line utilities to create server, client, and CA
(Certificate Authority) certificates. See the above URLs.
@ -2770,7 +2839,7 @@ proc check_accepted_certs {} {
if [file exists $crt] {
mesg "OK: Certificate found in ACCEPTED_CERTS"
after 550
after 750
return 1
}
@ -2864,6 +2933,7 @@ proc check_accepted_certs {} {
VNC server that you trust (e.g. by checking the fingerprint with that
sent to you by the server administrator).
Should this certificate be saved in the accepted certs directory and
then used to SSL authenticate VNC servers?
@ -2871,7 +2941,7 @@ proc check_accepted_certs {} {
to inspect the certificate before deciding to save it or not.
Choose 'Ignore Cert for One Connection' to connect one time to the
server and not require any certificate verification.
server and not require ANY certificate verification.
"
if {$oth == 0} {
@ -2947,40 +3017,51 @@ proc check_accepted_certs {} {
set fetch_cert_filename $crt
fetch_dialog $cert_text $hp $hp 1 47
after 100
catch {tkwait window .fetch}
after 200
catch {tkwait window .scrt}
after 200
if [winfo exists .scrt] {
catch {tkwait window .scrt}
}
set fetch_cert_filename ""
set accepted_cert_dialog_in_progress 0
if [file exists $crt] {
set ossl [get_openssl]
set hash [exec $ossl x509 -hash -noout -in $crt]
set hash [string trim $hash]
if [regexp {^([0-9a-f][0-9a-f]*)} $hash mv h] {
set hashfile "$adir/$h.0"
if [file exists $hashfile] {
set hashfile "$adir/$h.1"
}
set fh [open $crt "a"]
if {$fh != ""} {
puts $fh ""
puts $fh "SSVNC info:"
puts $fh "Host-Display: $hp"
puts $fh "$fingerline"
puts $fh "hash filename: $h.0"
puts $fh "full filename: $fingerprint=$from.crt"
close $fh
}
catch {file copy -force $crt $hashfile}
if [file exists $hashfile] {
return 1
}
save_hash $crt $adir $hp $fingerline $from $fingerprint
return 1
}
proc save_hash {crt adir hp fingerline from fingerprint} {
if ![file exists $crt] {
return
}
set ossl [get_openssl]
set hash [exec $ossl x509 -hash -noout -in $crt]
set hash [string trim $hash]
if [regexp {^([0-9a-f][0-9a-f]*)} $hash mv h] {
set hashfile "$adir/$h.0"
if [file exists $hashfile] {
set hashfile "$adir/$h.1"
}
set fh [open $crt "a"]
if {$fh != ""} {
puts $fh ""
puts $fh "SSVNC info:"
puts $fh "Host-Display: $hp"
puts $fh "$fingerline"
puts $fh "hash filename: $h.0"
puts $fh "full filename: $fingerprint=$from.crt"
close $fh
}
catch {file copy -force $crt $hashfile}
if [file exists $hashfile] {
return 1
}
}
return 0
}
proc tpid {} {
@ -3680,13 +3761,51 @@ proc launch {{hp ""}} {
set hp [get_vncdisplay]
}
if {[regexp {^HOME=} $hp] || [regexp {^SSVNC_HOME=} $hp]} {
set t $hp
set hpt [string trim $hp]
regsub {[ ].*$} $hpt "" hpt
if {[regexp {^HOME=} $hpt] || [regexp {^SSVNC_HOME=} $hpt]} {
set t $hpt
regsub {^.*HOME=} $t "" t
set t [string trim $t]
set env(SSVNC_HOME) $t
mesg "set SSVNC_HOME to $t"
return 0
}
if {[regexp {^DISPLAY=} $hpt] || [regexp {^SSVNC_DISPLAY=} $hpt]} {
set t $hpt
regsub {^.*DISPLAY=} $t "" t
set t [string trim $t]
set env(DISPLAY) $t
mesg "set DISPLAY to $t"
global uname darwin_cotvnc
if {$uname == "Darwin"} {
if {$t != ""} {
set darwin_cotvnc 0
} else {
set darwin_cotvnc 1
}
}
return 0
}
if {[regexp {^DYLD_LIBRARY_PATH=} $hpt] || [regexp {^SSVNC_DYLD_LIBRARY_PATH=} $hpt]} {
set t $hpt
regsub {^.*DYLD_LIBRARY_PATH=} $t "" t
set t [string trim $t]
set env(DYLD_LIBRARY_PATH) $t
set env(SSVNC_DYLD_LIBRARY_PATH) $t
mesg "set DYLD_LIBRARY_PATH to $t"
return 0
}
if {[regexp {^SLEEP=} $hpt] || [regexp {^SSVNC_EXTRA_SLEEP=} $hpt]} {
set t $hpt
regsub {^.*SLEEP=} $t "" t
set t [string trim $t]
set env(SSVNC_EXTRA_SLEEP) $t
mesg "set SSVNC_EXTRA_SLEEP to $t"
return 0
}
regsub {[ ]*cmd=.*$} $hp "" tt
@ -4944,7 +5063,7 @@ proc import_check_mode {w} {
}
}
proc import_browse {} {
proc import_browse {par} {
global import_file
set idir ""
@ -4952,14 +5071,14 @@ proc import_browse {} {
set idir [get_idir_certs $import_file]
}
if {$idir != ""} {
set t [tk_getOpenFile -parent .icrt -initialdir $idir]
set t [tk_getOpenFile -parent $par -initialdir $idir]
} else {
set t [tk_getOpenFile -parent .icrt]
set t [tk_getOpenFile -parent $par]
}
if {$t != ""} {
set import_file $t
}
catch {raise .icrt}
catch {raise $par}
update
}
@ -4985,11 +5104,12 @@ proc import_save_browse {{par ".icrt"}} {
update
}
proc do_save {} {
proc do_save {par} {
global import_mode import_file import_save_file
global also_save_to_accepted_certs
if {$import_save_file == ""} {
tk_messageBox -parent .icrt -type ok -icon error \
if {$import_save_file == "" && ! $also_save_to_accepted_certs} {
tk_messageBox -parent $par -type ok -icon error \
-message "No Save File supplied" -title "Save File"
return
}
@ -4999,10 +5119,10 @@ proc do_save {} {
global save_cert_text
set str $save_cert_text
} elseif {$import_mode == "paste"} {
set str [.icrt.paste.t get 1.0 end]
set str [$par.paste.t get 1.0 end]
} else {
if {! [file exists $import_file]} {
tk_messageBox -parent .icrt -type ok -icon error \
tk_messageBox -parent $par -type ok -icon error \
-message "Input file \"$import_file\" does not exist." -title "Import File"
return
}
@ -5010,7 +5130,7 @@ proc do_save {} {
set emess ""
set rc [catch {set fh [open $import_file "r"]} emess]
if {$rc != 0 || $fh == ""} {
tk_messageBox -parent .icrt -type ok -icon error \
tk_messageBox -parent $par -type ok -icon error \
-message $emess -title "Import File: $import_file"
return
}
@ -5021,25 +5141,34 @@ proc do_save {} {
}
if {! [regexp {BEGIN CERTIFICATE} $str]} {
tk_messageBox -parent .icrt -type ok -icon error \
tk_messageBox -parent $par -type ok -icon error \
-message "Import Text does not contain \"BEGIN CERTIFICATE\"" -title "Imported Text"
return
}
if {! [regexp {END CERTIFICATE} $str]} {
tk_messageBox -parent .icrt -type ok -icon error \
tk_messageBox -parent $par -type ok -icon error \
-message "Import Text does not contain \"END CERTIFICATE\"" -title "Imported Text"
return
}
global is_windows
set fh ""
set emess ""
set deltmp ""
if {$import_save_file == ""} {
if {! $is_windows} {
set deltmp /tmp/itmp.[tpid]
} else {
set deltmp itmp.[tpid]
}
set import_save_file $deltmp
}
set rc [catch {set fh [open $import_save_file "w"]} emess]
if {$rc != 0 || $fh == ""} {
tk_messageBox -parent .icrt -type ok -icon error \
tk_messageBox -parent $par -type ok -icon error \
-message $emess -title "Save File: $import_save_file"
return
}
global is_windows
if {! $is_windows} {
catch {file attributes $import_save_file -permissions go-w}
if {[regexp {PRIVATE} $str] || [regexp {\.pem$} $import_save_file]} {
@ -5048,13 +5177,59 @@ proc do_save {} {
}
puts -nonewline $fh $str
close $fh
catch {destroy .icrt}
if {$also_save_to_accepted_certs} {
set ossl [get_openssl]
set fp_txt ""
set fp_txt [exec $ossl x509 -fingerprint -noout -in $import_save_file]
set adir [get_idir_certs ""]
set adir "$adir/accepted"
catch {file mkdir $adir}
set fingerprint ""
set fingerline ""
set i 0
foreach line [split $fp_txt "\n"] {
incr i
if {$i > 4} {
break
}
if [regexp -nocase {Fingerprint=(.*)} $line mv str] {
set fingerline $line
set fingerprint [string trim $str]
}
}
set fingerprint [string tolower $fingerprint]
regsub -all {:} $fingerprint "-" fingerprint
regsub -all {[\\/=]} $fingerprint "_" fingerprint
global vncdisplay
set from [get_ssh_hp $vncdisplay]
set hp $from
set from [string tolower $from]
regsub -all {^[+a-z]*://} $from "" from
regsub -all {:} $from "-" from
regsub -all {[\\/=]} $from "_" from
set crt "$adir/$fingerprint=$from.crt"
catch {file copy -force $import_save_file $crt}
save_hash $crt $adir $hp $fingerline $from $fingerprint
}
catch {destroy $par}
set p .c
if {![winfo exists .c]} {
global accepted_cert_dialog_in_progress
if {! $accepted_cert_dialog_in_progress} {
getcerts
update
if {$deltmp == ""} {
getcerts
update
}
}
}
if {![winfo exists .c]} {
@ -5062,6 +5237,11 @@ proc do_save {} {
}
catch {raise .c}
catch {destroy .scrt}
if {$deltmp != ""} {
catch {file delete $deltmp}
set import_save_file ""
return;
}
tk_messageBox -parent $p -type ok -icon info \
-message "Saved to file: $import_save_file" -title "Save File: $import_save_file"
}
@ -5144,7 +5324,7 @@ TCQ+tbQ/DOiTXGKx1nlcKoPdkG+QVQVJthlQcpam
set import_file ""
entry $w.e -width 40 -textvariable import_file
button $w.b -pady 1 -anchor w -text "Browse..." -command import_browse
button $w.b -pady 1 -anchor w -text "Browse..." -command {import_browse .icrt}
pack $w.b -side right
pack $w.p $w.f -side left
pack $w.e -side left -expand 1 -fill x
@ -5162,7 +5342,7 @@ TCQ+tbQ/DOiTXGKx1nlcKoPdkG+QVQVJthlQcpam
button .icrt.cancel -text "Cancel" -command {destroy .icrt; catch {raise .c}}
bind .icrt <Escape> {destroy .icrt; catch {raise .c}}
button .icrt.save -text "Save" -command {do_save}
button .icrt.save -text "Save" -command {do_save .icrt}
set w .icrt.sf
frame $w
@ -5197,15 +5377,16 @@ proc save_cert {hp} {
global scroll_text_focus
set scroll_text_focus 0
global uname
scroll_text .scrt.f 90 17
set scroll_text_focus 1
global accepted_cert_dialog_in_progress
if {$accepted_cert_dialog_in_progress} {
set mode "accepted"
scroll_text .scrt.f 90 15
} else {
set mode "normal"
scroll_text .scrt.f 90 20
}
set scroll_text_focus 1
set msg1 {
This dialog lets you import a SSL Certificate retrieved from a VNC server.
@ -5213,16 +5394,19 @@ proc save_cert {hp} {
Be sure to have verified its authenticity via an external means (checking
the MD5 hash value sent to you by the administrator, etc)
Set the "Save to File" name to the file where the imported certificate
will be saved.
Set "Save to File" to the filename where the imported cert will be saved.
If you also want the Certificate to be saved to the pool of certs in the
'Accepted Certs' directory, select the checkbox. By default all Servers are
verified against the certificates in this pool.
Then, click on "Save" to save the imported Certificate.
After you have imported the Certificate it will be automatically selected
as the "ServerCert" for this host: %HOST
After you have imported the Certificate it will be automatically selected as
the "ServerCert" for the next connection to this host: %HOST
To make the ServerCert setting to the imported cert file PERMANENT,
select Options -> Save Profile to save it in a profile.
To make the ServerCert setting to the imported cert file PERMANENT, select
Options -> Save Profile to save it in the profile for this host.
}
set msg2 {
@ -5238,7 +5422,7 @@ proc save_cert {hp} {
It, and the others certs in that directory, will be used to authenticate
any VNC Server that has "ACCEPTED_CERTS" as the "CertsDir" value in the
"Certs..." dialog.
"Certs..." dialog. This is the default checking policy.
}
set msg ""
@ -5258,16 +5442,16 @@ proc save_cert {hp} {
set import_file ""
entry $w.e -width 40 -textvariable import_file
scroll_text .scrt.paste 90 26
scroll_text .scrt.paste 90 23
button .scrt.cancel -text "Cancel" -command {destroy .scrt; catch {raise .c}}
bind .scrt <Escape> {destroy .scrt; catch {raise .c}}
global import_save_file
if {$mode == "normal"} {
button .scrt.save -text "Save" -command {do_save; set svcert $import_save_file}
button .scrt.save -text "Save" -command {do_save .scrt; set svcert $import_save_file}
} else {
button .scrt.save -text "Save" -command {do_save}
button .scrt.save -text "Save" -command {do_save .scrt}
}
set w .scrt.sf
@ -5292,7 +5476,16 @@ proc save_cert {hp} {
pack $w.l -side left
pack $w.e -side left -expand 1 -fill x
pack .scrt.cancel .scrt.save .scrt.sf .scrt.mf -side bottom -fill x
global also_save_to_accepted_certs
set also_save_to_accepted_certs 0
checkbutton .scrt.ac -anchor w -variable also_save_to_accepted_certs -text \
"Also Save to the 'Accepted Certs' directory" -relief raised
if {$mode == "normal"} {
pack .scrt.cancel .scrt.save .scrt.sf .scrt.ac .scrt.mf -side bottom -fill x
} else {
pack .scrt.cancel .scrt.save .scrt.sf .scrt.mf -side bottom -fill x
}
pack .scrt.paste -side bottom -fill x
pack .scrt.f -side top -fill both -expand 1
@ -8544,6 +8737,7 @@ proc unixpw_adjust {} {
}
if {$use_unixpw} {
pack configure .fu -after .f1 -fill x
catch {focus .fu.e}
} else {
pack forget .fu
}
@ -8575,7 +8769,7 @@ proc set_options {} {
incr i
checkbutton .o.b$i -anchor w -variable use_unixpw -text \
"Unix Username & Password" -command {unixpw_adjust}
"Unix Username & Password" -command {unixpw_adjust; catch {destroy .o}}
if {$is_windows} {.o.b$i configure -state disabled}
if {$darwin_cotvnc} {.o.b$i configure -state disabled}
incr i

@ -1,7 +1,7 @@
#!/bin/sh
rm -rf ./src/tmp/* || exit 1
vers=1.0.17
vers=1.0.18
cd .. || exit 1

@ -371,6 +371,8 @@ int force_dpms = 0;
int client_dpms = 0;
int no_ultra_dpms = 0;
int no_ultra_ext = 0;
int saw_ultra_chat = 0;
int saw_ultra_file = 0;
int watch_selection = 1; /* normal selection/cutbuffer maintenance */
int watch_primary = 1; /* more dicey, poll for changes in PRIMARY */

@ -270,6 +270,8 @@ extern int force_dpms;
extern int client_dpms;
extern int no_ultra_dpms;
extern int no_ultra_ext;
extern int saw_ultra_chat;
extern int saw_ultra_file;
extern int watch_selection;
extern int watch_primary;

@ -2704,8 +2704,13 @@ static void ping_clients(int tile_cnt) {
rfbLog("reset rfbMaxClientWait to %d msec.\n",
rfbMaxClientWait);
}
if (tile_cnt) {
if (tile_cnt > 0) {
last_send = now;
} else if (tile_cnt < 0) {
if (now >= last_send - tile_cnt) {
mark_rect_as_modified(0, 0, 1, 1, 1);
last_send = now;
}
} else if (now - last_send > 2) {
/* Send small heartbeat to client */
mark_rect_as_modified(0, 0, 1, 1, 1);
@ -3344,6 +3349,8 @@ if (tile_count) fprintf(stderr, "XX copytile: %.4f tile_count: %d\n", dnow() -
/* Work around threaded rfbProcessClientMessage() calls timeouts */
if (use_threads) {
ping_clients(tile_diffs);
} else if (saw_ultra_chat || saw_ultra_file) {
ping_clients(-1);
} else if (use_openssl && !tile_diffs) {
ping_clients(0);
}

@ -34,6 +34,11 @@ int https_sock = -1;
pid_t openssl_last_helper_pid = 0;
char *openssl_last_ip = NULL;
static char *certret = NULL;
static int certret_fd = -1;
static mode_t omode;
char *certret_str = NULL;
void raw_xfer(int csock, int s_in, int s_out);
#if !LIBVNCSERVER_HAVE_LIBSSL
@ -1315,11 +1320,6 @@ if (db) fprintf(stderr, "buf: '%s'\n", buf);
return 1;
}
static char *certret = NULL;
static int certret_fd = -1;
static mode_t omode;
char *certret_str = NULL;
void accept_openssl(int mode, int presock) {
int sock = -1, listen = -1, cport, csock, vsock;
int peerport = 0;

@ -1,8 +1,8 @@
.\" This file was automatically generated from x11vnc -help output.
.TH X11VNC "1" "May 2007" "x11vnc " "User Commands"
.TH X11VNC "1" "June 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.2, lastmod: 2007-05-26
version: 0.9.2, lastmod: 2007-06-14
.SH SYNOPSIS
.B x11vnc
[OPTION]...

@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.2 lastmod: 2007-05-26";
char lastmod[] = "0.9.2 lastmod: 2007-06-14";
/* X display info */

@ -1376,6 +1376,7 @@ void set_server_input(rfbClientPtr cl, int grab) {
}
#endif
}
void set_text_chat(rfbClientPtr cl, int len, char *txt) {
int dochat = 1;
rfbClientIteratorPtr iter;
@ -1384,6 +1385,7 @@ void set_text_chat(rfbClientPtr cl, int len, char *txt) {
if (no_ultra_ext || ! dochat) {
return;
}
#if 0
rfbLog("set_text_chat: len=%d\n", len);
rfbLog("set_text_chat: len=0x%x txt='", len);
@ -1395,6 +1397,9 @@ void set_text_chat(rfbClientPtr cl, int len, char *txt) {
rfbCloseClient(cl);
return;
}
saw_ultra_chat = 1;
iter = rfbGetClientIterator(screen);
while( (cl2 = rfbClientIteratorNext(iter)) ) {
unsigned int ulen = (unsigned int) len;
@ -1440,6 +1445,9 @@ if (0) fprintf(stderr, "get_file_transfer_permitted called\n");
if (!input.files) {
return FALSE;
}
if (screen->permitFileTransfer) {
saw_ultra_file = 1;
}
return screen->permitFileTransfer;
}

Loading…
Cancel
Save