Skip to content

Commit

Permalink
PHP 8.0 compatibility
Browse files Browse the repository at this point in the history
Make verifyPassphrase compatible with PHP 8.0 since openssl_pkey_get_private returns OpenSSLAsymmetricKey instead of resource.
  • Loading branch information
hnategh committed Oct 11, 2021
1 parent 5cc883f commit a969c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Horde/Crypt/Smime.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function verifyPassphrase($private_key, $passphrase)
? openssl_pkey_get_private($private_key)
: openssl_pkey_get_private($private_key, $passphrase);

return is_resource($res);
return ($res !== false);
}

/**
Expand Down

0 comments on commit a969c44

Please sign in to comment.