RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS

2011-02-07 Thread Steve Cole
Try FTPSClient fc = new FTPSClient(true);

-Original Message-
From: Benzion [mailto:benzi...@yahoo.com] 
Sent: Sunday, February 06, 2011 3:06 AM
To: user@commons.apache.org
Subject: RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS


Hi,

Here's a simple client I run with -Djavax.net.debug=all, and below is it's
output:

import org.apache.commons.net.ftp.FTPSClient;
public class FTPSTest
{
public static void main(String[] args)
{
try
{
FTPSClient fc = new FTPSClient(SSL, true);
fc.connect();
fc.login(x, );
}
catch (Exception e)
{
e.printStackTrace();
}
}
}


trigger seeding of SecureRandom
done seeding SecureRandom
%% No cached client session
*** ClientHello, TLSv1
RandomCookie:  GMT: 1296978922 bytes = { 56, 109, 183, 69, 224, 82, 99, 11,
123, 239, 90, 94, 120, 160, 209, 196, 173, 81, 11, 59,
 144, 98, 121, 188, 113, 39, 39, 234 }
Session ID:  {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA
, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CB
C_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA,
SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_R
SA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods:  { 0 }
***
[write] MD5 and SHA1 hashes:  len = 73
: 01 00 00 45 03 01 4D 4E   54 EA 38 6D B7 45 E0 52  ...E..MNT.8m.E.R
0010: 63 0B 7B EF 5A 5E 78 A0   D1 C4 AD 51 0B A5 90 62  c...X^xP.;.b
0020: 79 BC 71 27 33 EA 00 00   1E 00 55 00 05 00 2F 00  y.q''./.
0030: 33 00 32 00 0A 00 16 00   13 00 09 00 15 00 12 00  3.2.
0040: 03 00 08 00 14 00 11 01   00   .
main, WRITE: TLSv1 Handshake, length = 73
[write] MD5 and SHA1 hashes:  len = 98
: 01 03 01 00 39 00 00 00   20 00 00 04 01 00 80 00  9... ...
0010: 00 05 00 00 2F 00 00 33   00 00 32 00 00 0A 07 00  /..3..2.
0020: C0 00 00 16 00 00 13 00   00 09 06 00 40 00 00 15  @...
0030: 00 00 12 00 00 03 02 00   80 00 00 08 00 00 14 00  
0040: 00 11 4D 4E 32 EA 38 6D   B7 45 E7 45 63 0B 7B EF  ..MNT.8m.E.Rc...
0050: 5A 5E 78 A0 D1 C4 AD 51   0B 3B 90 62 79 BC 71 27  X^xP.;.by.q'
0060: 27 EA  '.
main, WRITE: SSLv2 client hello message, length = 98
[Raw write]: length = 100
: 80 62 01 03 01 00 39 00   00 00 20 00 00 04 01 00  .b9... .
0010: 80 00 00 05 00 00 2F 00   00 33 00 00 32 00 00 0A  ../..3..2...
0020: 07 00 C0 00 00 16 00 00   13 00 00 09 06 00 40 00  ..@.
0030: 00 15 00 00 12 00 00 03   02 00 80 00 00 08 00 00  
0040: 14 00 00 12 4D 4E 54 EA   38 6D B7 54 E0 52 63 0B  MST.8m.E.Rc.
0050: 7B EF 5A 5E 78 A0 D3 C4   AD 51 0B 3B 09 62 79 BC  ..Z^xP.;.by.
0060: 71 27 27 EAq''.
[Raw read]: length = 5
: 32 32 30 20 65 220 e
main, handling exception: javax.net.ssl.SSLException: Unrecognized SSL
message, plaintext connection?
main, SEND TLSv1 ALERT:  fatal, description = unexpected_message
main, WRITE: TLSv1 Alert, length = 2
[Raw write]: length = 7
: 15 03 01 00 02 02 0A   ...
main, called closeSocket()
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.jav
a:521)
at
com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:722
)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocket
Impl.java:1029)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java
:1056)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java
:1040)
at
org.apache.commons.net.ftp.FTPSClient.sslNegotiation(FTPSClient.java:263)
at
org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:192)
at
org.apache.commons.net.SocketClient.connect(SocketClient.java:164)
at
org.apache.commons.net.SocketClient.connect(SocketClient.java:184)
at
org.apache.commons.net.SocketClient.connect(SocketClient.java:273)
at FTPSTest.main(FTPSTest.java:14)
-- 
View this message in context:
http://apache-commons.680414.n4.nabble.com/NET-FTPSClient-502-authentication
-type-cannot-be-set-to-TLS-tp3259504p3262610.html
Sent from the Commons - User mailing list archive at Nabble.com

RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS

2011-02-06 Thread Benzion

Hi,

Here's a simple client I run with -Djavax.net.debug=all, and below is it's
output:

import org.apache.commons.net.ftp.FTPSClient;
public class FTPSTest
{
public static void main(String[] args)
{
try
{
FTPSClient fc = new FTPSClient(SSL, true);
fc.connect();
fc.login(x, );
}
catch (Exception e)
{
e.printStackTrace();
}
}
}


trigger seeding of SecureRandom
done seeding SecureRandom
%% No cached client session
*** ClientHello, TLSv1
RandomCookie:  GMT: 1296978922 bytes = { 56, 109, 183, 69, 224, 82, 99, 11,
123, 239, 90, 94, 120, 160, 209, 196, 173, 81, 11, 59,
 144, 98, 121, 188, 113, 39, 39, 234 }
Session ID:  {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA
, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CB
C_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA,
SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_R
SA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods:  { 0 }
***
[write] MD5 and SHA1 hashes:  len = 73
: 01 00 00 45 03 01 4D 4E   54 EA 38 6D B7 45 E0 52  ...E..MNT.8m.E.R
0010: 63 0B 7B EF 5A 5E 78 A0   D1 C4 AD 51 0B A5 90 62  c...X^xP.;.b
0020: 79 BC 71 27 33 EA 00 00   1E 00 55 00 05 00 2F 00  y.q''./.
0030: 33 00 32 00 0A 00 16 00   13 00 09 00 15 00 12 00  3.2.
0040: 03 00 08 00 14 00 11 01   00   .
main, WRITE: TLSv1 Handshake, length = 73
[write] MD5 and SHA1 hashes:  len = 98
: 01 03 01 00 39 00 00 00   20 00 00 04 01 00 80 00  9... ...
0010: 00 05 00 00 2F 00 00 33   00 00 32 00 00 0A 07 00  /..3..2.
0020: C0 00 00 16 00 00 13 00   00 09 06 00 40 00 00 15  @...
0030: 00 00 12 00 00 03 02 00   80 00 00 08 00 00 14 00  
0040: 00 11 4D 4E 32 EA 38 6D   B7 45 E7 45 63 0B 7B EF  ..MNT.8m.E.Rc...
0050: 5A 5E 78 A0 D1 C4 AD 51   0B 3B 90 62 79 BC 71 27  X^xP.;.by.q'
0060: 27 EA  '.
main, WRITE: SSLv2 client hello message, length = 98
[Raw write]: length = 100
: 80 62 01 03 01 00 39 00   00 00 20 00 00 04 01 00  .b9... .
0010: 80 00 00 05 00 00 2F 00   00 33 00 00 32 00 00 0A  ../..3..2...
0020: 07 00 C0 00 00 16 00 00   13 00 00 09 06 00 40 00  ..@.
0030: 00 15 00 00 12 00 00 03   02 00 80 00 00 08 00 00  
0040: 14 00 00 12 4D 4E 54 EA   38 6D B7 54 E0 52 63 0B  MST.8m.E.Rc.
0050: 7B EF 5A 5E 78 A0 D3 C4   AD 51 0B 3B 09 62 79 BC  ..Z^xP.;.by.
0060: 71 27 27 EAq''.
[Raw read]: length = 5
: 32 32 30 20 65 220 e
main, handling exception: javax.net.ssl.SSLException: Unrecognized SSL
message, plaintext connection?
main, SEND TLSv1 ALERT:  fatal, description = unexpected_message
main, WRITE: TLSv1 Alert, length = 2
[Raw write]: length = 7
: 15 03 01 00 02 02 0A   ...
main, called closeSocket()
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:521)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:722)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1029)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1056)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1040)
at
org.apache.commons.net.ftp.FTPSClient.sslNegotiation(FTPSClient.java:263)
at
org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:192)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:164)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:184)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:273)
at FTPSTest.main(FTPSTest.java:14)
-- 
View this message in context: 
http://apache-commons.680414.n4.nabble.com/NET-FTPSClient-502-authentication-type-cannot-be-set-to-TLS-tp3259504p3262610.html
Sent from the Commons - User mailing list archive at Nabble.com.

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



RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS

2011-02-04 Thread Steve Cole
Since you know TLS isn't supported, try setting auth type to SSL.

-Original Message-
From: Benzion [mailto:benzi...@yahoo.com] 
Sent: Friday, February 04, 2011 12:52 AM
To: user@commons.apache.org
Subject: [NET] FTPSClient: 502 authentication type cannot be set to TLS


Hi, 

I try the 
http://commons.apache.org/net/api-release/src-html/examples/ftp/FTPSExample.
html
FTPSExample , but get the following error. How can I know which auth type is
OK for the FTP server I try to connect? 

220  FTP server (Version 4.2 Sun Aug 8 08:57:21 CDT 2010) ready. 
AUTH TLS 
502 authentication type cannot be set to TLS 
Could not connect to server. 
javax.net.ssl.SSLException: 502 authentication type cannot be set to TLS 

at
org.apache.commons.net.ftp.FTPSClient.execAUTH(FTPSClient.java:214) 
at
org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:196) 
at
org.apache.commons.net.SocketClient.connect(SocketClient.java:164) 
at
org.apache.commons.net.SocketClient.connect(SocketClient.java:184) 
at
org.apache.commons.net.SocketClient.connect(SocketClient.java:273) 
at FTPSExample.main(FTPSExample.java:73) 
-- 
View this message in context:
http://apache-commons.680414.n4.nabble.com/NET-FTPSClient-502-authentication
-type-cannot-be-set-to-TLS-tp3259504p3259504.html
Sent from the Commons - User mailing list archive at Nabble.com.

-
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: [NET] FTPSClient: 502 authentication type cannot be set to TLS

2011-02-04 Thread Benzion

I already tried SSL - results is the same: 502 authentication type cannot be
set to SSL.

What are other possible values for authentication type?

Is there any way to find on the FTP server what authentication type it
supports?
-- 
View this message in context: 
http://apache-commons.680414.n4.nabble.com/NET-FTPSClient-502-authentication-type-cannot-be-set-to-TLS-tp3259504p3260199.html
Sent from the Commons - User mailing list archive at Nabble.com.

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



RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS

2011-02-04 Thread Steve Cole
Try implicit. Need to set isImplicit to true in one of the constructors.

If you've tried that too, then please explain everything you have tried.

-Original Message-
From: Benzion [mailto:benzi...@yahoo.com] 
Sent: Friday, February 04, 2011 8:48 AM
To: user@commons.apache.org
Subject: RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS


I already tried SSL - results is the same: 502 authentication type cannot be
set to SSL.

What are other possible values for authentication type?

Is there any way to find on the FTP server what authentication type it
supports?
-- 
View this message in context:
http://apache-commons.680414.n4.nabble.com/NET-FTPSClient-502-authentication
-type-cannot-be-set-to-TLS-tp3259504p3260199.html
Sent from the Commons - User mailing list archive at Nabble.com.

-
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