mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
GitHub rejects new RSA SSH keys smaller than 3072 bits, and phpseclib made 2048-bit keys by default, so new RSA deploy keys from Coolify could not authenticate. Closes #12461 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
523 B
PHP
16 lines
523 B
PHP
<?php
|
|
|
|
use phpseclib3\Crypt\PublicKeyLoader;
|
|
use phpseclib3\Crypt\RSA;
|
|
|
|
it('generates RSA keys that GitHub accepts (at least 3072 bits)', function () {
|
|
$keyPair = generateSSHKey('rsa');
|
|
|
|
$privateKey = PublicKeyLoader::load($keyPair['private']);
|
|
$publicKey = PublicKeyLoader::load($keyPair['public']);
|
|
|
|
expect($privateKey)->toBeInstanceOf(RSA\PrivateKey::class)
|
|
->and($privateKey->getLength())->toBeGreaterThanOrEqual(3072)
|
|
->and($publicKey->getLength())->toBe($privateKey->getLength());
|
|
});
|