Source:
<code>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 { <START> 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())) { <END> 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, ','); } }</code><technical_language>This code interferes a lazy-load feature (see SSHD-860) implemented consumes key types defeating purpose of lazy-load. need figure out a preserve capability</technical_language>

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, ','); } }