Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将CSR可分辨名称字段作为参数传递给OpenSSL_Openssl_Csr - Fatal编程技术网

将CSR可分辨名称字段作为参数传递给OpenSSL

将CSR可分辨名称字段作为参数传递给OpenSSL,openssl,csr,Openssl,Csr,如何在不需要用户输入的情况下生成CSR,例如从应用程序中生成CSR?通过“-subu”参数传递主题: openssl req -new -key <private key file> -out <CSR output file> -subj "/C=<Country Name>/ST=<State>/L=<Locality Name>/O=<Organization Name>/CN=<Common Name>"

如何在不需要用户输入的情况下生成CSR,例如从应用程序中生成CSR?

通过“-subu”参数传递主题:

openssl req -new -key <private key file> -out <CSR output file> -subj "/C=<Country Name>/ST=<State>/L=<Locality Name>/O=<Organization Name>/CN=<Common Name>"
openssl x509 -req -days 365 -in server.csr -signkey server.pem

Loading 'screen' into random state - done
Signature ok
subject=/C=US/ST=Florida/L=Miami/O=Test Group/CN=testgroup.server5
Getting Private key
...