Non-interactive creation of SSL certificate requests
you are missing two part:
the subject line, which can be called as
-subj "/C=US/ST=New Sweden/L=Stockholm /O=.../OU=.../CN=.../emailAddress=..."
- replacing ... with value,
X=being X509 code (Organisation/OrganisationUnit/etc ... )
the password value, which can be called as
-passout pass:client11 -passin pass:client11
- which give an output/input password
my calling for new key looks like
openssl genrsa -aes256 -out lib/client1.key -passout pass:client11 1024 openssl rsa -in lib/client1.key -passin pass:client11 -out lib/client1-nokey.key openssl req -new -key lib/client1.key -subj req -new \ -passin pass:client11 -out lib/client1.csr \ -subj "/C=US/ST=New Sweden/L=Stockholm/O=.../OU=.../CN=.../emailAddress=..."
(now that I see it, there is two
-new ... )
-batch option as described in the official docs.