use of com.google.gerrit.common.data.SshHostKey in project gerrit by GerritCodeReview.
the class SystemInfoServiceImpl method daemonHostKeys.
@Override
public void daemonHostKeys(final AsyncCallback<List<SshHostKey>> callback) {
final ArrayList<SshHostKey> r = new ArrayList<>(hostKeys.size());
for (final HostKey hk : hostKeys) {
String host = hk.getHost();
if (host.startsWith("*:")) {
final String port = host.substring(2);
host = "[" + httpRequest.get().getServerName() + "]:" + port;
}
final String fp = hk.getFingerPrint(JSCH);
r.add(new SshHostKey(host, hk.getType() + " " + hk.getKey(), fp));
}
callback.onSuccess(r);
}
Aggregations