forrest
forrest copied to clipboard
Supplied key param cannot be coerced into a private key
Hi, I have created the .key and .crt files using the command:
openssl req -newkey rsa:2048 -nodes -keyout Area_Check.key -x509 -days 365 -out Area_Check.crt
last night everything worked fine when doing Forrest:login(); there was no problem, however, today, now I get this error
ErrorException openssl_sign(): Supplied key param cannot be coerced into a private key
this is my privateKey
'privateKey' => file_get_contents('Area_Check.key'),
the Area_Check.key file is located on the root of my project (for example at the same level as the .env file)
what could have been the problem?
Hi @andrecuellar, this sounds like there is an issue with the private key string. Are you sure that is the correct path for Area_Check.key?
You can also try copy/pasting the content of the private key directly into that property:
'privateKey' => '-----BEGIN PRIVATE KEY-----
xxxxxYouKeyxxxxxx
-----END PRIVATE KEY-----',