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

HTTPS: Adding Ability to Send Passphrase to createServer #655

Merged
merged 2 commits into from
Jun 11, 2021

Conversation

wilbert-abreu
Copy link
Contributor

@wilbert-abreu wilbert-abreu commented May 27, 2021

Purpose
Adds ability to pass though an optional passphrase option for the ssl cert via a --ssl-pass param to https.createServer.

https.createServer({
   key: fs.readFileSync(args['--ssl-key']),
   cert: fs.readFileSync(args['--ssl-cert']),
   passphrase: sslPass ? fs.readFileSync(sslPass) : ''
}

@wilbert-abreu
Copy link
Contributor Author

@leerob can you take a look at this when you can? Pretty small change, but will help in certain instances. thanks!

@leerob
Copy link
Member

leerob commented May 27, 2021

Is there an open issue or more info anywhere? Why is this needed? Coming in completely blind 😄

@wilbert-abreu
Copy link
Contributor Author

wilbert-abreu commented May 27, 2021

ah my bad, let me know if you'd like me to open one. In general, I wanted to be able to use this within American express, but I need to be able to pass a certification authority and passphrase to the https options in order to use this, so thought I'd create a PR for it.

@wilbert-abreu
Copy link
Contributor Author

@leerob Anything I can do to help here?

@leerob
Copy link
Member

leerob commented Jun 8, 2021

Could you share a little bit more on the why? How does this work - the flags are forwarded? Are there any tests needed here?

@wilbert-abreu wilbert-abreu changed the title HTTPS: Adding Certificate Authority and Passphrase Params HTTPS: Adding Ability to Passthrough Passphrase to createServer Jun 11, 2021
@wilbert-abreu wilbert-abreu changed the title HTTPS: Adding Ability to Passthrough Passphrase to createServer HTTPS: Adding Ability to Send Passphrase to createServer Jun 11, 2021
@wilbert-abreu
Copy link
Contributor Author

@leerob Added more details to the description.

Removed the certificate authority portion, just kept it to passphrase and made it optional, so nothing will be affected if it's not passed. Don't see any test in this repo, but, as it's optional now, don't think it's necessary.

Let me know!

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

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

Amazing, thank you!

@wilbert-abreu
Copy link
Contributor Author

Thanks @leerob! Any chance you can merge?

@leerob leerob merged commit e3f1e84 into vercel:main Jun 11, 2021
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

Successfully merging this pull request may close these issues.

2 participants