From: Adam Tkac Date: Mon, 7 Feb 2011 10:47:07 +0000 (+0000) Subject: [Bugfix] Print empty string by default when paths for X.509 certs don't exist. X-Git-Tag: v1.0.90~63 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f16a421570cc6cbadff190b9c62a0e1a2ce10858;p=tigervnc.git [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 --- 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()