summaryrefslogtreecommitdiffstats
path: root/x11vnc/sslcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/sslcmds.c')
-rw-r--r--x11vnc/sslcmds.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/x11vnc/sslcmds.c b/x11vnc/sslcmds.c
index d1ed95c..127a133 100644
--- a/x11vnc/sslcmds.c
+++ b/x11vnc/sslcmds.c
@@ -15,10 +15,6 @@
#endif
#endif
-#ifdef NO_SSL_OR_UNIXPW
-#undef SSLCMDS
-#endif
-
void check_stunnel(void);
int start_stunnel(int stunnel_port, int x11vnc_port);
@@ -64,6 +60,7 @@ int start_stunnel(int stunnel_port, int x11vnc_port) {
char *path, *p, *exe;
char *stunnel_path = NULL;
struct stat verify_buf;
+ struct stat crl_buf;
int status;
if (stunnel_pid) {
@@ -146,6 +143,12 @@ int start_stunnel(int stunnel_port, int x11vnc_port) {
clean_up_exit(1);
}
}
+ if (ssl_crl) {
+ if (stat(ssl_crl, &crl_buf) != 0) {
+ rfbLog("stunnel: %s does not exist.\n", ssl_crl);
+ clean_up_exit(1);
+ }
+ }
stunnel_pid = fork();
@@ -180,6 +183,11 @@ int start_stunnel(int stunnel_port, int x11vnc_port) {
a = "-A";
}
}
+
+ if (ssl_crl) {
+ rfbLog("stunnel: stunnel3 does not support CRL. %s\n", ssl_crl);
+ clean_up_exit(1);
+ }
if (stunnel_pem && ssl_verify) {
/* XXX double check -v 2 */
@@ -210,6 +218,13 @@ int start_stunnel(int stunnel_port, int x11vnc_port) {
if (stunnel_pem) {
fprintf(in, "cert = %s\n", stunnel_pem);
}
+ if (ssl_crl) {
+ if(S_ISDIR(crl_buf.st_mode)) {
+ fprintf(in, "CRLpath = %s\n", ssl_crl);
+ } else {
+ fprintf(in, "CRLfile = %s\n", ssl_crl);
+ }
+ }
if (ssl_verify) {
if(S_ISDIR(verify_buf.st_mode)) {
fprintf(in, "CApath = %s\n", ssl_verify);