When I try my code in my WAMP installation this error is always returned and I can't change this file permission. Can you check if is windows or if its localhost? And disable in this case?
Thanks
You can try this,
$privateKey = new CryptKey('file://path/to/private.key', null, false);
This problem has been fixed from PR #776
Thanks @fuadmuhtaz but I can't disable the check in Laravel Passport plugin.
I changed it in my local vendor package
Make sure you use laravel/passport version ^3.0.1
They already fixed it https://github.com/laravel/passport/pull/454
Thanks! Update solve my problem.
I use "laravel/passport": "~4"
Closing issue as bug has been fixed
Most helpful comment
You can try this,
$privateKey = new CryptKey('file://path/to/private.key', null, false);
This problem has been fixed from PR #776