diff options
author | Jiri Vanek <jvanek@redhat.com> | 2013-11-13 09:48:41 +0100 |
---|---|---|
committer | Jiri Vanek <jvanek@redhat.com> | 2013-11-13 09:48:41 +0100 |
commit | 1c0876d0d5afafdd6472fbb873a5472fb62adf0a (patch) | |
tree | 0892beb5c2ee2a377e65da4fb77f9bfa9bb0b3aa /netx/net/sourceforge/jnlp/security | |
parent | 2a61c4b99672d8033b67ae8df8665c09e508941b (diff) |
Enabled access to manifests' attributes from JNLPFile class, implemented http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html#app_name
Diffstat (limited to 'netx/net/sourceforge/jnlp/security')
-rw-r--r-- | netx/net/sourceforge/jnlp/security/CertWarningPane.java | 21 |
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()); |