主机名与证书主题不匹配 [英] Host name does not match the certificate subject

查看:740
本文介绍了主机名与证书主题不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试构建我的android项目时收到gradle错误.我正在使用cwac-cam库.

I get this gradle error when I try to build my android project.I am using cwac-cam library.

错误:主机名'repo.commonsware.com.s3.amazonaws.com'与对等方提供的证书主题不匹配(CN = .s3.amazonaws.com,O = Amazon .com Inc.,L =西雅图,ST =华盛顿,C =美国)*

Error:Host name 'repo.commonsware.com.s3.amazonaws.com' does not match the certificate subject provided by the peer (CN=.s3.amazonaws.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US)*

当我尝试使用chrome从build.gradle打开URL

When I tried to open the URL from build.gradle using chrome

行家{url" https://repo.commonsware.com.s3.amazonaws.com }

我收到此消息:

您的连接不是私有的

Your connection is not private

攻击者可能试图从中窃取您的信息 repo.commonsware.com.s3.amazonaws.com(例如密码, 讯息或信用卡). NET :: ERR_CERT_COMMON_NAME_INVALID

Attackers might be trying to steal your information from repo.commonsware.com.s3.amazonaws.com (for example, passwords, messages, or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID

更新

我尝试在另一台设备上打开该URL,并且没有问题.

I tried to open the URL on another device and it opened with no problems.

推荐答案

当我尝试构建我的android项目时收到gradle错误.我正在使用cwac-cam库.

I get this gradle error when I try to build my android project.I am using cwac-cam library.

我不知道cwac-cam库.

CWAC存储库位于:

The CWAC repository is at:

repositories {
    maven {
        url "https://s3.amazonaws.com/repo.commonsware.com"
    }
}

与您所拥有的URL稍有不同.

which is a slightly different URL than what you have.

这篇关于主机名与证书主题不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆