I am getting this \'HTTPS hostname wrong:\' error when trying to connect to a server using https. My url looks something like this
https://sub.domain.com/tam
Use host name (dns name) as Alias name.
Ex:
keytool -import -alias -file certificate_one.cer -keystore cacerts