7

I'm starting to use this library https://github.com/lexik/LexikJWTAuthenticationBundle When I use the command php bin/console lexik:jwt:generate-keypair, the console shows this error

In GenerateKeyPairCommand.php line 151:

error:02001003:system library:fopen:No such process

I have Symfony 5 with PHP 7.1 and Openssl is running.

Dhia Djobbi
  • 1,176
  • 2
  • 15
  • 35
Turquito
  • 97
  • 1
  • 1
  • 5

3 Answers3

15

You can override this command by manual action like in oldest version:

mkdir -p config/jwt
openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096
openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout

Try this.

Astro-Otter
  • 736
  • 1
  • 10
  • 22
2

just go to tags then go to the previous version where you will get these commend lines

$ mkdir -p app/var/jwt

$ openssl genrsa -out app/var/jwt/private.pem -aes256 4096

$ openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem

You can update the directories as you see fits, and as you already know it's always better to not commit those generated keys to your repository.

Zache Leto
  • 31
  • 1
  • 2
1

I had the same problem, in my case I just needed to install OpenSSL and reboot my pc and it worked.