rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
8f2528
diff --git a/sshd.c b/sshd.c
8f2528
--- a/sshd.c
8f2528
+++ b/sshd.c
8f2528
@@ -1551,6 +1551,15 @@ main(int ac, char **av)
8f2528
 			continue;
8f2528
 		key = key_load_private(options.host_key_files[i], "", NULL);
8f2528
 		pubkey = key_load_public(options.host_key_files[i], NULL);
8f2528
+
8f2528
+		if ((pubkey != NULL && pubkey->type == KEY_RSA1) ||
8f2528
+		    (key != NULL && key->type == KEY_RSA1)) {
8f2528
+			verbose("Ignoring RSA1 key %s",
8f2528
+			    options.host_key_files[i]);
8f2528
+			key_free(key);
8f2528
+			key_free(pubkey);
8f2528
+			continue;
8f2528
+		}
8f2528
 		if (pubkey == NULL && key != NULL)
8f2528
 			pubkey = key_demote(key);
8f2528
 		sensitive_data.host_keys[i] = key;