Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL process ends with code 1 #19

Open
rmittl opened this issue Mar 6, 2022 · 1 comment
Open

OpenSSL process ends with code 1 #19

rmittl opened this issue Mar 6, 2022 · 1 comment

Comments

@rmittl
Copy link

rmittl commented Mar 6, 2022

I tried to run the following openssl command:
openssl pkcs12 -in .p12 -clcerts -nokeys -out signerCert.pem -passin pass:

in Nodejs looks like this:
openssl(['pkcs12', '-config', { name:'cer.p12', buffer: buffervar }, '-clcerts', '-nokeys', '-out', 'Cer.pem', '-passin', 'pass:password'], function (err, buffer) {
console.log(err.toString(), buffer.toString());
});

I get always the errror
OpenSSL process ends with code 1
[💻] Usage: pkcs12 [options]
[💻] where options are
[💻] -export output PKCS12 file
[💻] -chain add certificate chain
[💻] -inkey file private key if not infile
[💻] -certfile f add all certs in f....

If I do it without password, then I get the same error. Where is my issue?
At the terminal it runs.
Thanks in advance.

@monkeytronics
Copy link

monkeytronics commented Apr 11, 2023

Hi @rmittl I experienced the same thing. I think it's because it spawns a new task to execute the command. Try adding a short 250 ms delay after your command and see if it gives the task time to execute and close. Worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants