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 support for PFX or PKCS12 encoded certificates #580

Closed
wants to merge 11 commits into from

Conversation

schemburkar
Copy link
Contributor

@schemburkar schemburkar commented Feb 26, 2020

Added support for PFX or PKCS12 encoded certificates by providing additional command line parameters

e.g.

$ serve -l 5000 --ssl-cert "cert.pfx" --ssl-pass "password.txt" --ssl-format "pfx"

New Command line options

--ssl-format: Optional format of the SSL/TLS certificate. Supported formats: pem (default) and pfx

When --ssl-format is omitted, the default format (pem) will be used.

Edit: --ssl-pass is supported for both pem and pfx formats.
Edit: Removed --ssl-passphrase in favor of existing --ssl-pass option

@schemburkar
Copy link
Contributor Author

Does anyone from the contributors or maintainers have any comments or help for PR to proceed? I will be glad to assist.

@ghost
Copy link

ghost commented Jul 30, 2020

Actually, I have need of specifying the passphrase even when it's a crt/key combo. This PR doesn't seem to account for that, am I missing something? @schemburkar

@schemburkar
Copy link
Contributor Author

Actually, I have need of specifying the passphrase even when it's a crt/key combo. This PR doesn't seem to account for that, am I missing something? @schemburkar

1a0a60d Addresses your issue and adds support for passphrase even for a cert/key format.

@leerob
Copy link
Member

leerob commented Mar 2, 2021

Is this a common use case? If so, could you add documentation for this?

@schemburkar
Copy link
Contributor Author

Is this a common use case? If so, could you add documentation for this?

@leerob When on Windows, I usually use the default PFX certs for SSL. Before the PR I could not use them with serve, and had to either keep https off or use another formats. Using another format means conversions which adds a step.
With PFX certificate support I can continue to use serve and my certificate easily.

When testing dotnet APIs, usually it needs PFX certs too, so having one format across tools is bonus

Does this answer your question? If not let me know

@schemburkar schemburkar deleted the master branch June 17, 2021 10:51
@schemburkar schemburkar restored the master branch June 17, 2021 10:52
@schemburkar schemburkar reopened this Jun 17, 2021
@dakotaJang
Copy link

I hoping this gets implemented as well.
It would simply some instructions for setting up if I can leverage the .pfx file that gets generated in the dotnet flow.
To avoid confusion i think it might be better to introduce new flags like --ssl-pfx instead of introducing --ssl-format and reusing --ssl-cert for pfx.

@an-dr-eas-k
Copy link

Also like the suggestion of @dakotaJang and anyhow would be glad if it gets merged

@schemburkar
Copy link
Contributor Author

@dakotaJang @an-dr-eas-k would be glad to merge this PR. I'm willing to make further changes like @dakotaJang suggestion. Need the vercel/serve team to give their interest or suggestion here before I make any further changes.

Until there is a plan to get this merged, I have not made any changes or rebased against main branch.

Hope this helps

@an-dr-eas-k
Copy link

an-dr-eas-k commented Oct 5, 2021

also started myself addressing @dakotaJang suggestion, see here https://github.com/an-dr-eas-k/serve

@leerob
Copy link
Member

leerob commented Jul 8, 2022

We are rewriting the project in TypeScript - if you are still interested in contributing, could you open a PR against this branch? #706

Thank you! (Also posting to #673)

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.

None yet

5 participants