我发现 www.domain.com 跟 domain.com 用同个 https 证书在 PC 上是没问题的。 但是到了手机上就会提示证书不对,是这样的吗?
我发现 www.domain.com 跟 domain.com 用同个 https 证书在 PC 上是没问题的。 但是到了手机上就会提示证书不对,是这样的吗?
|
learningmanJul 19, 2021 via Android
1
不是,你肯定遗漏条件了
有的证书商签发会默认带上 www 的,你再检查下使用者可选名称? |
|
AoEiuV020Jul 19, 2021
2
不是,网站可以贴出现大家检查下,可能是 pc 上自动跳转 www.domain.com 了,
|
|
3
@learningman #1 那为什么 PC 上没问题,所以我的证书是没问题的,域名你可以看下 www.easydoc.net
|
|
chairuosenJul 19, 2021
4
curl https://www.easydoc.net
curl: (60) SSL: no alternative certificate subject name matches target host name 'www.easydoc.net' More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. PC 应该检测到了问题,自动把 www 去了跳转了一下 |
|
5
@chairuosen #4 那就是 PC 有自动处理,手机上没有了
|
|
TwinkleJul 19, 2021
6
你自己做了 301 跳转啊
|
|
7
@Twinkle #6 301 是有的,但是手机上就是跳不过去,会说证书不对
|
|
bestsanmaoJul 19, 2021
8
|
|
9
@bestsanmao #8 咦?你怎么看的
|
|
learningmanJul 19, 2021 via Android
10
@balabalaguguji 不是说了让你看使用者可选名称吗。。。
|
|
learningmanJul 19, 2021 via Android
11
@balabalaguguji 301 是一个 http 状态码啊,返回的前提是 http 连接了,你证书都炸了咋连接
|
|
lujjjhJul 19, 2021
12
openssl s_client -host www.easydoc.net -port 443 -servername www.easydoc.net -showcerts < /dev/null 2>&1 | openssl x509 -text | grep -A1 Alt
证书确实有问题,我一开始也好奇为什么 Mac 上 Chrome / Safari / Firefox 访问 https://www.easydoc.net 都没问题,直到我看见 Chrome 输出了: Redirecting navigation www.easydoc.net -> easydoc.net because the server presented a certificate valid for easydoc.net but not for www.easydoc.net. To disable such redirects launch Chrome with the following flag: --disable-features=SSLCommonNameMismatchHandling (不是 bug 是 feature |
|
also24Jul 19, 2021
13
|
|
14
@lujjjh #12 懂了,就是 PC 浏览器自动处理了这个问题。我的证书确实有问题,感谢。
|
|
15
@learningman #11 是我证书有问题,只不过 PC 端自动处理了,现在已搞定,感谢
|
|
16
@also24 #13 你这个不知道怎么看的,我在 edge 和 chrome 上都看不到这个,不过我找到个网站可以看 https://www.digicert.com/help/ ,感谢了
|
|
17
|
|
18
@also24 #17 学会了,感谢
|