openssl_pkey_new always return false with alpine 3.17

207 Views Asked by At

I'm trying to move from Alpine 3.16 to 3.17 which comes with a breaking change of OpenSSL from v1.1.1 to v3.x.

This method openssl_pkey_new always fails on Alpine 3.17 and is not able to apply key generation probably.

error:0480006C:PEM routines::no start line<br />
error:0200008A:rsa routines::invalid padding<br />
error:02000072:rsa routines::padding check failed<br />
error:1C880004:Provider routines::RSA lib<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:0480006C:PEM routines::no start line<br />
error:05000072:dsa routines::bad ffc parameters<br />

It looks like there is a need for valid openssl.cnf according to PHP documentation but can't find any valid example.

Env:

  • Alpine 3.17
  • OpenSSL 3.0.8
  • PHP 8.1

Did someone face a similar issue and could guide me?

Thanks :)

0

There are 0 best solutions below