Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 712137 Details for
Bug 922791
installer has error creating self-signed certs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for fix
patch.txt (text/plain), 4.86 KB, created by
John Mazzitelli
on 2013-03-18 17:22:13 UTC
(
hide
)
Description:
patch for fix
Filename:
MIME Type:
Creator:
John Mazzitelli
Created:
2013-03-18 17:22:13 UTC
Size:
4.86 KB
patch
obsolete
>From c317c173dac2515ce2a3207dfb952b06668d4eea Mon Sep 17 00:00:00 2001 >From: John Mazzitelli <mazz@redhat.com> >Date: Mon, 18 Mar 2013 12:22:39 -0400 >Subject: [PATCH] BZ 922791 fix the creation of the self-signed cert. Also, > make sure we have a truststore, otherwise, the https > connector will not install (this supports external AS7 > installations) > >--- > .../server/installer/InstallerServiceImpl.java | 3 +- > .../server/installer/ServerInstallUtil.java | 27 +++++++++++++++++++- > 2 files changed, 28 insertions(+), 2 deletions(-) > >diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java >index e72f133..98131a4 100644 >--- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java >+++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java >@@ -279,7 +279,8 @@ public class InstallerServiceImpl implements InstallerService { > ServerInstallUtil.configureLogging(mcc, serverProperties); > > // create a keystore whose cert has a CN of this server's public endpoint address >- File keystoreFile = ServerInstallUtil.createKeystore(serverDetails, appServerConfigDir); >+ File keystoreFile = ServerInstallUtil.createKeystore(serverDetails != null ? serverDetails >+ : getServerDetailsFromPropertiesOnly(serverProperties), appServerConfigDir); > > // make sure all necessary web connectors are configured > ServerInstallUtil.setupWebConnectors(mcc, appServerConfigDir, serverProperties); >diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java >index ca32ef0..bf4255f 100644 >--- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java >+++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java >@@ -68,6 +68,7 @@ import org.rhq.core.db.PostgresqlDatabaseType; > import org.rhq.core.db.setup.DBSetup; > import org.rhq.core.util.PropertiesFileUpdate; > import org.rhq.core.util.exception.ThrowableUtil; >+import org.rhq.core.util.file.FileUtil; > import org.rhq.core.util.stream.StreamUtil; > import org.rhq.enterprise.communications.util.SecurityUtil; > >@@ -1230,6 +1231,30 @@ public class ServerInstallUtil { > > LOG.info("Creating https connector..."); > ConnectorConfiguration connector = buildSecureConnectorConfiguration(configDirStr, serverProperties); >+ >+ // verify that we have a truststore file - if user is relying on our self-signed certs, we'll have to create one for them >+ String truststoreFileString = connector.getSslConfiguration().getCaCertificateFile(); >+ if (truststoreFileString == null) { >+ LOG.warn("Missing a valid truststore location - you must specify a valid truststore location!"); >+ } else { >+ File truststoreFile = new File(truststoreFileString); >+ if (!truststoreFile.exists()) { >+ // user didn't provide a truststore file, copy the keystore and use it as the truststore; tell the user about this >+ File keystoreFile = new File(connector.getSslConfiguration().getCertificateKeyFile()); >+ if (!keystoreFile.isFile()) { >+ LOG.warn("Missing both keystore [" + keystoreFile + "] and truststore [" + truststoreFile + "]"); >+ } else { >+ LOG.warn("Missing the truststore [" + truststoreFile + "] - will copy the keystore [" >+ + keystoreFile + "] and make the copy the truststore."); >+ try { >+ FileUtil.copyFile(keystoreFile, truststoreFile); >+ } catch (Exception e) { >+ LOG.error("Failed to copy keystore to make truststore - a truststore still does not exist", e); >+ } >+ } >+ } >+ } >+ > client.addConnector("https", connector); > LOG.info("https connector created."); > >@@ -1342,7 +1367,7 @@ public class ServerInstallUtil { > /** > * Creates a keystore whose cert has a CN of this server's public endpoint address. > * >- * @param serverDetails details of the server being installed >+ * @param serverDetails details of the server being installed - must not be null and endpoint must be included in it > * @param configDirStr location of a configuration directory where the keystore is to be stored > * @return where the keystore file should be created (if an error occurs, this file won't exist) > */ >-- >1.7.6.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 922791
: 712137