> co" /> > co" /> > co"/>

SSLHandshakeException: CertPathValidatorException: Trust anchor for certification path not found

49 views Asked by At

I'm getting the error in the title. Where might the problem be?

`

interface QuizService {
    @GET("quiz")
    fun getQuizQuestions(): Call<List<Question>>

    companion object {
        private const val BASE_URL = "https://asdasd.mockable.io/"


        fun create(): QuizService {
            val retrofit = Retrofit.Builder()
                .baseUrl(BASE_URL)
                .addConverterFactory(GsonConverterFactory.create())
                .build()

            return retrofit.create(QuizService::class.java)
        }
    }
}`

I added the network settings to the AndroidManifest.xml file as follows. However, the problem was not resolved.

<application android:networkSecurityConfig="@xml/network_security_config" ... .. .

network_security_config.xml

`

<domain-config cleartextTrafficPermitted="false">
    <!-- Make sure your URL Server here -->
    <domain includeSubdomains="true">mockable.io</domain>
    <trust-anchors>
        <certificates src="user" />
        <certificates src="system" />
    </trust-anchors>
</domain-config>

`

0

There are 0 answers