ubuntu – 如何为特定域自签名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

在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' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

我究竟做错了什么?

Common Name字段是您应该放置证书的域名的位置.如果它是空白的,则证书对任何域都无效.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...