Commit 5bb1b65a authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1049: Admin console secure port

Don't initialize the admin console TLS connector when no identity store
is available (that's guaranteed to fail).
Don't log admin console startup success when there's an error.
parent abb2c62d
......@@ -142,7 +142,7 @@ public class AdminConsolePlugin implements Plugin {
sslEnabled = false;
try {
final IdentityStore identityStore = XMPPServer.getInstance().getCertificateStoreManager().getIdentityStore( ConnectionType.WEBADMIN );
if (adminSecurePort > 0 )
if (identityStore != null && adminSecurePort > 0 )
{
if ( identityStore.getAllCertificates().isEmpty() )
{
......@@ -189,7 +189,7 @@ public class AdminConsolePlugin implements Plugin {
}
catch ( Exception e )
{
Log.error( "An exception occured while trying to make available the admin console via HTTPS.", e );
Log.error( "An exception occurred while trying to make available the admin console via HTTPS.", e );
}
// Make sure that at least one connector was registered.
......@@ -206,13 +206,13 @@ public class AdminConsolePlugin implements Plugin {
try {
adminServer.start();
// Log the ports that the admin server is listening on.
logAdminConsolePorts();
}
catch (Exception e) {
Log.error("Could not start admin console server", e);
}
// Log the ports that the admin server is listening on.
logAdminConsolePorts();
}
/**
......
......@@ -86,12 +86,18 @@ public class CertificateStoreManager extends BasicModule
public IdentityStore getIdentityStore( ConnectionType type )
{
final CertificateStoreConfiguration configuration = typeToIdentityStore.get( type );
if (configuration == null) {
return null;
}
return identityStores.get( configuration );
}
public TrustStore getTrustStore( ConnectionType type )
{
final CertificateStoreConfiguration configuration = typeToTrustStore.get( type );
if (configuration == null) {
return null;
}
return trustStores.get( configuration );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment