Ignore:
Timestamp:
2014-10-19T04:22:09+02:00 (10 years ago)
Author:
donvip
Message:

[josm_trustosm] update cots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/TrustOSMplugin.java

    r30724 r30745  
    99import java.io.IOException;
    1010import java.io.InputStream;
     11import java.security.InvalidKeyException;
     12import java.security.NoSuchAlgorithmException;
    1113import java.util.Enumeration;
    1214import java.util.HashMap;
     
    1517import java.util.jar.JarFile;
    1618
     19import javax.crypto.BadPaddingException;
    1720import javax.crypto.Cipher;
     21import javax.crypto.IllegalBlockSizeException;
     22import javax.crypto.NoSuchPaddingException;
    1823import javax.crypto.SecretKey;
    1924import javax.crypto.spec.SecretKeySpec;
     
    5762        super(info);
    5863        // check if the jarlibs are already extracted or not and extract them if not
    59         if (!Main.pref.getBoolean("trustosm.jarLibsExtracted")) {
     64        /*if (!Main.pref.getBoolean("trustosm.jarLibsExtracted")) {
    6065            Main.pref.put("trustosm.jarLibsExtracted", extractFiles("trustosm","lib"));
    6166            Main.pref.put("trustosm.jarLibsExtracted", extractFiles("trustosm","resources"));
    62         }
     67        }*/
     68        extractFiles("trustosm","lib");
     69        extractFiles("trustosm","resources");
    6370
    6471        refreshMenu();
     
    93100            c.init(Cipher.ENCRYPT_MODE, key192);
    94101            c.doFinal(data);
    95         } catch (Exception e) {
    96             //e.printStackTrace();
    97             System.err.println("Warning: It seems that the Unrestricted Policy Files are not available in this JVM. So high level crypto is not allowed. Problems may occure.");
     102        } catch (InvalidKeyException e) {
     103            Main.warn("It seems that the Unrestricted Policy Files are not available in this JVM. "+
     104                      "So high level crypto is not allowed. Problems may occur.");
    98105            //extractFiles("trustosm","jce");
    99106            installUnrestrictedPolicyFiles();
     107        } catch (BadPaddingException | IllegalBlockSizeException | NoSuchPaddingException | NoSuchAlgorithmException e) {
     108            Main.error(e);
    100109        }
    101110    }
Note: See TracChangeset for help on using the changeset viewer.