- Export SSL cert on creation
 - new /certs page to show local SSL certs
This commit is contained in:
zzz
2015-09-27 15:56:03 +00:00
parent 4d7ad6ef7f
commit 1c3527e1a4
3 changed files with 105 additions and 0 deletions

View File

@ -760,6 +760,13 @@ public class RouterConsoleRunner implements RouterApp {
changes.put(PROP_KEY_PASSWORD, keyPassword);
_context.router().saveConfig(changes, null);
} catch (Exception e) {} // class cast exception
// export cert, fails silently
File dir = new SecureDirectory(_context.getConfigDir(), "certificates");
dir.mkdir();
dir = new SecureDirectory(dir, "console");
dir.mkdir();
File certFile = new File(dir, "console.local.crt");
KeyStoreUtil.exportCert(ks, DEFAULT_KEYSTORE_PASSWORD, "console", certFile);
}
}
if (success) {