summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2011-08-16 14:02:36 +0200
committerJohannes Schindelin <johannes.schindelin@gmx.de>2011-08-17 12:41:24 +0200
commit9afe4e1faa914353ee09bda674ebb7a1c6c7f340 (patch)
tree9758f8909435523f58cb879a84c0005bfba1bd39
parenta2a6e256998c23af2d91a4475aa6d65893bf5bb5 (diff)
downloadlibvncserver-9afe4e1faa914353ee09bda674ebb7a1c6c7f340.zip
libvncserver-9afe4e1faa914353ee09bda674ebb7a1c6c7f340.tar.gz
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>
-rw-r--r--libvncserver/Makefile.am1
-rw-r--r--libvncserver/cargs.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/libvncserver/Makefile.am b/libvncserver/Makefile.am
index c1f89df..a22d77f 100644
--- a/libvncserver/Makefile.am
+++ b/libvncserver/Makefile.am
@@ -59,6 +59,7 @@ LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c $(WEBSOCKETSSRCS) \
$(ZLIBSRCS) $(TIGHTSRCS) $(TIGHTVNCFILETRANSFERSRCS)
libvncserver_la_SOURCES=$(LIB_SRCS)
+libvncserver_la_LIBADD=@SSL_LIBS@ @CRYPT_LIBS@
lib_LTLIBRARIES=libvncserver.la
diff --git a/libvncserver/cargs.c b/libvncserver/cargs.c
index 332ffa1..2e973e8 100644
--- a/libvncserver/cargs.c
+++ b/libvncserver/cargs.c
@@ -163,6 +163,20 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
if (! rfbStringToAddr(argv[++i], &(rfbScreen->listenInterface))) {
return FALSE;
}
+#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
+ } else if (strcmp(argv[i], "-sslkeyfile") == 0) { /* -sslkeyfile sslkeyfile */
+ if (i + 1 >= *argc) {
+ rfbUsage();
+ return FALSE;
+ }
+ rfbScreen->sslkeyfile = argv[++i];
+ } else if (strcmp(argv[i], "-sslcertfile") == 0) { /* -sslcertfile sslcertfile */
+ if (i + 1 >= *argc) {
+ rfbUsage();
+ return FALSE;
+ }
+ rfbScreen->sslcertfile = argv[++i];
+#endif
} else {
rfbProtocolExtension* extension;
int handled=0;
OpenPOWER on IntegriCloud