小编han*_*nna的帖子

如何为特定域自签名 SSL 证书?

我已按照以下步骤创建和签署我自己的 SSL 证书:

openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Run Code Online (Sandbox Code Playgroud)

在 Firefox 中,我收到以下警告消息:

  • 该证书不受信任,因为它是自签名的。
  • 该证书对任何服务器名称都无效。

当然我得到了前者的警告,但后者呢?在生成 CSR 时,我被问到很多问题,我给出了空白答案。不过,他们似乎都没有提到域名。

Country Name (2 letter code) [AU]:se
State or Province Name (full name) [Some-State]:.
Locality Name (eg, city) []:.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
Organizational Unit Name (eg, section) []:.
Common Name (eg, YOUR name) []:.
Email Address []:hanna@example.com

Please enter the following 'extra' …
Run Code Online (Sandbox Code Playgroud)

ubuntu ssl openssl

6
推荐指数
1
解决办法
5058
查看次数

标签 统计

openssl ×1

ssl ×1

ubuntu ×1