X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fruntime%2FCmsStateImpl.java;h=4d1d698453015bd0e2f82e122b6899ec0a84f1e9;hb=9611aafb746fd4816e41082958f357b542c6845c;hp=5dc8570099c608bae621e50b43b4f838e9ea092c;hpb=7f1b071dd54b9c3b85fc82d64993e1450cb99a12;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsStateImpl.java b/org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsStateImpl.java index 5dc857009..4d1d69845 100644 --- a/org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsStateImpl.java +++ b/org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsStateImpl.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.StringJoiner; +import java.util.TreeMap; import java.util.UUID; import java.util.concurrent.ExecutionException; import java.util.concurrent.ForkJoinPool; @@ -152,6 +153,16 @@ public class CmsStateImpl implements CmsState { log.debug("## CMS starting... (" + uuid + ")\n" + sb + "\n"); } + if (log.isTraceEnabled()) { + // print system properties + StringJoiner sb = new StringJoiner("\n"); + for (Object key : new TreeMap<>(System.getProperties()).keySet()) { + sb.add(key + "=" + System.getProperty(key.toString())); + } + log.trace("System properties:\n" + sb + "\n"); + + } + } catch (RuntimeException | IOException e) { log.error("## FATAL: CMS state failed", e); } @@ -186,8 +197,9 @@ public class CmsStateImpl implements CmsState { // explicitly load JAAS configuration Configuration.getConfiguration(); - boolean initSsl = getDeployProperty(CmsDeployProperty.HTTPS_PORT) != null; - if (initSsl) { + boolean initCertificates = (getDeployProperty(CmsDeployProperty.HTTPS_PORT) != null) + || (getDeployProperty(CmsDeployProperty.SSHD_PORT) != null); + if (initCertificates) { initCertificates(); } } @@ -236,9 +248,6 @@ public class CmsStateImpl implements CmsState { log.error("Cannot trust CA certificate", e); } } - -// if (!Files.exists(keyStorePath)) -// PkiUtils.createSelfSignedKeyStore(keyStorePath, keyStorePassword, PkiUtils.PKCS12); } public void stop() {