附录-B-用于测试的OpenSSL服务器证书
前提条件
过程¶
A. 创建OpenSSL配置文件
# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. [ req ] default_bits = 4096 default_keyfile = myTestServerCertificateKey.pem ## The default private key file name. default_md = sha256 distinguished_name = req_dn req_extensions = v3_req [ v3_req ] subjectKeyIdentifier = hash basicConstraints = CA:FALSE keyUsage = critical, digitalSignature, keyEncipherment nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." extendedKeyUsage = serverAuth, clientAuth subjectAltName = @alt_names [ alt_names ] DNS.1 = ##TODO: Enter the DNS names. The DNS names should match the server names. DNS.2 = ##TODO: Enter the DNS names. The DNS names should match the server names. IP.1 = ##TODO: Enter the IP address. SAN matching by IP address is available starting in MongoDB 4.2 IP.2 = ##TODO: Enter the IP address. SAN matching by IP address is available starting in MongoDB 4.2 [ req_dn ] countryName = Country Name (2 letter code) countryName_default = TestServerCertificateCountry countryName_min = 2 countryName_max = 2 stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = TestServerCertificateState stateOrProvinceName_max = 64 localityName = Locality Name (eg, city) localityName_default = TestServerCertificateLocality localityName_max = 64 organizationName = Organization Name (eg, company) organizationName_default = TestServerCertificateOrg organizationName_max = 64 organizationalUnitName = Organizational Unit Name (eg, section) organizationalUnitName_default = TestServerCertificateOrgUnit organizationalUnitName_max = 64 commonName = Common Name (eg, YOUR name) commonName_max = 64
在macOS系统中
最后更新于