-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Upgrade from PHP 8.1.18 to 8.1.21 unexpected error with p12 certifcate #131
Comments
Hi there - this might be related to #124 Do you have the latest version of the library? |
Thx locally I could fix it this way: https://stackoverflow.com/questions/73832854/php-openssl-pkcs12-read-error0308010cdigital-envelope-routinesunsupported Do I understand this correctly that the provided certificate from Apple need to change here something not build on top of legacy hashes? |
I think it's more about PHP not supporting that legacy mode of OpenSSL yet. The workaround in #124 aims to execute the |
Okay 🤔 but if I understand correctly there is no way creating the Certificate without requiring php pkpass legacy openssl or does it depend on which openssl version the creator of the Certificate file did use? |
No indeed, legacy mode needs to be used. There are two ways to do that:
|
Thx for the clarification 👍 |
Afternoon guys and gals, this saved the day for me - I was editing the wrong file on my macos and the first step in this doc showed me the correct file to update. Once updated and restarted my mbp hey presto everything worked! This is a permanent change to OpenSSL. I've since implemented the exact same fix on my staging box and all works well. https://www.practicalnetworking.net/practical-tls/openssl-3-and-legacy-providers/ Posting here in the hope it will help others! Thanks for the package btw. |
There may be no need to configure OpenSSL to use legacy algorithms. It's easier and more portable just to convert the encrypted certificates file. The steps below use a
openssl pkcs12 -in apple_wallet.p12 -out temp.pem -nodes -legacy
openssl pkcs12 -export -in temp.pem -out new.p12 -certpbe AES-256-CBC -keypbe AES-256-CBC -iter 2048
mv apple_wallet.p12 apple_wallet_legacy.p12
mv new.p12 apple_wallet.p12 I just tested this with our app and the certificate works fine now with OpenSSL v3.2.2 without having to enable legacy functions. |
Expected Behavior
I'm not sure why this happening but after I updated my local dependencies this includes [email protected] and I also think the linked openssl library the package is is not longer running.
Actual Behavior
It fails with: Exception:
Steps to Reproduce the Problem
When the docker PHP Image is based on
php:8.1.18-cli
it works but if it is based onphp:8.1.21-cli
it fails for me and also in our Gitlab Runner.But it is not directly connected to changes in
8.1.18
->8.1.21
because if I rebuild locally viabrew
fromsource
8.1.18
it also fails now on 8.1.18, So maybe more changes in the openssl extension or openssl itself, or maybe somebody here have a hint what lib could produce this issue.The text was updated successfully, but these errors were encountered: