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 #708

Merged
merged 5 commits into from
Jul 19, 2022

Conversation

schemburkar
Copy link
Contributor

@schemburkar schemburkar commented Jul 9, 2022

This PR adds additional work based on the excellent work in #706 for Typescript.

Added support for PFX or PKCS12 encoded certificates by auto detecting format using options passed for SSL. No additional parameter needed to detect. This continues the work in #508 that was in older JS format

For using PFX certificates use following parameters
--ssl-cert This is the path to the PFX certificate
--ssl-pass (Optional) This is the path to the password for PFX certificate.

Examples for PFX

serve  --ssl-cert ./cert.pfx --ssl-pass ./password.txt 
serve  --ssl-cert ./cert.pfx 

For PEM (no change)

serve  --ssl-cert ./cert.crt --ssl-key ./certkey.key --ssl-pass ./password.txt

This PR should only be merged after #706.
CC: @leerob @gamemaker1

@leerob
Copy link
Member

leerob commented Jul 12, 2022

Linked PR is now merged 🎉 Want to merge in those changes and let me know when this is ready for review?

Add support for PFX or PKCS12 encoded certificates
@schemburkar
Copy link
Contributor Author

I have rebased the changes based on the recent PR, @leerob you may please review the PR and let me know feedback/changes.

@schemburkar schemburkar deleted the typescript-pfx-support branch July 12, 2022 17:33
@schemburkar schemburkar restored the typescript-pfx-support branch July 12, 2022 17:35
@schemburkar schemburkar reopened this Jul 12, 2022
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.

Would love a test for this – maybe we can add that in follow-up building off #712.

@leerob
Copy link
Member

leerob commented Jul 18, 2022

Testing has now been added!

 Updated cli snapshot due to change in help test, using vitest -u option
@schemburkar
Copy link
Contributor Author

@leerob I have updated the cli test snapshot with updated text. Can I start another PR for adding tests specific for PFX certs? This will help get this PR merged while I work on tests.

Open to suggestions

@leerob leerob merged commit 92fd640 into vercel:main Jul 19, 2022
@schemburkar schemburkar deleted the typescript-pfx-support branch July 19, 2022 03:53
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.

3 participants