EasyRSA
From Lolly's Wiki
User certificates with passwords in scripts
Add a line after # output_password = secret:
# output_password = secret
output_password = $ENV::KEY_PASS
After that the openssl calls taking the needed password from the environment variable KEY_PASS.
You can call it like this for example:
KEY_PASS="password" ./build-key-pass --batch user