mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
Pass the name of the vault on storing a passphrase
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -28,7 +28,7 @@
|
||||
|
||||
<!-- cryptomator dependencies -->
|
||||
<cryptomator.cryptofs.version>2.1.0-beta13</cryptomator.cryptofs.version>
|
||||
<cryptomator.integrations.version>1.0.0</cryptomator.integrations.version>
|
||||
<cryptomator.integrations.version>1.1.0</cryptomator.integrations.version>
|
||||
<cryptomator.integrations.win.version>1.0.0-rc1</cryptomator.integrations.win.version>
|
||||
<cryptomator.integrations.mac.version>1.0.0-rc1</cryptomator.integrations.mac.version>
|
||||
<cryptomator.integrations.linux.version>1.0.0-rc2</cryptomator.integrations.linux.version>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user