https://kotlinlang.org logo
Title
h

Hien Nguyen

02/21/2022, 4:22 AM
actual class Test actual constructor() {
    actual val httpClientEngine: HttpClientEngineFactory<HttpClientEngineConfig>
        get() = OkHttp
}
I’m integrating the certificate pinning to the ktor kmm Does ktor use
network_security_config
file in android ?
h

Hien Nguyen

02/22/2022, 3:36 AM
thx sir ^^
follow my understanding, the android only support
network-security-config
file above android 7 ? So, if we want to support certificate pinner on the lower devices, we have to write the code like this picture ?
a

Aleksei Tirman [JB]

02/22/2022, 2:26 PM
So, if we want to support certificate pinner on the lower devices, we have to write the code like this picture ?
Looks like this code should work.
For iOS Ktor has dedicated functionality for certificate pinning. Please see the description in KDoc.