简体   繁体   English

CertPathValidatorException:未找到证书路径的信任锚。 在 android 中更新 gradle 和 gradle 插件后

[英]CertPathValidatorException: Trust anchor for certification path not found. in android after update gradle and gradle plugin

I try to check SSL, by this code (and work successfully):我尝试通过此代码检查 SSL(并成功运行):

OkHttpClient.Builder httpBuilder = new OkHttpClient.Builder();
CertificatePinner certificatePinner = new CertificatePinner.Builder()
        .add("example.com", "sha256/S4AbJNGvyS57nzJwv8sPMUML8VHSqH1vbiBftdPcErI=")
        .build();
OkHttpClient client1 = httpBuilder
        .certificatePinner(certificatePinner)
        .build();
Retrofit retrofit1 = new Retrofit.Builder()
        .client(client1)
        .baseUrl("https://example.com/").addConverterFactory(GsonConverterFactory.create()).build();
samaniumRestApi2 userClient = retrofit1.create(samaniumRestApi2.class);
Call<Object> call = userClient.maintenanceMode(requestmaintenanceModeCheck);
call.enqueue(xxxxxxxxxxxxx);

and I get error by change base url to:我通过将基本 url 更改为:

https://example.com:448/

or或者

https://subdomain.example.com/

and error is :错误是:

CertPathValidatorException: Trust anchor for certification path not found.

please save me请救救我

这意味着证书是为www.example.com颁发的,因此对于whatever.example.com 来说是不可信的——这个服务器需要正确的签名证书

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android:CertPathValidatorException:找不到证书路径的信任锚 - Android: CertPathValidatorException: Trust anchor for certification path not found java.security.cert.CertPathValidatorException:未找到证书路径的信任锚。 安卓 2.3 - java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. Android 2.3 “未找到证书路径的信任锚”的问题。 - Problem with “Trust anchor for certification path not found.” java.security.cert.CertPathValidatorException:找不到证书路径的信任锚 - java.security.cert.CertPathValidatorException: Trust anchor for certification path not found Android-Retrofit2-java.security.cert.CertPathValidatorException:找不到证书路径的信任锚 - Android - Retrofit2 - java.security.cert.CertPathValidatorException: Trust anchor for certification path not found Hostgator 启用的免费 SSL - Android 错误:java.security.cert.CertPathValidatorException:找不到证书路径的信任锚 - Free SSL Enabled by Hostgator - Android Error : java.security.cert.CertPathValidatorException: Trust anchor for certification path not found Android-原因:java.security.cert.CertPathValidatorException:找不到证书路径的信任锚 - Android - Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found Android java.security.cert.CertPathValidatorException:未找到证书路径的信任锚 - Android java.security.cert.CertPathValidatorException: Trust anchor for certification path not found Android 7:找不到认证路径的信任锚 - Android 7: Trust anchor for certification path not found 使用loopj时出错:“找不到用于认证路径的信任锚。” - Error when using loopj: “Trust anchor for certification path not found.”`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM