You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/04/26 13:49:24 UTC

[GitHub] [camel] grgrzybek commented on a change in pull request #5467: [CAMEL-16554] Add support for private keys with OPENSSH PRIVATE KEY header

grgrzybek commented on a change in pull request #5467:
URL: https://github.com/apache/camel/pull/5467#discussion_r620314559



##########
File path: components/camel-ssh/src/main/java/org/apache/camel/component/ssh/ResourceHelperKeyPairProvider.java
##########
@@ -126,6 +128,36 @@ public void setPasswordFinder(Supplier<char[]> passwordFinder) {
             InputStreamReader isr = null;
             InputStream is = null;
             try {
+                is = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext, resource);

Review comment:
       This is the same line as for "normal" path, where `is` is closed using `IoUtils.closeQuietly(r, is, isr)` in finally block.
   `org.apache.sshd.common.util.security.SecurityUtils#loadKeyPairIdentities()` consumes the stream, so there are two such lines.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org