easy-rsa v3:默默执行build-ca和gen-req?


1

使用更新的easy-rsa v3版本,我无法找到一种方法来静默地将数据提供给命令行:

$ ./easyrsa build-ca nopass

Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
...............................................................................................................................................................+++
...............................................................................+++
writing new private key to '~/EasyRSA-3.0.4/pki/private/ca.key.Dz9CBy9xV1'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Common Name (eg: your user, host, or server name) [Easy-RSA CA]:

我试过摆弄文件openssl-easyrsa.cnfvars但无济于事。

我在docker容器入口点内自动执行这些操作,这就是为什么我不能使用任何交互式的东西。

Answers:


2

好的,这就像在运行easyrsa之前一样简单:

# export EASYRSA_BATCH=1

谢谢!我set_var EASYRSA_BATCH "yes"vars文件中试过,但是没有用。跑步export EASYRSA_BATCH=1就行了。
ndbroadbent
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.