aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/CSecurityTLS.cxx
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2011-02-07 10:47:07 +0000
committerAdam Tkac <atkac@redhat.com>2011-02-07 10:47:07 +0000
commitf16a421570cc6cbadff190b9c62a0e1a2ce10858 (patch)
treef5f54228f54c58d151bafc91fe8bafa4819c8905 /common/rfb/CSecurityTLS.cxx
parentc480ee32669fffd940de34f2f55d8c144c32f706 (diff)
downloadtigervnc-f16a421570cc6cbadff190b9c62a0e1a2ce10858.tar.gz
tigervnc-f16a421570cc6cbadff190b9c62a0e1a2ce10858.zip
[Bugfix] Print empty string by default when paths for X.509 certs don't exist.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4256 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/CSecurityTLS.cxx')
-rw-r--r--common/rfb/CSecurityTLS.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index 3877fe45..d0b689a2 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -101,8 +101,10 @@ void CSecurityTLS::setDefaults()
sprintf(crlDefault.buf, "%s509_crl.pem", homeDir);
delete [] homeDir;
- x509ca.setDefaultStr(strdup(caDefault.buf));
- x509crl.setDefaultStr(strdup(crlDefault.buf));
+ if (!fileexists(caDefault.buf))
+ x509ca.setDefaultStr(strdup(caDefault.buf));
+ if (!fileexists(crlDefault.buf))
+ x509crl.setDefaultStr(strdup(crlDefault.buf));
}
void CSecurityTLS::shutdown()