Skip to content

Commit 14dd3aa

Browse files
author
Chocobozzz
committed
Fix genrsa (parameters order)
1 parent db48a61 commit 14dd3aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ export default function exec(action, maybeBuffer, maybeOptions, maybeCallback) {
3131

3232
// Build initial params with passed action
3333
const params = action.split('.').map((value, key) => (!key ? value : `-${value}`));
34+
const lastParams = [];
3435
Object.keys(options).forEach(key => {
3536
if (options[key] === false) {
36-
params.push(key);
37+
lastParams.push(key);
3738
} else if (options[key] === true) {
3839
params.push(`-${key}`);
3940
} else {
@@ -47,6 +48,8 @@ export default function exec(action, maybeBuffer, maybeOptions, maybeCallback) {
4748
}
4849
});
4950

51+
params.concat(lastParams);
52+
5053
// Actually spawn openssl command
5154
const openssl = spawn('openssl', params);
5255
const outResult = [];

0 commit comments

Comments
 (0)