summaryrefslogtreecommitdiffstats
path: root/x11vnc/sslhelper.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
committerrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
commit365a22c63cb292ea494f39ebc48a37e322e5eb14 (patch)
treeca6e87ab396ee00a837b09b2c6cede62aec69dae /x11vnc/sslhelper.c
parentd4fabc217e8cd02aca4d248229bb8a030b2bbfe2 (diff)
downloadlibtdevnc-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.c15
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;
}