子子域上的通配符 SSL

发布于 2024-08-19 07:08:31 字数 1910 浏览 8 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦开始←不甜 2024-08-26 07:08:31

*.example.net 的通配符 SSL 证书将匹配 sub.example.net,但不匹配 sub.sub.example.net

来自 RFC 2818

使用指定的匹配规则进行匹配
RFC2459。如果给定类型的多个标识存在于
证书(例如,多个 dnsName 名称、任何一个中的匹配项)
该集合被认为是可接受的。)名称可以包含通配符
字符 * 被视为匹配任何单个域名
组件或组件片段。例如,*.a.example 匹配 foo.a.example
不是bar.foo.a.examplef*.example 匹配 foo.example 但不匹配 bar.example

A wildcard SSL certificate for *.example.net will match sub.example.net but not sub.sub.example.net.

From RFC 2818:

Matching is performed using the matching rules specified by
RFC2459. If more than one identity of a given type is present in
the certificate (e.g., more than one dNSName name, a match in any one
of the set is considered acceptable.) Names may contain the wildcard
character * which is considered to match any single domain name
component or component fragment. E.g., *.a.example matches foo.a.example but
not bar.foo.a.example. f*.example matches foo.example but not bar.example.

夏了南城 2024-08-26 07:08:31

如果您需要包含 *.domain.example 网站的通配符证书,并且还可以使用 sub1.sub2.domain.example 或其他域(如 *.domain2)。例如,您可以使用单个通配符证书来解决这个问题,该证书带有每个其他子域的主题备用名称 (SAN) 扩展。 SAN 证书不仅适用于多个特定主机名,还可以为通配符条目创建。

例如,*.domain.examplesub1.sub2.domain.example*.domain2.example 的通用名称为*.domain.example 然后您将附加 *.domain2.example*.sub2.domain.example 的主题备用名称。这可能取决于证书颁发机构如何向您收取(或不收取)证书费用,但有一些机构可以提供此服务。此外,SAN 支持在 Web 浏览器领域相当广泛。这种用途的最佳现实示例是 Google 的 SSL 证书。打开 Google 并查看其 SSL 证书,您将看到它适用于 *.google.com*.youtube.com*.gmail.com< /code>,以及更多它们被列为主题替代名称的地方。

If you need a wildcard certificate that contains *.domain.example sites and also work with sub1.sub2.domain.example or another domain like *.domain2.example, you can solve that with a single wildcard certificate with what is called a subject alternative name (SAN) extension for each of the other sub sub domains. A SAN cert is not just for multiple specific host names, it can be created for wildcards entries as well.

For example, *.domain.example, sub1.sub2.domain.example, and *.domain2.example would have a Common Name of *.domain.example then you would attach a subject alternative name of both *.domain2.example and *.sub2.domain.example. It might depend on the Certificate Authority as to how they would charge you (or not) for the certificate, but there are some out there where this offering is available. Also, SAN is support is pretty widespread in the web browser space. The best real world example of this use, it Google's SSL cert. Go open Google and view its SSL certificate, you will see it works for *.google.com, *.youtube.com, *.gmail.com, and a bunch more where they are listed as subject alternative names.

漆黑的白昼 2024-08-26 07:08:31

通配符仅应用于域的第一部分(从左侧)。 您将需要 *.sub2.domain.example 的证书

因此,如果您有 sub1.domain.examplesub2.domain.example<, /code>,那么它应该可以工作。

The wildcard is only applied to the first part (from the left) of you domain. So you'll need a certificate for *.sub2.domain.example

If you meant that you have sub1.domain.example and sub2.domain.example, then it should work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文