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

Add passphrase support #437

Closed

Conversation

kiranghule
Copy link

@kiranghule kiranghule commented Mar 24, 2018

Added support for providing passphrase to decrypt private key

Fixes #162

@kiranghule kiranghule changed the title Feat passphrase support Add passphrase support Mar 24, 2018
@BigBlueHat
Copy link
Member

What's the use case for this? It seems unwise to provide a passphrase in clear text on the command line. Happy to hear more, though.

@kiranghule
Copy link
Author

kiranghule commented Jul 12, 2018

@BigBlueHat Reason is that if a cert file requires a passphrase for decryption, there is no way to provide that. I stumbled onto this issue in a project when we moved to https. Hence created PR. There was also an issue created for this. #162

@BigBlueHat
Copy link
Member

Thanks @kiranghule. Guess I'm just hesitant to encourage passphrases exposed on the command line. Perhaps an environment variable (if present) could be used for this scenario? Certainly Heroku (and friends) would store those in a safer place than in a clear text command line request.

💭's?

@kiranghule
Copy link
Author

@BigBlueHat Agreed. It's better to get this from an environment variable. Will look into it.

@thornjad
Copy link
Member

@kiranghule are you still interested in moving forward with this PR?

@kiranghule
Copy link
Author

@kiranghule are you still interested in moving forward with this PR?

Will look into this, this weekend. The last conclusion I guess was to pass the passphrase via the env variable. But I have some doubts regarding how to go about it. Any help would be appreciated. Thanks.

@thisIsTheFoxe
Copy link

Hey, great idea..

but does that even work? Because for me it didn't.. just as @thornjad mentioned in #456, bc union ignores the passphrase anyway..


In our use case we would start the server manually each time, so I think passing the passphrase via CLI should at least be possible.
However, the use of env vars would be pretty straightforward, wouldn't it? Similar to NODE_HTTP_SERVER_PASSWORD

@@ -59,6 +59,8 @@ This will install `http-server` globally so that it may be run from the command

`-K` or `--key` Path to ssl key file (default: key.pem).

`-P` or `--passphrase` Pass phrase to decrypt the key (optional).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to conflict with the option -P / --proxy

@thornjad
Copy link
Member

Closing in favor of the more complete and active #746

@thornjad thornjad closed this Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support PEM passphrase for HTTPS
5 participants