]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Print empty string by default when paths for X.509 certs don't exist.
authorAdam Tkac <atkac@redhat.com>
Mon, 7 Feb 2011 10:47:07 +0000 (10:47 +0000)
committerAdam Tkac <atkac@redhat.com>
Mon, 7 Feb 2011 10:47:07 +0000 (10:47 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4256 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/CSecurityTLS.cxx

index 3877fe452dde0dcc32c5c57ffe1fc560b22ae76b..d0b689a265feeba8242b6d30e48fa0c8324c4629 100644 (file)
@@ -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()