init: Only suggest downloading BouncyCastle on new installs
If we have no SSH keys, suggest downloading BouncyCastle so the user can use standard SSH key file formats. But, if we have at least one type of key format present, don't suggest downloading it. The user has chosen not to use BouncyCastle in a prior run and we don't need it to read the Java serialized ssh_host_key file. Change-Id: I8a8ae08b8164ee0e95e963ec28dc9f1fc5a5b869 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -66,7 +66,7 @@ class InitSshd implements InitStep {
|
|||||||
|
|
||||||
if (site.ssh_rsa.exists() || site.ssh_dsa.exists()) {
|
if (site.ssh_rsa.exists() || site.ssh_dsa.exists()) {
|
||||||
libraries.bouncyCastle.downloadRequired();
|
libraries.bouncyCastle.downloadRequired();
|
||||||
} else {
|
} else if (!site.ssh_key.exists()) {
|
||||||
libraries.bouncyCastle.downloadOptional();
|
libraries.bouncyCastle.downloadOptional();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user