Re: [vfs] FTPS

2012-04-02 Thread Gary Gregory
Did you figure this out?

Gary

On Wed, Mar 21, 2012 at 9:25 AM, Jose Juan Montiel 
josejuan.mont...@gmail.com wrote:

 Hi,

 i'm trying to use VFS to connect to VSFTP server with FTPS (Explict)
 with a sample cert.

 If i follow sample use... finally i receive a 522 Data connections
 must be encrypted.

 If i use sample FTPS cliente with commons-net i receive same message, but
 with

 ftps = new FTPSClient(protocol);
 ...
 ftps.execPROT(P);

 solve, seem like this force ssl traffic.

 How can i do this with VFS, any idea?

 PD: VFS code is like this...

FileSystemManager mgr = VFS.getManager();
FileSystemOptions opts = new FileSystemOptions();
FtpsFileSystemConfigBuilder ffscb =
 FtpsFileSystemConfigBuilder.getInstance();
ffscb.setPassiveMode(opts, true);
ffscb.setFtpsType(opts,explicit);
...
FileObject sourceFile = mgr.resolveFile(args[0]);
String urlConn = getUrlWithOutCredentials(args[2]);
... urlConn is ftps:/
FileObject destinationFile =
 mgr.resolveFile(urlConn+args[1], opts);

 Thanks in advance.

 --
 This is your badness level.
 It's unusually high for someone your size.
 We have to fix that.

 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org




-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
JUnit in Action, 2nd Ed: http://goog_1249600977http://bit.ly/ECvg0
Spring Batch in Action: http://s.apache.org/HOqhttp://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


getservbyname

2012-04-02 Thread Jörg Schaible
Guys,

do we have somewhere an equivalent for the C system call getservbyname in 
commons?

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: getservbyname

2012-04-02 Thread Emmanuel Bourg

Le 02/04/2012 16:41, Jörg Schaible a écrit :


do we have somewhere an equivalent for the C system call getservbyname in
commons?


You mean something that map a service name (http, ssh) to a port number 
(80, 22) ?


Emmanuel Bourg



smime.p7s
Description: S/MIME Cryptographic Signature


Re: getservbyname

2012-04-02 Thread Jörg Schaible
Hi Emmanuel,

Emmanuel Bourg wrote:

 Le 02/04/2012 16:41, Jörg Schaible a écrit :
 
 do we have somewhere an equivalent for the C system call getservbyname in
 commons?
 
 You mean something that map a service name (http, ssh) to a port number
 (80, 22) ?

Right. Best would be a system call, but I can also live with some 
functionality that parses the etc/services in Linux/Windows directly. For 
support in the Java runtime I only found a 15 year old enhancement request 
in Oracles Bugzilla ... :-/

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: getservbyname

2012-04-02 Thread sebb
On 2 April 2012 17:13, Jörg Schaible joerg.schai...@gmx.de wrote:
 Hi Emmanuel,

 Emmanuel Bourg wrote:

 Le 02/04/2012 16:41, Jörg Schaible a écrit :

 do we have somewhere an equivalent for the C system call getservbyname in
 commons?

 You mean something that map a service name (http, ssh) to a port number
 (80, 22) ?

 Right. Best would be a system call, but I can also live with some
 functionality that parses the etc/services in Linux/Windows directly. For
 support in the Java runtime I only found a 15 year old enhancement request
 in Oracles Bugzilla ... :-/

It looks as though Tomcat Native has access to the C routine via JNI,
but it would be nice to have a pure Java implementation.

Sounds like a suitable enhancement for Commons NET?

 - Jörg


 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: getservbyname

2012-04-02 Thread Emmanuel Bourg

Le 02/04/2012 18:13, Jörg Schaible a écrit :


Right. Best would be a system call, but I can also live with some
functionality that parses the etc/services in Linux/Windows directly. For
support in the Java runtime I only found a 15 year old enhancement request
in Oracles Bugzilla ... :-/


It should be easy to do this in a platform independent manner by parsing 
the IANA port database:


http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml

That's the authoritative source for port names.

Emmanuel Bourg



smime.p7s
Description: S/MIME Cryptographic Signature


Re: getservbyname

2012-04-02 Thread Jörg Schaible
Hi Emmanual,

Emmanuel Bourg wrote:

 Le 02/04/2012 18:13, Jörg Schaible a écrit :
 
 Right. Best would be a system call, but I can also live with some
 functionality that parses the etc/services in Linux/Windows directly. For
 support in the Java runtime I only found a 15 year old enhancement
 request in Oracles Bugzilla ... :-/
 
 It should be easy to do this in a platform independent manner by parsing
 the IANA port database:
 
 http://www.iana.org/assignments/service-names-port-numbers/service-names-
port-numbers.xml
 
 That's the authoritative source for port names.

This is useless, you will need the current settings of the system. It is not 
uncommon in large companies to modify the official mappings, remove 
unwanted or add private ones.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org