-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use modern algorithm when generating p12 file. Fixes: #4 #7
Conversation
- Replaces pkcs12.Encode call with pkcs12.Modern.Encode - Replaces deprecated pkcs12.ToPEM with pkcs12.DecodeChain
@fabpot LGTM (but can't test it at the moment) |
Yes It fixes #4. I forgot to add it to title.
Thanks for taking a look. If it helps, here how I tested it. In Output from system one (installed via apt).
Output from my one.
Check the openssl output of line "PKCS7 Encrypted data:". Also node server fails vs successfully starts https. |
I've released a new version of Symfony CLI, can you double-check that it works well for you? |
@fabpot Yes, I just upgraded via apt. The new version is generating the modern p12 file :) |
Maybe we need some docs about how to upgrade an existing p12? |
Yes, there's already a note at |
Let's update the recommendation to use the latest CLI version and remove the old p12 file. Can you submit a PR there? Thank you for your help on this topic. |
Yes I opened a PR in docs repo. symfony/symfony-docs#19369 |
…y-cli for node.js 17+ tls compatibility (sarim) This PR was merged into the 5.4 branch. Discussion ---------- [Encore] Update note instructing users to upgrade symfony-cli for node.js 17+ tls compatibility This note telling users to use `--openssl-legacy-provider` flag is no longer needed with certificate generated by latest symfony-cli. Context: symfony-cli/cert#4 symfony-cli/cert#7 symfony/webpack-encore#1187 Commits ------- dd092c7 [Encore] Update note instructing users to upgrade symfony-cli for node.js 17+ tls compatibility
I updated the code to use the new modern encoder made available in SSLMate/go-pkcs12#48
Previously symfony-cli was using old algorithm, newer nodejs does not support that. It was causing webpack encore (and vite too) to fail if symfony's pfx was used. Main issue: symfony/webpack-encore#1187
After this is merged and a new version is tagged I can open another PR in https://github.com/symfony-cli/symfony-cli to use new version and also update symfony doc to no longer need workaround
NODE_OPTIONS=--openssl-legacy-provider