mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Merge pull request #325 from owncloud/feature/android10
Upgrade target version to v29
This commit is contained in:
commit
e5e226dee0
@ -23,11 +23,11 @@ allOpen {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
|
||||
versionCode = 10000500
|
||||
versionName = "1.0.5"
|
||||
|
@ -71,6 +71,10 @@ public class HttpClient {
|
||||
SSLContext sslContext;
|
||||
|
||||
try {
|
||||
sslContext = SSLContext.getInstance("TLSv1.3");
|
||||
} catch (NoSuchAlgorithmException tlsv13Exception) {
|
||||
try {
|
||||
Timber.w("TLSv1.3 is not supported in this device; falling through TLSv1.2");
|
||||
sslContext = SSLContext.getInstance("TLSv1.2");
|
||||
} catch (NoSuchAlgorithmException tlsv12Exception) {
|
||||
try {
|
||||
@ -83,6 +87,7 @@ public class HttpClient {
|
||||
// http://developer.android.com/reference/javax/net/ssl/SSLSocket.html
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sslContext.init(null, new TrustManager[]{trustManager}, null);
|
||||
|
||||
|
@ -74,8 +74,8 @@ public class TLSSocketFactory extends SSLSocketFactory {
|
||||
}
|
||||
|
||||
private Socket enableTLSOnSocket(Socket socket) {
|
||||
if(socket != null && (socket instanceof SSLSocket)) {
|
||||
((SSLSocket)socket).setEnabledProtocols(new String[] {"TLSv1.1", "TLSv1.2"});
|
||||
if((socket instanceof SSLSocket)) {
|
||||
((SSLSocket)socket).setEnabledProtocols(new String[] {"TLSv1.1", "TLSv1.2", "TLSv1.3"});
|
||||
}
|
||||
return socket;
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
|
||||
// This is pretty ugly but manifest placeholders don't seem to work very well when using different modules
|
||||
// See https://github.com/openid/AppAuth-Android/issues/325
|
||||
|
Loading…
x
Reference in New Issue
Block a user