From f16a421570cc6cbadff190b9c62a0e1a2ce10858 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 7 Feb 2011 10:47:07 +0000 Subject: [PATCH] [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 --- common/rfb/CSecurityTLS.cxx | 6 ++++-- 1 file 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() -- 2.39.5