New install - openssl_pkey_new(): Private key length must be at least 384 bits, configured to 0

I am building a new LNMS instance from scratch on Ubuntu 22.0.4.3. When I get to the point of installing php dependencies, I receive the following error:

> LibreNMS\ComposerHelper::postInstall
Script LibreNMS\ComposerHelper::postInstall handling the post-install-cmd event terminated with an exception

In ECKey.php line 93:

  openssl_pkey_new(): Private key length must be at least 384 bits, configured to 0


w/–vvv

Environment:

  1. Ubuntu 22.0.4.3 LTS (VMware if it matters)
  2. OpenSSL 3.0.2
  3. PHP 8.1.23
  4. Python 3.10.12
  5. MariaDB 10.6

To replicate:

  1. Install Ubuntu 22.04.3
  2. apt update/upgrade & reboot
  3. Follow lnms installation instructions to the point of installing PHP dependencies
  4. Run ./scripts/composer_wrapper.php install --no-dev
  5. Error

I’ve replicated the issue on Debian 12: PHP 8.2.10, OpenSSL 3.0.9, python3 3.11.2, mariadb 10.11.3-1

Any ideas?

1 Like

While transferring the previous host’s SSL certs/key, I accidentally overwrote the default openssl.cnf file with a cnf that was intended for csr only. I restored the default deb/ubuntu /etc/ssl/openssl.cnf and all is good. :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.