schedule2020-04-21

ワイルドカード証明書は複数階層のサブドメインには対応していない

ワイルドカードの証明書を取得してから気づきました。

*.example.comのワイルドカードはbar.foo.example.comと複数階層になっていてはダメでした。 この場合、*.foo.example.comが必要。

利用できる文字にだけ気を付けているとやらかしてしまうのでご注意ください。

RFC2818

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.com matches foo.a.com but not bar.foo.a.com. f.com matches foo.com but not bar.com.

Deepl翻訳
マッチングは、RFC2459で指定されたマッチングルールを使用して実行される。 証明書に特定のタイプの ID が複数存在する場合(例えば、複数のdNSName名、セットのいずれかでの一致は許容されると考えられます。)名前にワイルドカード文字 * が含まれていることがある。例えば、*.a.com は foo.a.com にマッチしますが、bar.foo.a.com にはマッチしません。

その他の情報源