Source:
protected String resolveAvailableSignaturesProposal(FactoryManager proposedManager) throws IOException, GeneralSecurityException { ValidateUtils.checkTrue(proposedManager == getFactoryManager(), "Mismatched signatures proposed factory manager"); KeyPairProvider kpp = getKeyPairProvider(); boolean debugEnabled = log.isDebugEnabled(); Set<String> provided = null; try { if (kpp != null) { provided = StreamSupport.stream(kpp.getKeyTypes(this).spliterator(), false) .collect(Collectors.toSet()); HostKeyCertificateProvider hostKeyCertificateProvider = getHostKeyCertificateProvider(); if (hostKeyCertificateProvider != null) { Iterable<OpenSshCertificate> certificates = hostKeyCertificateProvider.loadCertificates(this); for (OpenSshCertificate certificate : certificates) { if (provided.contains(certificate.getRawKeyType())) { provided.add(certificate.getKeyType()); } else { log.info("No private key for provided certificate available. Missing private key type: {}", certificate.getRawKeyType()); } } } } } catch (Error e) { log.warn("resolveAvailableSignaturesProposal({}) failed ({}) to get key types: {}", this, e.getClass().getSimpleName(), e.getMessage()); if (debugEnabled) { log.debug("resolveAvailableSignaturesProposal(" + this + ") fetch key types failure details", e); } throw new RuntimeSshException(e); } Collection<String> available = NamedResource.getNameList(getSignatureFactories()); if ((provided == null) || GenericUtils.isEmpty(available)) { return resolveEmptySignaturesProposal(available, provided); } Collection<String> supported = SignatureFactory.resolveSignatureFactoryNamesProposal(provided, available); if (GenericUtils.isEmpty(supported)) { return resolveEmptySignaturesProposal(available, provided); } else { return GenericUtils.join(supported, ','); } }

Target:
protected String resolveAvailableSignaturesProposal(FactoryManager proposedManager) throws IOException, GeneralSecurityException { ValidateUtils.checkTrue(proposedManager == getFactoryManager(), "Mismatched signatures proposed factory manager"); KeyPairProvider kpp = getKeyPairProvider(); boolean debugEnabled = log.isDebugEnabled(); Set<String> provided = null; try { if (kpp != null) { provided = GenericUtils.stream(kpp.getKeyTypes(this)).collect(Collectors.toSet()); HostKeyCertificateProvider hostKeyCertificateProvider = getHostKeyCertificateProvider(); if (hostKeyCertificateProvider != null) { Iterable<OpenSshCertificate> certificates = hostKeyCertificateProvider.loadCertificates(this); for (OpenSshCertificate certificate : certificates) { if (provided.contains(certificate.getRawKeyType())) { provided.add(certificate.getKeyType()); } else { log.info("No private key for provided certificate available. Missing private key type: {}", certificate.getRawKeyType()); } } } } } catch (Error e) { log.warn("resolveAvailableSignaturesProposal({}) failed ({}) to get key types: {}", this, e.getClass().getSimpleName(), e.getMessage()); if (debugEnabled) { log.warn("resolveAvailableSignaturesProposal(" + this + ") fetch key types failure details", e); } throw new RuntimeSshException(e); } Collection<String> available = NamedResource.getNameList(getSignatureFactories()); if ((provided == null) || GenericUtils.isEmpty(available)) { return resolveEmptySignaturesProposal(available, provided); } Collection<String> supported = SignatureFactory.resolveSignatureFactoryNamesProposal(provided, available); if (GenericUtils.isEmpty(supported)) { return resolveEmptySignaturesProposal(available, provided); } else { return GenericUtils.join(supported, ','); } }