问题描述
您好,我使用 okhttp/certificate pinning(使用 TrustKit)实现了这个库 (https://github.com/babylonhealth/certificate-transparency-android) 问题是即使主机名有日志我也收到错误 签到Google report 还有一个CT的日志 我使用以下配置:
certificateTransparencyInterceptor {
+"*.myhostname.io"
failOnError = false
logger = BasicAndroidCTLogger(BuildConfig.DEBUG)
}
但我从 logcat 收到 CertificateTransparency:domain.myhostname.io 失败:没有证书 okHttp 是这样的:
okHttpBuilder.addInterceptor(authInterceptor)
.sslSocketFactory(OkHttp3Helper.getSSLSocketFactory(),OkHttp3Helper.getTrustManager())
.addInterceptor(OkHttp3Helper.getPinningInterceptor())
.addNetworkInterceptor(getCertificateTransparencyInterceptor())
.sslSocketFactory(certificatePinning.getSSLSocketFactory(),certificatePinning.getTrustManager())
.followRedirects(false)
.followSslRedirects(false)
.build()
我在 .addNetworkInterceptor
中添加了拦截器
证书由 google_xenon2021
和 cloudflare_nimbus2021
记录并且它们在默认列表中
https://www.gstatic.com/ct/log_list/log_list.json
我正在尝试找出问题所在,但我不知道,
解决方法
目前 CT 库(现在托管在 https://github.com/appmattus/certificatetransparency/)仅支持检索作为 X.509v3 扩展嵌入证书中的 SCT(签名证书时间戳)。
因此,如果您的域通过 TLS 扩展提供它们,那么很遗憾该库将无法运行。
您应该能够通过在 Web 浏览器中查看您的证书详细信息并查找嵌入式签名证书时间戳列表条目来进行检查: