Mohamed Shanan Mohamed Shanan - 3 months ago 152
Android Question

Host name does not match the certificate subject

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

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)*

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


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


I got this message :


Your connection is not private

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


UPDATE

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

Answer

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

There is no cwac-cam library that I know of.

The CWAC repository is at:

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

which is a slightly different URL than what you have.

Comments