From 6d49f2294a84c2e0f5f82abfb08ef9a53b26d999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kypta?= Date: Wed, 8 Nov 2023 18:11:51 +0100 Subject: [PATCH 1/3] Suppress custom TLS trust manager warning --- .../java/com/wultra/android/sslpinning/SslValidationStrategy.kt | 1 + .../android/sslpinning/integration/SSLPinningX509TrustManager.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/library/src/main/java/com/wultra/android/sslpinning/SslValidationStrategy.kt b/library/src/main/java/com/wultra/android/sslpinning/SslValidationStrategy.kt index ecccf72..899adc1 100644 --- a/library/src/main/java/com/wultra/android/sslpinning/SslValidationStrategy.kt +++ b/library/src/main/java/com/wultra/android/sslpinning/SslValidationStrategy.kt @@ -82,6 +82,7 @@ abstract class SslValidationStrategy { * Implements SSL validation strategy that trust any server certificate. * See [SslValidationStrategy.noValidation] for more details. */ +@Suppress("CustomX509TrustManager") internal class NoSslValidationStrategy: SslValidationStrategy() { override fun sslSocketFactory(): SSLSocketFactory? { val trustAllCerts = Array(1) { object : X509TrustManager { diff --git a/library/src/main/java/com/wultra/android/sslpinning/integration/SSLPinningX509TrustManager.kt b/library/src/main/java/com/wultra/android/sslpinning/integration/SSLPinningX509TrustManager.kt index c59686c..4055b95 100644 --- a/library/src/main/java/com/wultra/android/sslpinning/integration/SSLPinningX509TrustManager.kt +++ b/library/src/main/java/com/wultra/android/sslpinning/integration/SSLPinningX509TrustManager.kt @@ -28,6 +28,7 @@ import javax.net.ssl.X509TrustManager * * @author Tomas Kypta, tomas.kypta@wultra.com */ +@Suppress("CustomX509TrustManager") class SSLPinningX509TrustManager(private val certStore: CertStore) : X509TrustManager { @SuppressLint("TrustAllX509TrustManager") From 03a1128e45982ba3795e4c93b2a7129f0a8c749d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kypta?= Date: Wed, 8 Nov 2023 18:20:09 +0100 Subject: [PATCH 2/3] Update obsolete dependency --- library/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/build.gradle b/library/build.gradle index 84c5722..de8a92e 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation "com.google.code.gson:gson:${gsonVersion}" - implementation "androidx.annotation:annotation:1.6.0" + implementation "androidx.annotation:annotation:1.7.0" testImplementation "com.wultra.android.powerauth:powerauth-sdk:${powerAuthSdkVersion}" testImplementation 'junit:junit:4.13.2' From 5858d42b3cb44505df9a0c4f973a7d5843887672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kypta?= Date: Wed, 8 Nov 2023 18:37:31 +0100 Subject: [PATCH 3/3] Disable obsolete custom lint checks --- library/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/build.gradle b/library/build.gradle index de8a92e..b4cc12d 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -57,6 +57,12 @@ android { withJavadocJar() } } + + lintOptions { + // to handle warning coming from a transitive dependency + // - obsolete 'androidx.fragment' through 'powerauth-sdk' + disable 'ObsoleteLintCustomCheck' + } } dependencies {