Changeset 30745 in osm


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

[josm_trustosm] update cots

Location:
applications/editors/josm/plugins/trustosm
Files:
10 added
6 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/trustosm/.classpath

    r30724 r30745  
    22<classpath>
    33        <classpathentry kind="src" path="src"/>
    4         <classpathentry kind="lib" path="lib/bcpg-jdk16-145.jar"/>
    5         <classpathentry kind="lib" path="lib/bcprov-jdk16-145.jar"/>
    6         <classpathentry kind="lib" path="lib/jcalendar-1.3.3.jar"/>
    7         <classpathentry kind="lib" path="lib/looks-2.0.1.jar"/>
    8         <classpathentry kind="lib" path="lib/stax-utils.jar"/>
    9         <classpathentry kind="lib" path="lib/swingx-core-1.6.2.jar"/>
     4        <classpathentry kind="lib" path="lib/bcpg-jdk15on-1.50.jar" sourcepath="bcpg-jdk15on-1.50-sources.jar">
     5                <attributes>
     6                        <attribute name="javadoc_location" value="jar:platform:/resource/JOSM-trustosm/bcpg-jdk15on-1.50-javadoc.jar!/"/>
     7                </attributes>
     8        </classpathentry>
     9        <classpathentry kind="lib" path="lib/bcprov-jdk15on-1.50.jar" sourcepath="bcprov-jdk15on-1.50-sources.jar">
     10                <attributes>
     11                        <attribute name="javadoc_location" value="jar:platform:/resource/JOSM-trustosm/bcprov-jdk15on-1.50-javadoc.jar!/"/>
     12                </attributes>
     13        </classpathentry>
     14        <classpathentry kind="lib" path="lib/jcalendar-1.4.jar"/>
     15        <classpathentry kind="lib" path="lib/jgoodies-common-1.2.0.jar"/>
     16        <classpathentry kind="lib" path="lib/jgoodies-looks-2.4.1.jar"/>
     17        <classpathentry kind="lib" path="lib/swingx-core-1.6.5-1.jar"/>
    1018        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
    1119        <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
  • 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.