浏览代码

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"+

正在加载...
取消
保存