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:
Shawn O. Pearce
2010-02-16 16:31:30 -08:00
parent 29103b77f9
commit 17b17c4a68

View File

@@ -66,7 +66,7 @@ class InitSshd implements InitStep {
if (site.ssh_rsa.exists() || site.ssh_dsa.exists()) {
libraries.bouncyCastle.downloadRequired();
} else {
} else if (!site.ssh_key.exists()) {
libraries.bouncyCastle.downloadOptional();
}