Following the documentation for Laravel 5.6, I tried to run php artisan passport:install, but an error occurred:
openssl_pkey_new(): private key length is too short; it needs to be at least 384 bits, not 0
at /var/www/core-application/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php:560
556| $config = array();
557| if (isset($this->configFile)) {
558| $config['config'] = $this->configFile;
559| }
560| $rsa = openssl_pkey_new(array('private_key_bits' => $bits) + $config);
561| openssl_pkey_export($rsa, $privatekey, null, $config);
562| $publickey = openssl_pkey_get_details($rsa);
563| $publickey = $publickey['key'];
564|
Exception trace:
1 openssl_pkey_new(["4096", "/var/www/core-application/vendor/phpseclib/phpseclib/phpseclib/Crypt/../openssl.cnf"])
/var/www/core-application/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php:560
2 phpseclib\Crypt\RSA::createKey("4096")
/var/www/core-application/vendor/laravel/passport/src/Console/KeysCommand.php:35
Seems to be a problem with the latest release (6.0.4). Using passport 6.0.3 instead fixed the issue for me.
Following the documentation for Laravel 5.6, I tried to run php artisan passport:install, but an error occurred:
openssl_pkey_new(): private key length is too short; it needs to be at least 384 bits, not 0
at /var/www/core-application/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php:560
556| $config = array();
557| if (isset($this->configFile)) {
558| $config['config'] = $this->configFile;
559| }
560| $rsa = openssl_pkey_new(array('private_key_bits' => $bits) + $config);
561| openssl_pkey_export($rsa, $privatekey, null, $config);
562| $publickey = openssl_pkey_get_details($rsa);
563| $publickey = $publickey['key'];
564|
Exception trace:
1 openssl_pkey_new(["4096", "/var/www/core-application/vendor/phpseclib/phpseclib/phpseclib/Crypt/../openssl.cnf"])
/var/www/core-application/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php:560
2 phpseclib\Crypt\RSA::createKey("4096")
/var/www/core-application/vendor/laravel/passport/src/Console/KeysCommand.php:35
Seems to be a problem with the latest release (6.0.4). Using passport 6.0.3 instead fixed the issue for me.