Skip to content

Commit

Permalink
Merge pull request #21 from tinkoff-mobile-tech/MC-7689
Browse files Browse the repository at this point in the history
MC-7689 add self-signed SSL certificates
  • Loading branch information
naymushin authored Dec 19, 2022
2 parents e86af9d + 16db2d1 commit 53597db
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#### Fixed
#### Changes
#### Additions
- [tinkoff-id] add self-signed SSL certificates MC-7689

## 1.0.3

Expand Down
15 changes: 11 additions & 4 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions tinkoff-id/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 53597db

Please sign in to comment.