compile fixes after prop

This commit is contained in:
zzz
2012-10-14 20:03:56 +00:00
parent b03b4745db
commit c9196fda03
5 changed files with 13 additions and 11 deletions

View File

@ -124,7 +124,7 @@ public class ConsolePasswordManager extends RouterPasswordManager {
* *
* @return success or nothing to migrate * @return success or nothing to migrate
*/ */
public boolean migrateConsole() { private boolean migrateConsole() {
synchronized(ConsolePasswordManager.class) { synchronized(ConsolePasswordManager.class) {
if (_context.getBooleanProperty(PROP_MIGRATED)) if (_context.getBooleanProperty(PROP_MIGRATED))
return true; return true;
@ -205,6 +205,8 @@ public class ConsolePasswordManager extends RouterPasswordManager {
ConsolePasswordManager pm = new ConsolePasswordManager(ctx); ConsolePasswordManager pm = new ConsolePasswordManager(ctx);
if (!pm.migrate()) if (!pm.migrate())
System.out.println("Fail 1"); System.out.println("Fail 1");
if (!pm.migrateConsole())
System.out.println("Fail 1a");
System.out.println("Test plain"); System.out.println("Test plain");
if (!pm.savePlain("type1", "user1", "pw1")) if (!pm.savePlain("type1", "user1", "pw1"))

View File

@ -469,9 +469,9 @@ public class RouterConsoleRunner implements RouterApp {
SslSelectChannelConnector sssll = new SslSelectChannelConnector(); SslSelectChannelConnector sssll = new SslSelectChannelConnector();
// the keystore path and password // the keystore path and password
sssll.setKeystore(keyStore.getAbsolutePath()); sssll.setKeystore(keyStore.getAbsolutePath());
sssll.setPassword(ctx.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD)); sssll.setPassword(_context.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD));
// the X.509 cert password (if not present, verifyKeyStore() returned false) // the X.509 cert password (if not present, verifyKeyStore() returned false)
sssll.setKeyPassword(ctx.getProperty(PROP_KEY_PASSWORD, "thisWontWork")); sssll.setKeyPassword(_context.getProperty(PROP_KEY_PASSWORD, "thisWontWork"));
sssll.setUseDirectBuffers(false); // default true seems to be leaky sssll.setUseDirectBuffers(false); // default true seems to be leaky
ssll = sssll; ssll = sssll;
} else { } else {
@ -479,9 +479,9 @@ public class RouterConsoleRunner implements RouterApp {
SslSocketConnector sssll = new SslSocketConnector(); SslSocketConnector sssll = new SslSocketConnector();
// the keystore path and password // the keystore path and password
sssll.setKeystore(keyStore.getAbsolutePath()); sssll.setKeystore(keyStore.getAbsolutePath());
sssll.setPassword(ctx.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD)); sssll.setPassword(_context.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD));
// the X.509 cert password (if not present, verifyKeyStore() returned false) // the X.509 cert password (if not present, verifyKeyStore() returned false)
sssll.setKeyPassword(ctx.getProperty(PROP_KEY_PASSWORD, "thisWontWork")); sssll.setKeyPassword(_context.getProperty(PROP_KEY_PASSWORD, "thisWontWork"));
ssll = sssll; ssll = sssll;
} }
ssll.setHost(host); ssll.setHost(host);

View File

@ -85,9 +85,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> > <input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> >
<%=intl._("Require username and password")%><br> <%=intl._("Require username and password")%><br>
<%=intl._("Username")%>: <%=intl._("Username")%>:
<input name="user" type="text" value="<jsp:getProperty name="clientshelper" property="user" />" ><br> <input name="user" type="text" value="" /><br>
<%=intl._("Password")%>: <%=intl._("Password")%>:
<input name="pw" type="password" value="<jsp:getProperty name="clientshelper" property="pw" />" ><br> <input name="pw" type="password" value="" /><br>
</p><p><b><%=intl._("The default settings will work for most people.")%></b> </p><p><b><%=intl._("The default settings will work for most people.")%></b>
<%=intl._("Any changes made here must also be configured in the external client.")%> <%=intl._("Any changes made here must also be configured in the external client.")%>
<%=intl._("Many clients do not support SSL or authorization.")%> <%=intl._("Many clients do not support SSL or authorization.")%>

View File

@ -60,7 +60,7 @@ public class RouterPasswordManager extends PasswordManager {
* *
* @return success or nothing to migrate * @return success or nothing to migrate
*/ */
public boolean migrate() { protected boolean migrate() {
synchronized(RouterPasswordManager.class) { synchronized(RouterPasswordManager.class) {
if (_context.getBooleanProperty(PROP_MIGRATED)) if (_context.getBooleanProperty(PROP_MIGRATED))
return true; return true;