Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / December 2004

Tip: Looking for answers? Try searching our database.

Unable to read from SSLSocket

Thread view: 
Sonu - 28 Dec 2004 08:02 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.