From 9afe4e1faa914353ee09bda674ebb7a1c6c7f340 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 16 Aug 2011 14:02:36 +0200 Subject: 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 --- libvncserver/cargs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libvncserver/cargs.c') 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; -- cgit v1.2.1