- ワイルドカードな自己署名証明書だと複数の証明書を管理しなくていいなあというので作成手順を調べてみた。
ワイルドカード自己署名証明書の作成手順
- 基本的に普通の自己署名証明書の作成手順と同じ
- CSRでワイルドカードを指定する
- ただし、この手順で有効なサブドメインはwww.example.comやmail.example.comで、ドットが入ったwww.test.example.comなんかには対応していないみたい
$ openssl genrsa -out server.key 1024
$ openssl req -new -key server.key -out server.pem -sha1
...
Common Name (eg, your name or your server's hostname) []:*.example.com
...
$ openssl x509 -in server.pem -out server.crt -req -signkey server.key -days 365 -sha1