# SSL Connectivity: Java 7 (Pre-u131)

### Problem <a href="#problem" id="problem"></a>

When running with the SeaLights Java agent, depending on the proxy and security setting, an SSL connection can be encountered when using java 7 with a version lower that 131.

### Cause  <a href="#cause" id="cause"></a>

This is due to TLS 1.2 not being added by default till java 7 version 131 (See <https://www.oracle.com/technetwork/java/javase/7u131-relnotes-3338543.html>)

### Solution <a href="#solution" id="solution"></a>

The solution is to upgrade java to version 131 or later which will automatically support TL1.2, if you are using an older version of Java 7 then you can add the following JVM param: `-Dhttps.protocols=TLSv1.2`.

> **Add TLS v1.1 and v1.2 to the client list of default-enabled protocols**\
> TLSv1.2 and TLSv1.1 are now enabled by default on the TLS client end-points.\
> This is similar behavior to what already happens in JDK 8 releases.

In some cases there may be a cipher suite mismatch between the Java 7 environment and the TLS 1.2 supporting peer.\
Additional ciphers can be added using an extra JVM param e.g. "`-Dhttps.cipherSuites=TLS_RSA_WITH_AES_128_CBC_SHA256`"  (comma separated list if adding multiple ciphers)

### Related articles <a href="#related-articles" id="related-articles"></a>

* [running-tests](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/go-agent/go-agent-v1/running-tests "mention") (Go)
* [setting-up-a-windows-service](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/.net-core-agent/capturing-coverage-from-the-application/ms-windows-specific-configurations/setting-up-a-windows-service "mention") (.Net Core)
* [setting-up-iis-listener](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/.net-core-agent/capturing-coverage-from-the-application/ms-windows-specific-configurations/setting-up-iis-listener "mention") (.Net Core)
* [cloud-foundry-integration](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/python-agent/capturing-coverage-from-runtime-application/cloud-foundry-integration "mention") (Python)
* [pivotal-cloud-foundry-pcf-support](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/pivotal-cloud-foundry-pcf-support "mention") (Java)
