Changeset 19650 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java
r19487 r19650 235 235 TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); 236 236 tmf.init(keyStore); 237 SSLContext sslContext = SSLContext.getInstance("TLSv1. 2");237 SSLContext sslContext = SSLContext.getInstance("TLSv1.3"); 238 238 sslContext.init(null, tmf.getTrustManagers(), null); 239 239 SSLContext.setDefault(sslContext); -
trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java
r18037 r19650 6 6 import net.trajano.commons.testing.UtilityClassTestUtil; 7 7 import org.junit.jupiter.api.Test; 8 9 import javax.net.ssl.SSLContext; 10 import java.io.IOException; 11 import java.security.GeneralSecurityException; 12 import java.util.Arrays; 13 import java.util.List; 14 15 import static org.junit.jupiter.api.Assertions.assertTrue; 8 16 9 17 /** … … 20 28 UtilityClassTestUtil.assertUtilityClassWellDefined(CertificateAmendment.class); 21 29 } 30 31 /** 32 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/24962">Bug #24962</a>. 33 * Adding missing certificates must not restrict HTTPS connections to TLS 1.2. 34 * @throws IOException if an I/O error occurs 35 * @throws GeneralSecurityException if a security error occurs 36 */ 37 @Test 38 void testTicket24962() throws IOException, GeneralSecurityException { 39 CertificateAmendment.addMissingCertificates(); 40 List<String> protocols = Arrays.asList(SSLContext.getDefault().getDefaultSSLParameters().getProtocols()); 41 assertTrue(protocols.contains("TLSv1.3"), protocols::toString); 42 } 22 43 }
Note:
See TracChangeset
for help on using the changeset viewer.
