Browse Source

Merge branch 'develop' into release/1.6.4

Armin Schrenk 3 years ago
parent
commit
4e3742c206

+ 2 - 2
pom.xml

@@ -28,7 +28,7 @@
 
 		<!-- cryptomator dependencies -->
 		<cryptomator.cryptofs.version>2.3.0</cryptomator.cryptofs.version>
-		<cryptomator.integrations.version>1.0.0</cryptomator.integrations.version>
+		<cryptomator.integrations.version>1.1.0-beta1</cryptomator.integrations.version>
 		<cryptomator.integrations.win.version>1.0.0</cryptomator.integrations.win.version>
 		<cryptomator.integrations.mac.version>1.0.0</cryptomator.integrations.mac.version>
 		<cryptomator.integrations.linux.version>1.0.1</cryptomator.integrations.linux.version>
@@ -42,7 +42,7 @@
 		<jwt.version>3.18.2</jwt.version>
 		<easybind.version>2.2</easybind.version>
 		<guava.version>31.0-jre</guava.version>
-		<dagger.version>2.39</dagger.version>
+		<dagger.version>2.40.3</dagger.version>
 		<gson.version>2.8.9</gson.version>
 		<zxcvbn.version>1.5.2</zxcvbn.version>
 		<slf4j.version>1.7.32</slf4j.version>

+ 14 - 0
src/main/java/org/cryptomator/common/keychain/KeychainManager.java

@@ -49,6 +49,12 @@ public class KeychainManager implements KeychainAccessProvider {
 		setPassphraseStored(key, true);
 	}
 
+	@Override
+	public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
+		getKeychainOrFail().storePassphrase(key, displayName, passphrase);
+		setPassphraseStored(key, true);
+	}
+
 	@Override
 	public char[] loadPassphrase(String key) throws KeychainAccessException {
 		char[] passphrase = getKeychainOrFail().loadPassphrase(key);
@@ -70,6 +76,14 @@ public class KeychainManager implements KeychainAccessProvider {
 		}
 	}
 
+	@Override
+	public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
+		if (isPassphraseStored(key)) {
+			getKeychainOrFail().changePassphrase(key, displayName, passphrase);
+			setPassphraseStored(key, true);
+		}
+	}
+
 	@Override
 	public boolean isSupported() {
 		return keychain.getValue() != null;

+ 1 - 1
src/main/java/org/cryptomator/ui/changepassword/ChangePasswordController.java

@@ -102,7 +102,7 @@ public class ChangePasswordController implements FxController {
 	private void updatePasswordInSystemkeychain() {
 		if (keychain.isSupported() && !keychain.isLocked()) {
 			try {
-				keychain.changePassphrase(vault.getId(), newPasswordController.passwordField.getCharacters());
+				keychain.changePassphrase(vault.getId(), vault.getDisplayName(), newPasswordController.passwordField.getCharacters());
 				LOG.info("Successfully updated password in system keychain for {}", vault.getDisplayName());
 			} catch (KeychainAccessException e) {
 				LOG.error("Failed to update password in system keychain.", e);

+ 1 - 1
src/main/java/org/cryptomator/ui/keyloading/masterkeyfile/MasterkeyFileLoadingFinisher.java

@@ -47,7 +47,7 @@ class MasterkeyFileLoadingFinisher {
 	private void savePasswordToSystemkeychain() {
 		if (keychain.isSupported()) {
 			try {
-				keychain.storePassphrase(vault.getId(), CharBuffer.wrap(enteredPassword.get()));
+				keychain.storePassphrase(vault.getId(), vault.getDisplayName(), CharBuffer.wrap(enteredPassword.get()));
 			} catch (KeychainAccessException e) {
 				LOG.error("Failed to store passphrase in system keychain.", e);
 			}

+ 1 - 1
src/main/resources/license/THIRD-PARTY.txt

@@ -17,7 +17,7 @@ Cryptomator uses 40 third-party dependencies under the following licenses:
 			- jnr-a64asm (com.github.jnr:jnr-a64asm:1.0.0 - http://nexus.sonatype.org/oss-repository-hosting.html/jnr-a64asm)
 			- jnr-constants (com.github.jnr:jnr-constants:0.10.2 - http://github.com/jnr/jnr-constants)
 			- jnr-ffi (com.github.jnr:jnr-ffi:2.2.7 - http://github.com/jnr/jnr-ffi)
-			- Dagger (com.google.dagger:dagger:2.39 - https://github.com/google/dagger)
+			- Dagger (com.google.dagger:dagger:2.40.3 - https://github.com/google/dagger)
 			- Guava InternalFutureFailureAccess and InternalFutures (com.google.guava:failureaccess:1.0.1 - https://github.com/google/guava/failureaccess)
 			- Guava: Google Core Libraries for Java (com.google.guava:guava:31.0-jre - https://github.com/google/guava)
 			- Apache Commons CLI (commons-cli:commons-cli:1.4 - http://commons.apache.org/proper/commons-cli/)