如何使用cli覆盖openssl配置文件中的参数?
我正在使用freeradius进行EAP-TLS身份验证 我运行此命令生成密钥:如何使用cli覆盖openssl配置文件中的参数?,openssl,Openssl,我正在使用freeradius进行EAP-TLS身份验证 我运行此命令生成密钥: openssl-req-new-out-client.csr-keyout-client.key-config./client.cnf 我想为不同的用户生成几个密钥/证书: emailAddress和commonName在[客户端] 在[req] 问题:是否有openssl命令的参数覆盖配置文件 如果没有其他解决方案,我想使用sed /etc/freeradius/3.0/certs#cat client.cn
openssl-req-new-out-client.csr-keyout-client.key-config./client.cnf
我想为不同的用户生成几个密钥/证书:
和emailAddress
在commonName
[客户端]
在
[req]
openssl
命令的参数覆盖配置文件
如果没有其他解决方案,我想使用sed
/etc/freeradius/3.0/certs#cat client.cnf:
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = ./
certs = $dir
crl_dir = $dir/crl
database = $dir/index.txt
new_certs_dir = $dir
certificate = $dir/ca.pem
serial = $dir/serial
crl = $dir/crl.pem
private_key = $dir/ca.key
RANDFILE = $dir/.rand
name_opt = ca_default
cert_opt = ca_default
default_days = 365
default_crl_days = 30
default_md = sha256
preserve = no
policy = policy_match
[ policy_match ]
countryName = match
stateOrProvinceName = match
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ policy_anything ]
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ req ]
prompt = no
distinguished_name = client
default_bits = 4096
input_password = clientpassword
output_password = clientpassword
[client]
countryName = JP
stateOrProvinceName = Tokyo
localityName = Company building
organizationName = Company name
emailAddress = testuser@company.com
commonName = testuser@company.com
我在配置文件中找到了以下两个替代变量的选项:
openssl.cnf
中的大多数定义,如下所示。然而,我不确定这是否适用于你提到的变量$ENV::name
格式,可以在任何其他部分中替换环境变量。此信息来自于SAN
环境变量中读取[server\u requext]
部分中的subjectAltName
变量