# HTTPS under LINUX environment

**URL:** <https://techcommunity.softwareag.com/t/https-under-linux-environment/263615>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux, NaturalONE\
**Created:** [September 13, 2022, 2:22pm UTC](https://techcommunity.softwareag.com/t/https-under-linux-environment/263615 "2022-09-13T14:22:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paolo\_Cherici](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/paolo_cherici/32/897_2.png) [@Paolo\_Cherici](https://techcommunity.softwareag.com/u/Paolo_Cherici)\
**Post date:** [September 13, 2022, 2:22pm UTC](https://techcommunity.softwareag.com/t/https-under-linux-environment/263615/1 "2022-09-13T14:22:18Z")

</div>

Hi Everyone,  
we are struggling trying to convert a Natural program containing an HTTP (Post) call via REQUEST DOCUMENT statement in HTTPS format; someone has experienced something similar to put light in the dark? Someone could confirm wheter the use of HTTPS is possible under a Linux environment with OPENSSL or it’s just z/os matter ?

Sag Manual explains how to set User & Passw in the WITH clause but I always receive error NAT8304 HTTP Request failed. Reason Request error: -1

Dev environment is NaturalOne 9.1.1. while target environment will be natural v. 6.3.8

Thanks for any public contribution on this matter.

Paolo Cherici  
LSE

#### What product/components do you use and which version/fix level are you on?

#### Is your question related to the free trial, or to a production (customer) instance?

#### What are you trying to achieve? Please describe it in detail.

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

#### Have you installed all the latest fixes for the products and systems you are using?

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [September 16, 2022, 11:32pm UTC](https://techcommunity.softwareag.com/t/https-under-linux-environment/263615/2 "2022-09-16T23:32:48Z")

</div>

Are you able to run the program SYSEXV/V5-RDOC0? Give it a URL like [https://www.google.com](https://www.google.com) - does that work? Give it the URL you are trying to reach - what is the result?

if you use openssl s\_client to connect to the URL, does it use a public certificate authority or a self-signed certificat? From the Natural server’s Linux command line enter:  
`openssl s_client -connect <url> < /dev/null`  
for example:  
`openssl s_client -connect empower.softwareag.com:443 < /dev/null`  
returns (just showing the first few lines):

```auto
CONNECTED(00000003)
depth=2 OU = GlobalSign Root CA - R3, O = GlobalSign, CN = GlobalSign
verify return:1
depth=1 C = BE, O = GlobalSign nv-sa, CN = GlobalSign Extended Validation CA - SHA256 - G3
verify return:1
depth=0 businessCategory = Private Organization, serialNumber = HRB 1562, jurisdictionC = DE, jurisdictionL = Darmstadt, jurisdictionST = Hessen, C = DE, ST = Hessen, L = Darmstadt, street = Uhlandstr. 12, OU = IT, O = Software Aktiengesellschaft, CN = empower.softwareag.com
verify return:1

```

View the certificates the server sends, particularly “depth=1” such as:

```auto
CONNECTED(00000208)
Can't use SSL_get_servername
depth=0 CN = some-server
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = some-server
verify return:1

```

If these list “self signed certificate” then the server’s certificate issuer is probably not in the Linux default certificate truststore. If so, you need to have the server’s certificate issuer (CA) added to your truststore.

There are many possibilities as to what can cause the HTTPS request to fail, so review the results of the openssl s\_client test, and, if you want further assistance, please post the results of the openssl test and the REQUEST DOCUMENT program (or a small program that reproduces the problem) here.

---

<div class="post-metadata">

**Author:** ![Paolo\_Cherici](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/paolo_cherici/32/897_2.png) [@Paolo\_Cherici](https://techcommunity.softwareag.com/u/Paolo_Cherici)\
**Post date:** [September 21, 2022, 9:31am UTC](https://techcommunity.softwareag.com/t/https-under-linux-environment/263615/3 "2022-09-21T09:31:53Z")

</div>

Thank you very much Douglas for your precious hints. It is the first HTTPS call made directly from Natural and indeed seems there are some problems in our client (and server) configuration sothat Request Command are not functioning correctly.  
Even when I’m using SYSEXV/V5-RDOC0 to reach a simple http server as [http://empower.softwareag.com](http://empower.softwareag.com) I get “Natural error NAT8304 occurred.” . Strangely other natural program using HTTP calls looks working correctly in our NatOne dev. I sent your post to our system admin in order to scope our current situation.  
Many thanks again…  
Paolo

 ![image](https://global.discourse-cdn.com/techcommunity/original/3X/c/1/c184528911d633558c76f38c3922c52189f65550.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [March 20, 2023, 9:32am UTC](https://techcommunity.softwareag.com/t/https-under-linux-environment/263615/4 "2023-03-20T09:32:27Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
