diff options
author | runge <runge@karlrunge.com> | 2010-12-21 12:04:02 -0500 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2010-12-21 12:04:02 -0500 |
commit | 365a22c63cb292ea494f39ebc48a37e322e5eb14 (patch) | |
tree | ca6e87ab396ee00a837b09b2c6cede62aec69dae /x11vnc/sslhelper.c | |
parent | d4fabc217e8cd02aca4d248229bb8a030b2bbfe2 (diff) | |
download | libtdevnc-365a22c63cb292ea494f39ebc48a37e322e5eb14.tar.gz libtdevnc-365a22c63cb292ea494f39ebc48a37e322e5eb14.zip |
x11vnc: touchscreen uinput support and Java viewer mousewheel support. See x11vnc/ChangeLog for rest.
Diffstat (limited to 'x11vnc/sslhelper.c')
-rw-r--r-- | x11vnc/sslhelper.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/x11vnc/sslhelper.c b/x11vnc/sslhelper.c index ca5168f..7057615 100644 --- a/x11vnc/sslhelper.c +++ b/x11vnc/sslhelper.c @@ -125,17 +125,17 @@ char *get_saved_pem(char *save, int create) { sprintf(path, "%s/server%s.pem", cdir, s); if (stat(path, &sbuf) != 0) { - char *new = NULL; + char *new_name = NULL; if (create) { if (inetd || opts_bg) { set_env("GENCERT_NOPROMPT", "1"); } - new = create_tmp_pem(path, prompt); + new_name = create_tmp_pem(path, prompt); if (!getenv("X11VNC_SSL_NO_PASSPHRASE") && !inetd && !opts_bg) { - sslEncKey(new, 0); + sslEncKey(new_name, 0); } } - return new; + return new_name; } if (! quiet) { @@ -332,9 +332,12 @@ char *create_tmp_pem(char *pathin, int prompt) { sprintf(str, tmpl, C, L, OU, O, CN, EM); cnf_fd = mkstemp(cnf); + if (cnf_fd < 0) { + return NULL; + } pem_fd = mkstemp(pem); - - if (cnf_fd < 0 || pem_fd < 0) { + if (pem_fd < 0) { + close(cnf_fd); return NULL; } |