You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Siano, Stephan" <st...@sap.com> on 2013/07/01 12:29:30 UTC

RE: camel sftp privateKeyFile - load from classpath

Hi,

I have created another issue that contains an extension (including patch) which makes it possible to use a Java KeyPair instead of an OpenSSH private key file:
https://issues.apache.org/jira/browse/CAMEL-6502

I have also looked into the jsch HostKeyRepository thing, but that interface is a bit nasty and I have no good idea how to map this into anything else than a known_hosts file, so I have left this out for now.

Best regards
Stephan

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Freitag, 21. Juni 2013 13:36
To: users@camel.apache.org
Subject: Re: camel sftp privateKeyFile - load from classpath

Hi

Yeah if sftp accepts an InputStream for the private key file, then we
can use the resource loader abstraction to load it from classpath and
file systems.

See: org.apache.camel.util.ResourceHelper#resolveMandatoryResourceAsInputStream

This is what we do in other components.

This will help with this use-case.


If there is a demand for implementing custom jsch interfaces, then we
can take a look at that also. But I think being able to load the key
files from classpath is a good idea to get sorted first.