~ubuntu-branches/ubuntu/raring/icedtea-web/raring

« back to all changes in this revision

Viewing changes to netx/net/sourceforge/jnlp/security/SecurityDialog.java

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-04 18:19:46 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20120204181946-jngobgzz4mlen9yl
Tags: 1.2~pre1-0ubuntu1
* Update to hg 20120203, taken from the icedtea-web-1.2 release branch.
* Build separate plugin packages for OpenJDK 6 and OpenJDK 7, needed
  to provide the path to the runtime and the mime description in the plugin.
* Use icedtea-<jre version>-plugin as the name for both plugin packages.
* Remove icedtea-web-1.1.4-npapi-fix.patch, fixed upstream.
* Pass -n to gzip when compressing manpages to be Multi-Arch: same safe.
* Build multiarch packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
     */
93
93
    private Object value;
94
94
 
 
95
    /** Should show signed JNLP file warning */
 
96
    private boolean requiresSignedJNLPWarning;
 
97
 
95
98
    SecurityDialog(DialogType dialogType, AccessType accessType,
96
99
                JNLPFile file, CertVerifier jarSigner, X509Certificate cert, Object[] extras) {
97
100
        super();
103
106
        this.extras = extras;
104
107
        initialized = true;
105
108
 
 
109
        if(file != null)
 
110
            requiresSignedJNLPWarning= file.requiresSignedJNLPWarning();
 
111
 
106
112
        initDialog();
107
113
    }
108
114
 
164
170
    public static void showMoreInfoDialog(
165
171
                CertVerifier jarSigner, SecurityDialog parent) {
166
172
 
 
173
        JNLPFile file= parent.getFile();
167
174
        SecurityDialog dialog =
168
 
                        new SecurityDialog(DialogType.MORE_INFO, null, null,
 
175
                        new SecurityDialog(DialogType.MORE_INFO, null, file,
169
176
                                jarSigner);
170
177
        dialog.setModalityType(ModalityType.APPLICATION_MODAL);
171
178
        dialog.setVisible(true);
207
214
        setSystemLookAndFeel();
208
215
 
209
216
        String dialogTitle = "";
210
 
        if (dialogType == DialogType.CERT_WARNING)
211
 
            dialogTitle = "Warning - Security";
212
 
        else if (dialogType == DialogType.MORE_INFO)
 
217
        if (dialogType == DialogType.CERT_WARNING) {
 
218
            if (accessType == AccessType.VERIFIED)
 
219
                dialogTitle = "Security Approval Required";
 
220
            else
 
221
                dialogTitle = "Security Warning";
 
222
        } else if (dialogType == DialogType.MORE_INFO)
213
223
            dialogTitle = "More Information";
214
224
        else if (dialogType == DialogType.CERT_INFO)
215
225
            dialogTitle = "Details - Certificate";
369
379
    public void addActionListener(ActionListener listener) {
370
380
        listeners.add(listener);
371
381
    }
 
382
    
 
383
    public boolean requiresSignedJNLPWarning()
 
384
    {
 
385
        return requiresSignedJNLPWarning;
 
386
    }
372
387
 
373
388
}