Changeset 7337 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
r7335 r7337 79 79 private SSLContext sslContext; 80 80 81 private static final String KEYSTORE_FILENAME = "josm.keystore"; 81 private static final int HTTPS_PORT = 8112; 82 83 /** 84 * JOSM keystore file name. 85 * @since 7337 86 */ 87 public static final String KEYSTORE_FILENAME = "josm.keystore"; 82 88 83 89 /** … … 196 202 KeyPair pair = generator.generateKeyPair(); 197 203 198 X509Certificate cert = generateCertificate("CN=localhost, OU=JOSM, O=OpenStreetMap", pair, 1825, "SHA256withRSA", "ip:127.0.0.1"); 204 X509Certificate cert = generateCertificate("CN=localhost, OU=JOSM, O=OpenStreetMap", pair, 1825, "SHA256withRSA", 205 "ip:127.0.0.1,dns:localhost,uri:https://127.0.0.1:"+HTTPS_PORT); 199 206 200 207 KeyStore ks = KeyStore.getInstance("JKS"); … … 255 262 */ 256 263 public static void restartRemoteControlHttpsServer() { 257 int port = Main.pref.getInteger("remote.control.https.port", 8112);264 int port = Main.pref.getInteger("remote.control.https.port", HTTPS_PORT); 258 265 try { 259 266 stopRemoteControlHttpsServer(); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r7335 r7337 262 262 } 263 263 } 264 // JOSM certificate not found, install it 264 // JOSM certificate not found, install it to Windows-ROOT keystore, used by IE, Chrome and Safari, but not by Firefox 265 265 Main.info(tr("Adding JOSM localhost certificate to {0} keystore", WINDOWS_ROOT)); 266 266 ks.setEntry("josm_localhost", trustedCert, null); -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
r7336 r7337 13 13 import java.net.URL; 14 14 import java.nio.charset.StandardCharsets; 15 import java.nio.file.Files; 16 import java.nio.file.Paths; 15 17 import java.security.GeneralSecurityException; 16 18 import java.security.SecureRandom; … … 45 47 JOSMFixture.createUnitTestFixture().init(); 46 48 RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.put(true); 49 try { 50 Files.deleteIfExists(Paths.get( 51 RemoteControl.getRemoteControlDir()).resolve(RemoteControlHttpsServer.KEYSTORE_FILENAME)); 52 } catch (IOException e) { 53 Main.error(e); 54 } 55 47 56 RemoteControl.start(); 48 57 disableCertificateValidation();
Note: See TracChangeset
for help on using the changeset viewer.