@@ -15,7 +15,7 @@ public class KeePassXCAccess implements KeychainAccessProvider {
15
15
16
16
private static final Logger LOG = LoggerFactory .getLogger (KeePassXCAccess .class );
17
17
18
- private KeepassProxyAccess proxy ;
18
+ private final KeepassProxyAccess proxy ;
19
19
private final String URL_SCHEME = "https://" ;
20
20
private final String APP_NAME = "Cryptomator" ;
21
21
@@ -65,6 +65,7 @@ public void storePassphrase(String vault, String displayName, CharSequence passw
65
65
public void storePassphrase (String vault , String name , CharSequence password , boolean requireOsAuthentication ) throws KeychainAccessException {
66
66
if (isLocked ()) {
67
67
LOG .info ("Failed to store password. KeePassXC database is locked. Needs to be unlocked first." );
68
+ unlock ();
68
69
return ;
69
70
}
70
71
ensureAssociation ();
@@ -85,6 +86,7 @@ public void storePassphrase(String vault, String name, CharSequence password, bo
85
86
public char [] loadPassphrase (String vault ) throws KeychainAccessException {
86
87
if (isLocked ()) {
87
88
LOG .info ("Failed to load password. KeePassXC database is locked. Needs to be unlocked first." );
89
+ unlock ();
88
90
return null ;
89
91
}
90
92
ensureAssociation ();
@@ -108,6 +110,7 @@ public char[] loadPassphrase(String vault) throws KeychainAccessException {
108
110
public void deletePassphrase (String vault ) throws KeychainAccessException {
109
111
if (isLocked ()) {
110
112
LOG .info ("Failed to delete password. KeePassXC database is locked. Needs to be unlocked first." );
113
+ unlock ();
111
114
return ;
112
115
}
113
116
ensureAssociation ();
@@ -137,6 +140,7 @@ public void changePassphrase(String vault, CharSequence password) throws Keychai
137
140
public void changePassphrase (String vault , String name , CharSequence password ) throws KeychainAccessException {
138
141
if (isLocked ()) {
139
142
LOG .info ("Failed to change password. KeePassXC database is locked. Needs to be unlocked first." );
143
+ unlock ();
140
144
return ;
141
145
}
142
146
ensureAssociation ();
0 commit comments