Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageSwatantra,
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
Sonu wrote:
> 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.