Преглед изворни кода

Create VNC homedir if it doesn't already exist

tags/v1.11.90
Brian P. Hinz пре 3 година
родитељ
комит
89f6d5aed0
1 измењених фајлова са 8 додато и 3 уклоњено
  1. 8
    3
      java/com/tigervnc/rfb/CSecurityTLS.java

+ 8
- 3
java/com/tigervnc/rfb/CSecurityTLS.java Прегледај датотеку

@@ -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…
Откажи
Сачувај