blob: d36c38f335c947a0711bf54d9a25a0b580dae9d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* Copyright (C) 2024 Thomas Wolf <twolf@apache.org> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.internal.transport.sshd;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.apache.sshd.client.config.hosts.KnownHostEntry;
import org.apache.sshd.common.config.keys.AuthorizedKeyEntry;
import org.junit.Test;
public class KnownHostEntryReaderTest {
@Test
public void testUnsupportedHostKeyLine() {
KnownHostEntry entry = KnownHostEntryReader.parseHostEntry(
"[localhost]:2222 ssh-unknown AAAAC3NzaC1lZDI1NTE5AAAAIPu6ntmyfSOkqLl3qPxD5XxwW7OONwwSG3KO+TGn+PFu");
AuthorizedKeyEntry keyEntry = entry.getKeyEntry();
assertNotNull(keyEntry);
assertEquals("ssh-unknown", keyEntry.getKeyType());
}
}
|