I am trying to remove password from a private key file using openssl
with node js.
The node js code is:
cmd = exec('/usr/bin/openssl', [
'rsa',
'-in',
`${process.cwd()}/privkey.pem`, '-out', `/home/pratik/newPrivateKey.pem`
]);
cmd.stdin.write("password", 'utf8');
I referred to this SO question. But in my case, on console I just see true
as output. No file is created. What I am missing?