mirror of https://git.sr.ht/~oppen/ariane
33 lines
942 B
Kotlin
33 lines
942 B
Kotlin
package oppen.tva.io
|
|
|
|
import java.security.cert.X509Certificate
|
|
import javax.net.ssl.TrustManager
|
|
import javax.net.ssl.X509TrustManager
|
|
import javax.security.cert.CertificateException
|
|
|
|
object DummyTrustManager {
|
|
|
|
fun get(): Array<TrustManager> {
|
|
return arrayOf(
|
|
object : X509TrustManager {
|
|
@Throws(CertificateException::class)
|
|
override fun checkClientTrusted(
|
|
chain: Array<X509Certificate?>?,
|
|
authType: String?
|
|
) {
|
|
}
|
|
|
|
@Throws(CertificateException::class)
|
|
override fun checkServerTrusted(
|
|
chain: Array<X509Certificate?>?,
|
|
authType: String?
|
|
) {
|
|
}
|
|
|
|
override fun getAcceptedIssuers(): Array<X509Certificate?>? {
|
|
return arrayOf()
|
|
}
|
|
}
|
|
)
|
|
}
|
|
} |