# Httpclient issue with tls

**URL:** <https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209>\
**Category:** Ignition\
**Created:** [October 21, 2021, 12:34pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209 "2021-10-21T12:34:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy1](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@andy1](https://forum.inductiveautomation.com/u/andy1)\
**Post date:** [October 21, 2021, 12:34pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/1 "2021-10-21T12:34:37Z")

</div>

Hi -  
I’m trying to use httpClient for the first time - but am getting an ‘unable to post’ error. And I think it’s related to an out of date TLS protocol. I am trying bypass\_cert\_validation, but am still getting the error. It works in postman.

```auto
headers = {"CompanyDB":"dummy","UserName":"dummy","Password":"dummy"}
Response = system.net.httpClient(bypass_cert_validation=True).post("https://hanab1:50000/b1s/v1/Login", headers=headers).json

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/19f7e40050ba317cf9bd6befea6f316652f14d4f.png)

Any help would be appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 21, 2021, 12:39pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/2 "2021-10-21T12:39:13Z")

</div>

The server you are targeting is out of date. Newer versions of java block the insecure TLS versions it wants to use. Same problem others have encountered with Database connections:

> [@SQL Server Connection Faulted](https://forum.inductiveautomation.com/t/sql-server-connection-faulted/46393):
>
> After replacing a development installation of Ignition 8.1 with 7.9.17, I am suddenly unable to communicate with my local SQL server. The connection was fine before the reinstall but now it’s faulted and showing this error: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “No appropriate protocol (protocol is disabled or cipher suites are inappropriate)”.) I’ve double checked all t…

The correct solution is have the operators of that server upgrade their security.  
The alternate solution is for you to re-enable old TLS on your end as described in that topic.

---

<div class="post-metadata">

**Author:** ![andy1](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@andy1](https://forum.inductiveautomation.com/u/andy1)\
**Post date:** [October 21, 2021, 12:50pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/3 "2021-10-21T12:50:17Z")

</div>

Thank pturmel. I am encouraging them to upgrade their server; and I did also re-enable the old TLS by editing the java.security file and removing the references to TLSv1 and TLSv1.1. Then I restarted the server. That didn’t work for me.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 21, 2021, 12:53pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/4 "2021-10-21T12:53:13Z")

</div>

The security file is JVM-wide, but the Java HttpClient has its own SSL configuration that specifies which protocols are allowed as well.

Seeing something that only supports TLS 1.0 is pretty uncommon… how old is this hardware/software?

---

<div class="post-metadata">

**Author:** ![andy1](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@andy1](https://forum.inductiveautomation.com/u/andy1)\
**Post date:** [October 21, 2021, 1:26pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/5 "2021-10-21T13:26:20Z")

</div>

Yeah - it’s SAP Business One Version 9.3. Apparently, according to this post ([Service Layer and TLSv1 | SAP Community](https://answers.sap.com/questions/13097776/service-layer-and-tlsv1.html)) it only supports TLS V1.0.

Edit: version 9 was released in 2013, and 9.3 in 2017.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 21, 2021, 1:34pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/6 "2021-10-21T13:34:28Z")

</div>

It might be worth trying `system.net.httpPost` after having re-enabled TLS 1.0 in the Java security file. It’s a different implementation than `system.net.httpClient` and might allow TLS 1.0 if it’s enabled in general.

---

<div class="post-metadata">

**Author:** ![andy1](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@andy1](https://forum.inductiveautomation.com/u/andy1)\
**Post date:** [October 21, 2021, 1:39pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/7 "2021-10-21T13:39:40Z")

</div>

Thanks for the help. I tried that already as well. No luck - same error.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/6/3630b6e2a00917a693060f4333a26c7ef27e49b3.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 21, 2021, 2:46pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/8 "2021-10-21T14:46:47Z")

</div>

Are you sure you edited the correct `java.security` file? The embedded java in the launchers has one separate from the system’s copy.

---

<div class="post-metadata">

**Author:** ![andy1](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@andy1](https://forum.inductiveautomation.com/u/andy1)\
**Post date:** [October 22, 2021, 10:45am UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/9 "2021-10-22T10:45:21Z")

</div>

Thanks - yes I edited the one in the Ignition folder. I think our IT team has a solution, using some sort of intermediary/proxy server. Thanks for all the help!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 22, 2021, 12:41pm UTC](https://forum.inductiveautomation.com/t/httpclient-issue-with-tls/52209/10 "2021-10-22T12:41:10Z")

</div>

When running from the script console, or from a Vision client, the java.security file that matters is the one the launcher is using, not the gateway’s.
