Do not import Ed25519 keys in FIPS Mode

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
Jakub Jelen
2024-12-26 16:12:24 +01:00
parent a089513e40
commit de7903a633

View File

@@ -1340,6 +1340,12 @@ int pki_import_privkey_buffer(enum ssh_keytypes_e type,
{
ssh_string pubkey = NULL, privkey = NULL;
if (ssh_fips_mode()) {
SSH_LOG(SSH_LOG_TRACE,
"Ed25519 keys not supported in FIPS mode");
goto fail;
}
rc = ssh_buffer_unpack(buffer, "SS", &pubkey, &privkey);
if (rc != SSH_OK){
SSH_LOG(SSH_LOG_TRACE, "Unpack error");