mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-15 01:57:39 -05:00
Merge pull request #1813
* OSM Tileserver now supports TLSv1.3, so we should use this in prefere…
This commit is contained in:
@@ -416,8 +416,7 @@ public abstract class AbstractTileFactory extends TileFactory
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Java 13 uses TLSv1.3 by default and fails to connect to tile server, so force TLS 1.2
|
SSLContext sslContext = SSLContext.getInstance("TLSv1.3");
|
||||||
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
|
|
||||||
sslContext.init(null, null, new SecureRandom());
|
sslContext.init(null, null, new SecureRandom());
|
||||||
conn.setSSLSocketFactory(sslContext.getSocketFactory());
|
conn.setSSLSocketFactory(sslContext.getSocketFactory());
|
||||||
}
|
}
|
||||||
@@ -427,7 +426,7 @@ public abstract class AbstractTileFactory extends TileFactory
|
|||||||
}
|
}
|
||||||
catch(NoSuchAlgorithmException nsae)
|
catch(NoSuchAlgorithmException nsae)
|
||||||
{
|
{
|
||||||
mLog.error("Unable to use TLSv1.2 for openstreetmap tiles");
|
mLog.error("Unable to use TLSv1.3 for OpenStreetMap tiles");
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream is = conn.getInputStream();
|
InputStream is = conn.getInputStream();
|
||||||
|
|||||||
Reference in New Issue
Block a user