Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

websphere + SSLv3 SSLContext not available

I have a java application that is using hibernate to do a JNDI lookup for the datasource in Websphere Application Server which then talks to a MSSQL database.

The security team has recently patched the Websphere server 8.5.5.4 to disable SSLv3.

As such I'm getting a com.ibm.websphere.ce.cm.StaleConnectionException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encyption. Error: "SSLv3 SSLContext not available".

Before this, I could access the data without any issues.

What can I do to overcome this issue? Do I need to configure the application to use TLS?

I'm using Hibernate 4.3.7.

The hibernate config looks like this.

<hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
    <property name="connection.datasource">jdbc/testing</property>
    <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
    <mapping resource="myApplication.hbm.xml" />
    </session-factory>
</hibernate-configuration>

Any help would be greatly appreciated.

like image 574
Coola Avatar asked Oct 31 '22 09:10

Coola


2 Answers

I have this issue yesterday.

I solved it by using sqljdbc4.jar instead of sqljdbc4.1 and it works fine.

like image 114
Jay Sithiporn Avatar answered Nov 15 '22 04:11

Jay Sithiporn


Maybe you should look at the MSSQL side to check whether TLS (at least 1.0 version) is supported. If not try to enable it.

Otherwise a (not recommended from security view) fix is to enable SSLv3 temporarily by using the following JVM argument until you find a way to communicate through TLS:

-Dcom.ibm.jsse2.disableSSLv3=false
like image 43
trikelef Avatar answered Nov 15 '22 06:11

trikelef