diff --git a/pom.xml b/pom.xml
index b2580b351..cd290d7c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.cryptomator
cryptomator
- 1.6.16
+ 1.6.17
Cryptomator Desktop App
@@ -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;