Ignore:
Timestamp:
2014-07-26T03:50:31+02:00 (7 years ago)
Author:
Don-vip
Message:

see #10230, see #10033 - big rework of HTTPS support for Remote Control:

  • HTTPS disabled by default, must be enabled in remote control preferences
  • Old certificate and private key removed from jar and Windows keystore if found, even if remote control disabled
  • New certificate generated at runtime with critical X509 extensions BasicConstraints (non-CA certificate), ExtendedKeyUsage (usage restriction for TLS server sessions)
  • New passwords generated at runtime (but stored in clear in user preferences)
  • Private key is no longer stored in Windows keystore (only certificate)
Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java

    r7005 r7335  
    2121
    2222import org.openstreetmap.josm.Main;
    23 import org.openstreetmap.josm.tools.PlatformHookWindows;
    2423import org.openstreetmap.josm.tools.Shortcut;
    2524
     
    7776            }
    7877        }
    79        
     78
    8079        boolean selected = isSelected();
    8180
     
    9594        // screen by default (it's a simulated mode, but should be ok)
    9695        String exclusive = Main.pref.get("draw.fullscreen.exclusive-mode", "auto");
    97         if ("true".equals(exclusive) || ("auto".equals(exclusive) && !(Main.platform instanceof PlatformHookWindows))) {
     96        if ("true".equals(exclusive) || ("auto".equals(exclusive) && !Main.isPlatformWindows())) {
    9897            gd.setFullScreenWindow(selected ? frame : null);
    9998        }
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r7005 r7335  
    1818import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
    1919import org.openstreetmap.josm.tools.ImageProvider;
    20 import org.openstreetmap.josm.tools.PlatformHookWindows;
    2120import org.openstreetmap.josm.tools.Shortcut;
    2221
     
    7675            // java binary
    7776            final String java = System.getProperty("java.home") + File.separator + "bin" + File.separator +
    78                     (Main.platform instanceof PlatformHookWindows ? "java.exe" : "java");
     77                    (Main.isPlatformWindows() ? "java.exe" : "java");
    7978            if (!new File(java).isFile()) {
    8079                throw new IOException("Unable to find suitable java runtime at "+java);
  • trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java

    r7318 r7335  
    3131import org.openstreetmap.josm.tools.OpenBrowser;
    3232import org.openstreetmap.josm.tools.PlatformHookUnixoid;
    33 import org.openstreetmap.josm.tools.PlatformHookWindows;
    3433import org.openstreetmap.josm.tools.Shortcut;
    3534import org.openstreetmap.josm.tools.Utils;
     
    105104        try {
    106105            final String envJavaHome = System.getenv("JAVA_HOME");
    107             final String envJavaHomeAlt = Main.platform instanceof PlatformHookWindows ? "%JAVA_HOME%" : "${JAVA_HOME}";
     106            final String envJavaHomeAlt = Main.isPlatformWindows() ? "%JAVA_HOME%" : "${JAVA_HOME}";
    108107            final String propJavaHome = System.getProperty("java.home");
    109108            final String propJavaHomeAlt = "<java.home>";
     
    160159        try {
    161160            Map<String, Setting<?>> settings = Main.pref.getAllSettings();
    162             settings.remove("osm-server.username");
    163             settings.remove("osm-server.password");
    164             settings.remove("oauth.access-token.key");
    165             settings.remove("oauth.access-token.secret");
    166161            Set<String> keys = new HashSet<>(settings.keySet());
    167162            for (String key : keys) {
    168                 if (key.startsWith("marker.show")) {
     163                // Remove sensitive information from status report
     164                if (key.startsWith("marker.show") || key.contains("username") || key.contains("password") || key.contains("access-token")) {
    169165                    settings.remove(key);
    170166                }
Note: See TracChangeset for help on using the changeset viewer.