Ignore:
Timestamp:
2017-07-08T22:11:07+02:00 (7 years ago)
Author:
Don-vip
Message:

see #10033 - remove workaround for IE (not needed anymore for IE11 on Windows 10, works also for Edge)

Location:
trunk/src/org/openstreetmap/josm/io/remotecontrol
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r12253 r12458  
    5151import sun.security.x509.CertificateVersion;
    5252import sun.security.x509.CertificateX509Key;
     53import sun.security.x509.DNSName;
    5354import sun.security.x509.ExtendedKeyUsageExtension;
    5455import sun.security.x509.GeneralName;
     
    109110
    110111    /**
    111      * Creates a GeneralName object from known types.
     112     * Creates a GeneralNameInterface object from known types.
    112113     * @param t one of 4 known types
    113114     * @param v value
     
    115116     * @throws IOException if any I/O error occurs
    116117     */
    117     private static GeneralName createGeneralName(String t, String v) throws IOException {
    118         GeneralNameInterface gn;
     118    private static GeneralNameInterface createGeneralNameInterface(String t, String v) throws IOException {
    119119        switch (t.toLowerCase(Locale.ENGLISH)) {
    120             case "uri": gn = new URIName(v); break;
    121             case "dns": gn = new DNSNameFix(v); break;
    122             case "ip": gn = new IPAddressName(v); break;
    123             default: gn = new OIDName(v);
    124         }
    125         return new GeneralName(gn);
     120            case "uri": return new URIName(v);
     121            case "dns": return new DNSName(v);
     122            case "ip": return new IPAddressName(v);
     123            default: return new OIDName(v);
     124        }
    126125    }
    127126
     
    174173                String t = item.substring(0, colonpos);
    175174                String v = item.substring(colonpos+1);
    176                 gnames.add(createGeneralName(t, v));
     175                gnames.add(new GeneralName(createGeneralNameInterface(t, v)));
    177176            }
    178177            // Non critical
     
    220219
    221220            X509Certificate cert = generateCertificate("CN=localhost, OU=JOSM, O=OpenStreetMap", pair, 1825, "SHA256withRSA",
    222                     // see #10033#comment:20: All browsers respect "ip" in SAN, except IE which only understands DNS entries:
    223                     // CHECKSTYLE.OFF: LineLength
    224                     // https://connect.microsoft.com/IE/feedback/details/814744/the-ie-doesnt-trust-a-san-certificate-when-connecting-to-ip-address
    225                     // CHECKSTYLE.ON: LineLength
    226                     "dns:localhost,ip:127.0.0.1,dns:127.0.0.1,ip:::1,uri:https://127.0.0.1:"+HTTPS_PORT+",uri:https://::1:"+HTTPS_PORT);
     221                    "dns:localhost,ip:127.0.0.1,ip:::1,uri:https://127.0.0.1:"+HTTPS_PORT+",uri:https://::1:"+HTTPS_PORT);
    227222
    228223            KeyStore ks = KeyStore.getInstance("JKS");
Note: See TracChangeset for help on using the changeset viewer.