I am getting the following exception when I try to read after having
connected to a SSL enabled FTP server:
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
main, called closeSocket()
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
connection?
I have created a SSLSocket like this:
ctx = SSLContext.getInstance("TLS");
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
SSLSocketFactory m_sslSocketFactory = ctx.getSocketFactory();
SSLSocket sslSocket =(SSLSocket)m_sslSocketFactory.createSocket("stdevt09",
1990);
After creating Socket I am able to print out the enabled cipher suites
so I am assuming that the connection was eshtablished successfully but
while reading from socket stream there is a problem.
Thanks in Advance,
Swatantra
Ranga - 29 Dec 2004 13:46 GMT
Swatantra,
Are you sure that the FTP server that you are connecting to is SSL
enabled and not SSH enabled? The commonly known "SFTP" is SSH enabled -
not SSL enabled. SSH and SSL are not the same; hence the java SSL APIs
will not work in such a situation.
-Ranga
> I am getting the following exception when I try to read after having
> connected to a SSL enabled FTP server:
[quoted text clipped - 20 lines]
> Thanks in Advance,
> Swatantra