diff --git a/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml b/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml index 9cb44d090..9797dd6a7 100644 --- a/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml +++ b/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml @@ -66,6 +66,7 @@ + diff --git a/pom.xml b/pom.xml index 6f34af07f..906e7f835 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,7 @@ com.github.serceman,com.github.jnr,org.ow2.asm,net.java.dev.jna,org.apache.jackrabbit,org.apache.httpcomponents,de.swiesend,org.purejava,com.github.hypfvieh + 2.1.1 2.5.3 1.2.0-beta1 1.1.2 @@ -63,6 +64,12 @@ + + + org.cryptomator + cryptolib + ${cryptomator.cryptolib.version} + org.cryptomator cryptofs diff --git a/src/main/java/org/cryptomator/common/settings/DeviceKey.java b/src/main/java/org/cryptomator/common/settings/DeviceKey.java index 04e9ebd0f..d3431440a 100644 --- a/src/main/java/org/cryptomator/common/settings/DeviceKey.java +++ b/src/main/java/org/cryptomator/common/settings/DeviceKey.java @@ -76,6 +76,11 @@ public class DeviceKey { private P384KeyPair createAndStoreNewKeyPair(char[] passphrase, Path p12File) throws IOException { var keyPair = P384KeyPair.generate(); + var tmpFile = p12File.resolveSibling(p12File.getFileName().toString() + ".tmp"); + if(Files.exists(tmpFile)) { + LOG.debug("Leftover from devicekey creation detected. Deleting {}", tmpFile); + Files.delete(tmpFile); + } LOG.debug("Store new device key to {}", p12File); keyPair.store(p12File, passphrase); return keyPair;