tschoffelen / php-pkpass

💳 PHP class for creating passes for Wallet on iOS.
https://includable.com
MIT License
901 stars 185 forks source link

Solution for P12 reading issue in newer OpenSSL #124

Closed tschoffelen closed 1 year ago

tschoffelen commented 1 year ago

Scope

Adds an alternative method to read P12 files for installations with newer OpenSSL versions, where using the built-in PHP function openssl_pkcs12_read() fails.

This new method relies on invoking openssl using shell_exec, which also won't work for everyone, but hopefully increases the number of users for which this will work out of the box.

Notes

Also added a basic PHPUnit test, which runs in GitHub Actions on multiple PHP versions, and both with the OpenSSL legacy patch enabled and disabled to ensure future compatibility.

Related issues

Fixes #112