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

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

使用较新的 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 容器入口点内自动执行这些操作,这就是为什么我无法进行任何交互式操作。

答案1

好的,在运行 easyrsa 之前这样做很简单:

# export EASYRSA_BATCH=1

答案2

它不起作用的原因是当你...

set EASYRSA_BATCH "yes"

你必须:

set it to EASYRSA_BATCH "1"

它对我有用。

相关内容