namshi / jose

JSON Object Signing and Encryption library for PHP.
MIT License
1.8k stars 133 forks source link

ECDSA, phpseclib and PHP7: what is the current status? #118

Open matrey opened 7 years ago

matrey commented 7 years ago

Hi

I tried using ES512 but got the following error:

Fatal error: Uncaught InvalidArgumentException: phpseclib 1.0.0(LTS), even the latest 2.0.0, doesn't support PHP7 yet in /.../vendor/namshi/jose/src/Namshi/JOSE/Signer/OpenSSL/ECDSA.php:15

But phpseclib seems to be alright these days with PHP 7 (their builds pass on PHP 7 and 7.1, see https://travis-ci.org/phpseclib/phpseclib)

If I comment out the 2 version check blocks in Signer/OpenSSL/ECDSA.php then it seems to be working OK.

Is the block for PHP 7 still justified? If yes, could it at least be made more explicit in the README of this project? Also, would it be possible to emphasize the need to require phpseclib for ECSDA support in the same README?

Thanks

travisfisher commented 7 years ago

I'm having the same issue on PHP 7 and agree with @matrey that it seems to make sense to remove this block.

GrahamCampbell commented 7 years ago

I use phpseclib 2.0 on PHP 7.1 without issues.

darrynten commented 5 years ago

This is still an issue for me

Spomky commented 5 years ago

https://github.com/namshi/jose#deprecation-notice