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

"-in" used in a parameter throws an error #11

Open
SirFrancisDrake93 opened this issue Oct 22, 2020 · 2 comments
Open

"-in" used in a parameter throws an error #11

SirFrancisDrake93 opened this issue Oct 22, 2020 · 2 comments

Comments

@SirFrancisDrake93
Copy link

I tried to use the -subj parameter and used "test-intern" as Common Name.
The module interprets the "-in" as new parameter and not as string.

Example throwing an error:

global.openssl(['req', '-config', {name: "csr.conf", buffer: csrConfigBuffer}, '-new', '-key', {name: "private.pem", buffer: privateKeyBuffer}, "-subj", "/C=Test/ST=Test/L=Test/O=Test/OU=Test/CN=test-intern"], function(errorOutput, bufferOuptut) {

Resolved by changing:

const checkCommandForIO = element => element.includes('-in') || element.includes('-out')
    || element.includes('-keyout') || element.includes('-signkey') || element.includes('-key')

to:

const checkCommandForIO = element => element == '-in' || element == '-out'
    || element == '-keyout' || element == '-signkey' || element == '-key'  || element == '-config'
jiaqingw pushed a commit to jiaqingw/openssl-nodejs that referenced this issue Dec 1, 2020
@fhirfly
Copy link

fhirfly commented Mar 22, 2021

experiencing this same error. Can you commit the fix?

@ksw25
Copy link

ksw25 commented Feb 8, 2022

@codevibess, Can you commit this fix?

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

3 participants