mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
VPN/IPSEC/Key Pairs - fix RSA keypair generation, closes https://github.com/opnsense/core/issues/6638
This commit is contained in:
parent
1a869f6cfd
commit
c5580da6c9
@ -129,7 +129,7 @@ class KeyPairsController extends ApiMutableModelControllerBase
|
||||
return ['status' => 'failed', 'message' => sprintf('invalid key size %s', $size)];
|
||||
}
|
||||
$attrs['private_key_type'] = OPENSSL_KEYTYPE_RSA;
|
||||
$attrs['private_key_bits'] = !empty($size) ? $size : 2048;
|
||||
$attrs['private_key_bits'] = !empty($size) ? intval($size) : 2048;
|
||||
} elseif ($type == 'ecdsa') {
|
||||
if (!empty($size) && !in_array($size, ['256', '384', '521'])) {
|
||||
return ['status' => 'failed', 'message' => sprintf('invalid key size %s', $size)];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user