Browse Source

Create VNC homedir if it doesn't already exist

tags/v1.11.90
Brian P. Hinz 3 years ago
parent
commit
89f6d5aed0
1 changed files with 8 additions and 3 deletions
  1. 8
    3
      java/com/tigervnc/rfb/CSecurityTLS.java

+ 8
- 3
java/com/tigervnc/rfb/CSecurityTLS.java View File

@@ -279,9 +279,14 @@ public class CSecurityTLS extends CSecurity {
throw new AuthFailureException("server certificate has expired");
}
File vncDir = new File(FileUtils.getVncHomeDir());
if (!vncDir.exists())
throw new AuthFailureException("Could not obtain VNC home directory "+
"path for known hosts storage");
if (!vncDir.exists()) {
try {
vncDir.mkdir();
} catch(SecurityException e) {
throw new AuthFailureException("Could not obtain VNC home directory "+
"path for known hosts storage");
}
}
File dbPath = new File(vncDir, "x509_known_hosts");
String info =
" Subject: "+cert.getSubjectX500Principal().getName()+"\n"+

Loading…
Cancel
Save