appmattus / certificatetransparency

Certificate transparency for Android and JVM
Apache License 2.0
142 stars 29 forks source link

On "SCT not enabled" status it doesn't stop the api request. #122

Open UmerTaptap opened 1 month ago

UmerTaptap commented 1 month ago

class CustomHurlStack : HurlStack() { override fun createConnection(url: URL): HttpURLConnection { val connection = super.createConnection(url) if (connection is HttpsURLConnection) { connection.hostnameVerifier = certificateTransparencyHostnameVerifier(connection.hostnameVerifier){ kotlin.io.println("Fail on error: ${this.failOnError}") } } return connection } }