Partager via


Migrating code having SSL Sockets using JLCA

Q. My jar file uses SSL package from JDK1.3.1. The type SSLSocket is in javax.net.ssl.SSLSocket. When I ran JConvert, it inserted comments in the output source code stating that class 'javax.net.ssl.SSLSocket' was not converted. How can I resolve this issue? ****

Ans.

JLCA 3.0 does not convert the package javax.net (and javax.net.ssl) as it was introduced in J2SE 1.4.2. JLCA 3.0 adds support to convert J2SE 1.3. The features included after J2SE 1.3 are not covered by JLCA 3.0. A full description of the technologies supported by JLCA is available here

However, depending the way in which the application uses SSL, it could be enabled easily in .NET Framework. .NET Framework supports SSL automatically over HTTP and FTP connections (specifically, the classes System.Net.WebRequest and System.Net.WebResponse). For these cases, .NET only needs to receive in the protocol parameter this indication (for example, "https" for ssl on http). Check out this site for more information regarding the same.

However, I suppose .NET Framework does not have a full support for secure sockets (SSL) as Java does. So, If the application does not uses SSL over HTTP or FTP, it could be necessary to change the architecture to the existing framework(using System.Security.Cryptography).