summaryrefslogtreecommitdiff
path: root/src/migration-scripts/ssh
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@mandelbit.com>2026-09-15 11:15:59 +0200
committerAntonio Quartulli <antonio@mandelbit.com>2026-09-27 20:02:14 +0200
commit609b8d4d8008729af2478029b8e25ae4359ad56b (patch)
treeaf1e269dcaadb0c79201debb0a2208bd09ec46d1 /src/migration-scripts/ssh
parent41f7da6633d3270468027ab387e3bfbcab4157c6 (diff)
downloadvyos-1x-609b8d4d8008729af2478029b8e25ae4359ad56b.tar.gz
vyos-1x-609b8d4d8008729af2478029b8e25ae4359ad56b.zip
pki: T9323: give elliptic curve keys their own constructor
create_private_key() took one "size" for every key type, but the number means entirely different things per type: for RSA and DSA it is a modulus size, for EC it selects a curve. CodeQL is not path sensitive across the key_type comparison, so it follows the 256 an EC caller passes into the RSA and DSA branches that caller can never reach, and reports pki.py as generating 256 bit RSA and DSA keys. Build elliptic curve keys in create_ec_private_key() instead and route the op mode generator and the OpenVPN smoketest there, so no curve size ever enters the function that also builds RSA and DSA keys. create_private_key() now refuses a key type it does not build rather than returning None, so a caller cannot drift back into the old shape unnoticed.
Diffstat (limited to 'src/migration-scripts/ssh')
0 files changed, 0 insertions, 0 deletions