aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/CertWarningPane.java
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/CertWarningPane.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/CertWarningPane.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/netx/net/sourceforge/jnlp/security/CertWarningPane.java b/netx/net/sourceforge/jnlp/security/CertWarningPane.java
index f9273fa..dae8030 100644
--- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java
@@ -107,13 +107,14 @@ public class CertWarningPane extends SecurityDialogPanel {
//these strings -- we just want to fill in as many as possible.
try {
if ((certVerifier instanceof HttpsCertVerifier) &&
- (c instanceof X509Certificate))
+ (c instanceof X509Certificate)) {
name = SecurityUtil.getCN(((X509Certificate) c)
.getSubjectX500Principal().getName());
- else if (file instanceof PluginBridge)
+ } else if (file instanceof PluginBridge) {
name = file.getTitle();
- else
+ } else {
name = file.getInformation().getTitle();
+ }
} catch (Exception e) {
}
@@ -126,10 +127,11 @@ public class CertWarningPane extends SecurityDialogPanel {
}
try {
- if (file instanceof PluginBridge)
+ if (file instanceof PluginBridge) {
from = file.getCodeBase().getHost();
- else
+ } else {
from = file.getInformation().getHomepage().toString();
+ }
} catch (Exception e) {
}
@@ -146,7 +148,7 @@ public class CertWarningPane extends SecurityDialogPanel {
topLabelText = R("SHttpsUnverified") + " " + R("Continue");
propertyName = "OptionPane.warningIcon";
iconLocation += "warning.png";
- } else
+ } else {
switch (type) {
case VERIFIED:
topLabelText = R("SSigVerified");
@@ -167,7 +169,7 @@ public class CertWarningPane extends SecurityDialogPanel {
bottomLabelText += " " + R("SWarnFullPermissionsIgnorePolicy");
break;
}
-
+ }
ImageIcon icon = new ImageIcon((new sun.misc.Launcher())
.getClassLoader().getResource(iconLocation));
JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT);
@@ -195,8 +197,9 @@ public class CertWarningPane extends SecurityDialogPanel {
infoPanel.add(nameLabel);
infoPanel.add(publisherLabel);
- if (!(certVerifier instanceof HttpsCertVerifier))
+ if (!(certVerifier instanceof HttpsCertVerifier)) {
infoPanel.add(fromLabel);
+ }
infoPanel.add(alwaysTrust);
infoPanel.setBorder(BorderFactory.createEmptyBorder(25, 25, 25, 25));
@@ -225,7 +228,7 @@ public class CertWarningPane extends SecurityDialogPanel {
add(infoPanel);
add(buttonPanel);
- JLabel bottomLabel = new JLabel(htmlWrap(bottomLabelText));;
+ JLabel bottomLabel = new JLabel(htmlWrap(bottomLabelText));
JButton moreInfo = new JButton(R("ButMoreInformation"));
moreInfo.addActionListener(new MoreInfoButtonListener());