ssl - IDN 的 SSL 证书中的 CN 和 DNS 字段应使用哪种格式?

标签 ssl idn

如果我获得了 IDN 域的 SSL 证书,我应该期望 CN 字段中的值是域名的文字 UTF-8 字符串,还是转义的 punycode 版本?

X509v3 Subject Alternative Name DNS 条目的格式是否相同?

我可以查看一些示例 crt 文件,或指向使用 SSL 的 IDN 的链接吗?

有这方面的规范规范吗?

最佳答案

假设您正在谈论 HTTPS,传统上用于主机名验证的规则定义在 RFC 2818, Section 3.1 中,其中根本没有提到国际化域名。

最近,编写了“最佳实践”RFC,即 RFC 6125,以协调跨协议(protocol)的主机名验证过程,并阐明了其他一些要点。这是关于 IDN ( section 6.4.2 ) 的内容:

 If the DNS domain name portion of a reference identifier is an
 internationalized domain name, then an implementation MUST convert
 any U-labels [IDNA-DEFS] in the domain name to A-labels before
 checking the domain name.  In accordance with [IDNA-PROTO], A-labels
 MUST be compared as case-insensitive ASCII.  Each label MUST match in
 order for the domain names to be considered to match, except as
 supplemented by the rule about checking of wildcard labels
 (Section 6.4.3; but see also Section 7.2 regarding wildcards in
 internationalized domain names).

不幸的是,这在实践中可能对您没有帮助。首先,RFC 6125 相对较新,据我所知,很少有应用程序或库声称实现它。其次,并非所有库都严格遵守 RFC 2818(例如,浏览器有时可以更容忍哪些 CN 是可接受的)。

关于ssl - IDN 的 SSL 证书中的 CN 和 DNS 字段应使用哪种格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10803671/

相关文章:

url - 有什么方法可以避免为 IDN 域显示 "xn--"?

centos - idn2.h : No such file or directory

ssl - 如何配置jetty为指定资源请求客户端证书?

django: SECURE_PROXY_SSL_HEADER 需要 referer

apache - 是否可以在不支付任何费用的情况下使用 https(自己的服务器)?

Java SSL 通信

Ubuntu 22.04 IDN domain.com idn : could not convert from ASCII to UTF-8

java IDN 功能不可逆?

c# - CookieContainer 不存储国际化域名的 cookie

iOS NSURLConnection JSON 失败