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:42:46 UTC

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

grgrzybek opened a new pull request #5467:
URL: https://github.com/apache/camel/pull/5467


   
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #5467:
URL: https://github.com/apache/camel/pull/5467#discussion_r620311158



##########
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:
       LGTM to me, I would use a try-with-resource here nevertheless




-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #5467:
URL: https://github.com/apache/camel/pull/5467#discussion_r620315927



##########
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:
       Ah yeah, didn't notice that. All good then. Merge if you want.




-- 
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



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

Posted by GitBox <gi...@apache.org>.
grgrzybek commented on pull request #5467:
URL: https://github.com/apache/camel/pull/5467#issuecomment-826881586


   The checks have passed. Merging.


-- 
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



[GitHub] [camel] grgrzybek merged pull request #5467: [CAMEL-16554] Add support for private keys with OPENSSH PRIVATE KEY header

Posted by GitBox <gi...@apache.org>.
grgrzybek merged pull request #5467:
URL: https://github.com/apache/camel/pull/5467


   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
grgrzybek commented on a change in pull request #5467:
URL: https://github.com/apache/camel/pull/5467#discussion_r620316771



##########
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:
       let's wait for CI.




-- 
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