使用 OpenSSL 创建私有 CA:3 用户证书

OpenSSL 创建私有 CA 三部曲:
使用 OpenSSL 创建私有 CA:1 根证书
使用 OpenSSL 创建私有 CA:2 中间证书
使用 OpenSSL 创建私有 CA:3 用户证书

在前文《使用 OpenSSL 创建私有 CA:2 中间证书》中我们介绍了如何创建中间证书,并生成证书链。本文我们将介绍如何为应用生成用户证书(web 站点的 ssl 证书),并把证书部署到应用服务器上和客户端上。说明:本系列文章的演示环境为 Ubuntu 18.04,OpenSSL 的版本为 1.1.0g。

目标

为局域网中的站点 bigxa 创建 ssl 证书并部署。

准备用户证书的配置文件

在 myca 目录下创建 bigxa 目录,然后创建配置文件 bigxa/bigxa.cnf,编辑其内容如下:

# OpenSSL to generate a certificate signing requests(csr) configuration file. # v1 [ req ] # Options for the `req` tool (`man req`). # use prompt config control user interactive prompt = no input_password = 123456 default_bits = 2048 distinguished_name = req_distinguished_name string_mask = utf8only # SHA-1 is deprecated, so use SHA-2 instead. default_md = sha256 # Extension to add when the -x509 option is used. #x509_extensions = v3_ca req_extensions = v3_req [ req_distinguished_name ] # See <https://en.wikipedia.org/wiki/Certificate_signing_request>. countryName = CN stateOrProvinceName = ShaanXi localityName = Xian organizationName = PowerCity Ltd organizationalUnitName = Star commonName = bigxa emailAddress = ljfpower@163.com [ v3_req ] subjectAltName = DNS:bigxa

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzpszd.html