summaryrefslogtreecommitdiffstats
path: root/x11vnc/x11vnc.c
diff options
context:
space:
mode:
authorrunge <runge>2008-09-21 23:04:47 +0000
committerrunge <runge>2008-09-21 23:04:47 +0000
commit16c7ea1b357ab518ee5a40f2a663843f064479a9 (patch)
tree4f8cceaaa9920ae1ca6e4cb0468e5d87f1d63326 /x11vnc/x11vnc.c
parenta1e5d55e356f4913169f6dd746b14548cc51695d (diff)
downloadlibvncserver-16c7ea1b357ab518ee5a40f2a663843f064479a9.zip
libvncserver-16c7ea1b357ab518ee5a40f2a663843f064479a9.tar.gz
x11vnc: Add symmetric key encryption -enc cipher:keyfile,
works with SSVNC. Make -remap work on MacOSX console. update to 0.9.5 strings. Add a couple menu items to tkx11vnc.
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r--x11vnc/x11vnc.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index 2ef71dd..73e9290 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -1443,7 +1443,7 @@ static int argc2 = 0;
static char **argv2;
static void check_rcfile(int argc, char **argv) {
- int i, j, pwlast, norc = 0, argmax = 1024;
+ int i, j, pwlast, enclast, norc = 0, argmax = 1024;
char *infile = NULL;
char rcfile[1024];
FILE *rc = NULL;
@@ -1661,6 +1661,7 @@ static void check_rcfile(int argc, char **argv) {
free(buf);
}
pwlast = 0;
+ enclast = 0;
for (i=1; i < argc; i++) {
argv2[argc2++] = strdup(argv[i]);
@@ -1674,6 +1675,18 @@ static void check_rcfile(int argc, char **argv) {
}
strzero(p);
}
+ if (enclast || !strcmp("-enc", argv[i])) {
+ char *q, *p = argv[i];
+ if (enclast) {
+ enclast = 0;
+ } else {
+ enclast = 1;
+ }
+ q = strstr(p, "pw=");
+ if (q) {
+ strzero(q);
+ }
+ }
if (argc2 >= argmax) {
fprintf(stderr, "too many rcfile options\n");
exit(1);
@@ -2760,6 +2773,11 @@ int main(int argc, char* argv[]) {
i++;
}
}
+ } else if (!strcmp(arg, "-enc")) {
+ char *q;
+ use_openssl = 1;
+ CHECK_ARGC
+ enc_str = strdup(argv[++i]);
} else if (!strcmp(arg, "-ssltimeout")) {
CHECK_ARGC
ssl_timeout_secs = atoi(argv[++i]);
@@ -4949,3 +4967,5 @@ if (0) fprintf(stderr, "XA: %s\n", getenv("XAUTHORITY"));
#undef argv
}
+
+
OpenPOWER on IntegriCloud