commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cole" <sc...@camsbycbs.com>
Subject RE: [NET] FTPSClient: 502 authentication type cannot be set to TLS
Date Mon, 07 Feb 2011 12:55:33 GMT
Try FTPSClient fc = new FTPSClient(true);

-----Original Message-----
From: Benzion [mailto:benzionk@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("xxxx");
			fc.login("xxxxx", "xxxx");
		}
		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
0000: 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^x....P.;.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
0000: 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^x....P.;.by.q'
0060: 27 EA                                              '.
main, WRITE: SSLv2 client hello message, length = 98
[Raw write]: length = 100
0000: 80 62 01 03 01 00 39 00   00 00 20 00 00 04 01 00  .b....9... .....
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^x....P.;.by.
0060: 71 27 27 EA                                        q''.
[Raw read]: length = 5
0000: 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
0000: 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.

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


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


Mime
View raw message