I'm new to the OpenSSL and Node community and could use some help on some commands.
I'm working on a node application where users can input their information and get a browser certificate to hit an application I have on my server. I want the user to be able to put in their information once, then have a browser cert download (in other words, all the commands need to run with no more user input).
I have the three commands using child processes in Node and OpenSSL and I'm trying to translate them over to node, but I'm having some issues.
My first command get variables from the users runs fine:
sudo openssl req -new -nodes -out /etc/pki/tls/request/bdd-req.pem -keyout /etc/pki/tls/private/bdd-key.pem -subj "/C='+country+'/ST='+state+'/L='+locality+'/O='+organization+'/CN='+name+'" -passout pass:'+password+' -x509 -days 365 -config /etc/pki/tls/openssl.cnf
However when the second command runs, I get an error:
sudo openssl ca -out /etc/pki/tls/cert-pem/bdd-cert.pem -days 365 -config /etc/pki/tls/openssl.cnf -passin pass:*PASSWORD* -keyfile /etc/pki/tls/private/cakey.pem -cert /etc/pki/tls/cacert.pem -selfsign -infiles /etc/pki/tls/request/bdd-req.pem
Error: Command failed: Using configuration from /etc/pki/tls/openssl.cnf
Error reading certificate request in /etc/pki/tls/mapedit-req-pem/bdd-req.pem
140052424636320:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: CERTIFICATE REQUEST
at ChildProcess.exithandler (child_process.js:658:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)
What is the CERTIFICATE REQUEST
it's asking for? Isn't that the cert
flag?