fabacab / wp-pgp-encrypted-emails

:closed_lock_with_key: :e-mail: Encrypts WordPress emails using OpenPGP or S/MIME with a familiar API.
https://wordpress.org/plugins/wp-pgp-encrypted-emails/
GNU General Public License v3.0
39 stars 10 forks source link

PHP 8 openssl API changes are not handled #45

Closed budrick closed 2 years ago

budrick commented 2 years ago

Beginning in PHP 8.0, openssl_* functions return or expect an object of class OpenSSLCertificate rather than resource of type OpenSSL X.509. The S/MIME support class does not as yet adhere to the new contract, and specifically only checks the resource type.

The end result is that valid, present S/MIME certificates are erroneously thought to be either invalid or not present when running with PHP 8.0.

I will submit a PR shortly to fix this, since it's a simple addition to the validation check in class-wp-smime.php.