diff --git a/CHANGELOG.md b/CHANGELOG.md index ad943c0..b093951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ #### Fixed #### Changes #### Additions +- [tinkoff-id] add self-signed SSL certificates MC-7689 ## 1.0.3 diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 57d748b..65ff72e 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -7,19 +7,26 @@ ext { authCode = VERSION_CODE.toInteger() authVersion = getVersionName(VERSION_NAME) - constraintLayoutVersion = '2.1.3' - rxJavaVersion = '2.2.21' - rxAndroidVersion = '2.1.1' + // tinkoff libs + sslTrustedCertsVersion = '1.11.2' + // android libs kotlinVersion = '1.6.21' appCompatVersion = '1.4.1' materialVersion = '1.5.0' + constraintLayoutVersion = '2.1.3' + androidPluginVersion = '7.1.3' + + // 3-rd party libs + rxJavaVersion = '2.2.21' + rxAndroidVersion = '2.1.1' okHttpVersion = '4.9.3' + // documentation & quality libs detektVersion = '1.20.0' dokkaVersion = '1.6.21' - androidPluginVersion = '7.1.3' + // testing automation libs junitVersion = '4.13.2' truthVersion = '1.1.3' robolectricVersion = '4.8' diff --git a/tinkoff-id/build.gradle b/tinkoff-id/build.gradle index d0d3a2d..564df97 100644 --- a/tinkoff-id/build.gradle +++ b/tinkoff-id/build.gradle @@ -10,6 +10,8 @@ android { } dependencies { + implementation "ru.tinkoff.core.components.security:ssl-trusted-certs:$sslTrustedCertsVersion" + implementation "androidx.appcompat:appcompat:$appCompatVersion" implementation "com.squareup.okhttp3:okhttp:$okHttpVersion" diff --git a/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/TinkoffIdAuth.kt b/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/TinkoffIdAuth.kt index e2ad3ea..488dda1 100644 --- a/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/TinkoffIdAuth.kt +++ b/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/TinkoffIdAuth.kt @@ -22,6 +22,7 @@ import android.net.Uri import android.os.Build import androidx.annotation.RequiresApi import okhttp3.OkHttpClient +import ru.tinkoff.core.components.security.ssltrusted.certs.SslTrustedCerts.enrichWithTrustedCerts import ru.tinkoff.core.tinkoffId.api.TinkoffIdApi import ru.tinkoff.core.tinkoffId.codeVerifier.CodeVerifierStore import ru.tinkoff.core.tinkoffId.codeVerifier.CodeVerifierUtil @@ -43,6 +44,7 @@ public class TinkoffIdAuth( init { val client = OkHttpClient.Builder() + .enrichWithTrustedCerts(context) .readTimeout(OKHTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS) .writeTimeout(OKHTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS) .connectTimeout(OKHTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS) diff --git a/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/ui/TinkoffIdSignInButton.kt b/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/ui/TinkoffIdSignInButton.kt index 1c98e26..e085876 100644 --- a/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/ui/TinkoffIdSignInButton.kt +++ b/tinkoff-id/src/main/java/ru/tinkoff/core/tinkoffId/ui/TinkoffIdSignInButton.kt @@ -71,7 +71,7 @@ internal typealias TinkoffDimen = R.dimen * - `tinkoff_id_corner_radius` - radius for button corners. Used only if `tinkoff_id_compact` attribute is false. * - `tinkoff_id_font` - font of the text on the button. Used only if `tinkoff_id_compact` attribute is false. * - * @author Dmitry Naymushin, Kirill Voskrebentsev + * @author Kirill Voskrebentsev */ public class TinkoffIdSignInButton @JvmOverloads constructor( context: Context,