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

If the name includes path separators, openssl fails #6

Closed
toddself opened this issue Jun 26, 2017 · 2 comments
Closed

If the name includes path separators, openssl fails #6

toddself opened this issue Jun 26, 2017 · 2 comments

Comments

@toddself
Copy link

If you pass in a name that contains your system's path separators it fails because the directory doesn't exist for openssl to write to, since it's a shell command:

{ Error: Command failed: openssl genrsa -out /Users/todd/.config/devcert/Users/todd/src/bankai/example.js.key 2048
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at run (/Users/todd/src/bankai/node_modules/devcert/dist/utils.js:20:28)
    at openssl (/Users/todd/src/bankai/node_modules/devcert/dist/utils.js:10:12)
    at Object.generateKey (/Users/todd/src/bankai/node_modules/devcert/dist/utils.js:33:5)
    at /Users/todd/src/bankai/node_modules/devcert/dist/index.js:39:21
    at next (native)
    at /Users/todd/src/bankai/node_modules/tslib/tslib.js:96:75
    at Object.__awaiter (/Users/todd/src/bankai/node_modules/tslib/tslib.js:92:16)
    at devcert (/Users/todd/src/bankai/node_modules/devcert/dist/index.js:23:20)
  error: null,
  cmd: 'openssl genrsa -out /Users/todd/.config/devcert/Users/todd/src/bankai/example.js.key 2048',
  file: '/bin/sh',
  args:
   [ '/bin/sh',
     '-c',
     'openssl genrsa -out /Users/todd/.config/devcert/Users/todd/src/bankai/example.js.key 2048' ],

The problem here is that devcert created /Users/todd/.config/devcert but then the key "name" doesn't exist as a path.

@toddself
Copy link
Author

Fixed in #7

@davewasmer
Copy link
Owner

This is fixed in the refactor that has landed in master.

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