mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2026-04-26 11:03:59 +02:00
ssh keys with empty passphrase should not be written as "encrypted" (said keys still worked)
This commit is contained in:
parent
7e0b860816
commit
3b12c79a6c
|
|
@ -175,7 +175,11 @@ public class SshKeyGen extends AppCompatActivity {
|
|||
|
||||
File file = new File(getFilesDir() + "/.ssh_key");
|
||||
FileOutputStream out = new FileOutputStream(file, false);
|
||||
kp.writePrivateKey(out, passphrase.getBytes());
|
||||
if (passphrase.length() > 0) {
|
||||
kp.writePrivateKey(out, passphrase.getBytes());
|
||||
} else {
|
||||
kp.writePrivateKey(out);
|
||||
}
|
||||
|
||||
file = new File(getFilesDir() + "/.ssh_key.pub");
|
||||
out = new FileOutputStream(file, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue