xyz.cssxsh.pixiv.tool.RubyX509TrustManager.kt Maven / Gradle / Ivy
package xyz.cssxsh.pixiv.tool
import java.security.*
import java.security.cert.*
import javax.net.ssl.*
public object RubyX509TrustManager : X509TrustManager {
private val delegate: X509TrustManager by lazy {
val factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())
factory.init(null as KeyStore?)
factory.trustManagers.filterIsInstance().first()
}
override fun checkClientTrusted(chain: Array?, authType: String?) {}
override fun checkServerTrusted(chain: Array?, authType: String?) {}
override fun getAcceptedIssuers(): Array = delegate.acceptedIssuers
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy