Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions client/src/com/mirth/connect/client/ui/UIConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,13 @@ public class UIConstants {

// User preferences
public static final String USER_PREF_KEY_BACKGROUND_COLOR = "backgroundColor";

// SSL Warning Text
// This text is used in the SSL Warning Panel for HTTP and WS connectors.
public static final String SSL_WARNING_TEXT = "<html>\n" +
"<body class=\"ssl-warning-panel\"><b><span style=\"color:#404040\">Important Notice:</span></b> The default system\n" +
"certificate store will be used for this connection. As a result, certain security options are not available and mutual\n" +
"authentication (two-way authentication) is not supported.\n" +
"</body>\n" +
"</html>";
Comment on lines +135 to +140
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have there been \n characters inserted into the string?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't answer for @jonbartels, obviously, but I often put them in in that way to avoid the source code appearing different from the value of the constant. They are interpreted in HTML as whitespace - which avoids "The default systemcertificate..." vs "The default system certificate...".

Whether that's the reason or not, it seems like this PR moves us to a better spot and doesn't appear to introduce any new problems.

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import com.mirth.connect.client.ui.BareBonesBrowserLaunch;
import com.mirth.connect.client.ui.UIConstants;

import static com.mirth.connect.client.ui.UIConstants.SSL_WARNING_TEXT;

public class SSLWarningPanel extends JPanel implements HyperlinkListener {

public SSLWarningPanel() {
Expand All @@ -42,7 +44,7 @@ public SSLWarningPanel() {
editorPane.setBackground(getBackground());
editorPane.setEditable(false);
editorPane.addHyperlinkListener(this);
editorPane.setText("<html><body class=\"ssl-warning-panel\"><b><span style=\"color:#404040\">Important Notice:</span></b> The default system certificate store will be used for this connection. As a result, certain security options are not available and mutual authentication (two-way authentication) is not supported.<br/><br/>The <a href=\"https://www.nextgen.com/products-and-services/integration-engine#tab_extensions?extension=ssl-manager\">SSL Manager extension</a> for NextGen Connect provides advanced security and certificate management enhancements, including the ability to import certificates for use by source or destination connectors, as well as the ability to configure hostname verification and client authentication settings. For more information please contact <a href=\"https://www.nextgen.com/contact-us\">NextGen Healthcare sales</a>.</body></html>");
editorPane.setText(SSL_WARNING_TEXT);
add(editorPane, "grow");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import com.mirth.connect.client.ui.BareBonesBrowserLaunch;
import com.mirth.connect.client.ui.UIConstants;

import static com.mirth.connect.client.ui.UIConstants.SSL_WARNING_TEXT;

public class SSLWarningPanel extends JPanel implements HyperlinkListener {

public SSLWarningPanel() {
Expand All @@ -42,7 +44,7 @@ public SSLWarningPanel() {
editorPane.setBackground(getBackground());
editorPane.setEditable(false);
editorPane.addHyperlinkListener(this);
editorPane.setText("<html><body class=\"ssl-warning-panel\"><b><span style=\"color:#404040\">Important Notice:</span></b> The default system certificate store will be used for this connection. As a result, certain security options are not available and mutual authentication (two-way authentication) is not supported.<br/><br/>The <a href=\"https://www.nextgen.com/products-and-services/integration-engine#tab_extensions?extension=ssl-manager\">SSL Manager extension</a> for NextGen Connect provides advanced security and certificate management enhancements, including the ability to import certificates for use by source or destination connectors, as well as the ability to configure hostname verification and client authentication settings. For more information please contact <a href=\"https://www.nextgen.com/contact-us\">NextGen Healthcare sales</a>.</body></html>");
editorPane.setText(SSL_WARNING_TEXT);
add(editorPane, "grow");
}

Expand Down