aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/rfb/CSecurityTLS.java
diff options
context:
space:
mode:
author90 <hi@90.gripe>2024-04-26 16:22:03 +0100
committer90 <hi@90.gripe>2024-04-26 16:22:03 +0100
commit337c136ce018fc8d9d12b9e188634925238d11cc (patch)
tree5733614d537fa373cc5376cdc9b8e29a8de4432c /java/com/tigervnc/rfb/CSecurityTLS.java
parent119a5ff7d2e2543e51947d35be7c5f84f74b3243 (diff)
downloadtigervnc-337c136ce018fc8d9d12b9e188634925238d11cc.tar.gz
tigervnc-337c136ce018fc8d9d12b9e188634925238d11cc.zip
Implement XDG Base Directory paths, deprecate ~/.vnc
Diffstat (limited to 'java/com/tigervnc/rfb/CSecurityTLS.java')
-rw-r--r--java/com/tigervnc/rfb/CSecurityTLS.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/java/com/tigervnc/rfb/CSecurityTLS.java b/java/com/tigervnc/rfb/CSecurityTLS.java
index 14a5eb66..ab221427 100644
--- a/java/com/tigervnc/rfb/CSecurityTLS.java
+++ b/java/com/tigervnc/rfb/CSecurityTLS.java
@@ -89,13 +89,13 @@ public class CSecurityTLS extends CSecurity {
public static String getDefaultCA() {
if (UserPreferences.get("viewer", "x509ca") != null)
return UserPreferences.get("viewer", "x509ca");
- return FileUtils.getVncHomeDir()+"x509_ca.pem";
+ return FileUtils.getVncConfigDir()+"x509_ca.pem";
}
public static String getDefaultCRL() {
if (UserPreferences.get("viewer", "x509crl") != null)
return UserPreferences.get("viewer", "x509crl");
- return FileUtils.getVncHomeDir()+"x509_crl.pem";
+ return FileUtils.getVncConfigDir()+"x509_crl.pem";
}
public static void setDefaults()
@@ -277,12 +277,12 @@ public class CSecurityTLS extends CSecurity {
"do you want to continue?"))
throw new AuthFailureException("server certificate has expired");
}
- File vncDir = new File(FileUtils.getVncHomeDir());
+ File vncDir = new File(FileUtils.getVncDataDir());
if (!vncDir.exists()) {
try {
vncDir.mkdir();
} catch(SecurityException e) {
- throw new AuthFailureException("Could not obtain VNC home directory "+
+ throw new AuthFailureException("Could not obtain VNC data directory "+
"path for known hosts storage");
}
}
@@ -356,7 +356,6 @@ public class CSecurityTLS extends CSecurity {
private void store_pubkey(File dbPath, String serverName, String pk)
{
ArrayList<String> lines = new ArrayList<String>();
- File vncDir = new File(FileUtils.getVncHomeDir());
try {
if (dbPath.exists()) {
FileReader db = new FileReader(dbPath);