Daanra / laravel-lets-encrypt

Let's Encrypt wrapper for Laravel
MIT License
206 stars 28 forks source link

Fail to generate a KeyPair with the given options #1

Closed mohamm6d closed 3 years ago

mohamm6d commented 3 years ago

After installing the library, it gives this error on local! not tested on staging yet. AcmePhp\Ssl\Exception\KeyPairGenerationException Fail to generate a KeyPair with the given options

\vendor\acmephp\ssl\Generator\KeyPairGenerator.php:68

Daanra commented 3 years ago

Hey,

Thank you for your report.

I'm guessing if you run this line of code:

(new \AcmePhp\Ssl\Generator\KeyPairGenerator())->generateKeyPair();

you get the same error.

Maybe you haven't installed OpenSSL?

If you have, you can find the underlying error by doing something along the lines of:

(new AcmePhp\Ssl\Generator\RsaKey\RsaKeyGenerator())->generatePrivateKey(new \AcmePhp\Ssl\Generator\RsaKey\RsaKeyOption());

This line should throw another exception with a more elaborate error message.

mohamm6d commented 3 years ago

Yes, you are right. need to setup openssl on local. Works perfectly on production however verification process needs some improvements :)