# \[Solved\] Setting tls options on HTTP node (edge workflow)

**URL:** <https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104>\
**Category:** Help\
**Created:** [August 30, 2018, 12:28am UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104 "2018-08-30T00:28:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cam\_Esdaile](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Cam\_Esdaile](https://forums.losant.com/u/Cam_Esdaile)\
**Post date:** [August 30, 2018, 12:28am UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/1 "2018-08-30T00:28:47Z")

</div>

I am hitting an issue where the underlying node https library is negotiating the wrong TLS curve and failing with the following error message in the workflow output:

`error: write EPROTO 139803240335168:error:1414D17A:SSL routines:tls12_check_peer_sigalg:wrong curve:../deps/openssl/openssl/ssl/t1_lib.c:1097:`

Bit googling shows that setting the tls option for `ecdhCurve` to `auto` should do the trick. I attempted to confirm this by connecting to the local docker instance for the edge agent and run a quick node test as follows:

```
var https = require('https');

var options = {
  host: 'localhost',
  port: 443,
  path: '/api/info',
  method: 'GET',
  rejectUnauthorized: false,
  //ecdhCurve: 'auto'
};

var req = https.request(options, function(res) {

  var body = '';

  res.on('data', function(chunk) {
    body = body + chunk;
  });

  res.on('end', function(){
    console.log("Status: " + res.statusCode);
    console.log("Body: " + body);
  });

});

req.on('error', function(e) {
  console.log('error: ' + e.message);
});

req.end();

```

Commenting out the `ecdhCurve` generates the error as described.

Are there any options to set this level of option for the https library from within the workflow?

Thanks.

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [August 30, 2018, 1:55pm UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/2 "2018-08-30T13:55:39Z")

</div>

Interesting!

There is no way to set this option at the moment, although doing a bit of googling of my own, I think it would be ok if we just _always_ set that option to `auto` (in fact, in the current edge versions of Node.js, it looks like it defaults to `auto`, whereas in Node.js LTS - the version the Edge Agent uses - it defaults to `prime256v1`).

If possible, could you share a URL that I can reproduce the issue with?

---

<div class="post-metadata">

**Author:** ![Cam\_Esdaile](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Cam\_Esdaile](https://forums.losant.com/u/Cam_Esdaile)\
**Post date:** [September 8, 2018, 1:51am UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/3 "2018-09-08T01:51:51Z")

</div>

This would be great to get this option added to Edge Agent. Unfortunately it is an internally hosted app so I can’t expose it for testing. I believe the app is fronted by nginx so I can try to figure out the config so you can replicate it in the lab.

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [September 12, 2018, 1:58pm UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/4 "2018-09-12T13:58:51Z")

</div>

The relevant config would be useful - I want to make sure that whatever changes we make will actually work for you!

---

<div class="post-metadata">

**Author:** ![Cam\_Esdaile](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Cam\_Esdaile](https://forums.losant.com/u/Cam_Esdaile)\
**Post date:** [September 12, 2018, 7:56pm UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/5 "2018-09-12T19:56:07Z")

</div>

I am trying to track down the dev that worked on the front end to confirm the setup. In the meantime, happy to test anything you can push my way. thanks!

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [September 13, 2018, 5:43pm UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/6 "2018-09-13T17:43:44Z")

</div>

Cam, we actually found a public site where we can reproduce the issue - [BadSSL](https://badssl.com/dashboard/). The `ecc` options under the `Secure` section cause the issue you described above, and switching to `auto` fixes it. This change will be in the next release of the edge agent!

---

<div class="post-metadata">

**Author:** ![Cam\_Esdaile](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Cam\_Esdaile](https://forums.losant.com/u/Cam_Esdaile)\
**Post date:** [September 20, 2018, 11:05pm UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/7 "2018-09-20T23:05:44Z")

</div>

Thanks Michael - look forward to trying it out on the next release.

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [September 27, 2018, 8:21pm UTC](https://forums.losant.com/t/solved-setting-tls-options-on-http-node-edge-workflow/1104/8 "2018-09-27T20:21:27Z")

</div>

Cam, we just released [Version 1.2.3](https://docs.losant.com/edge-compute/edge-agent-changelog/#123-2018-09-27) of the Edge Agent, which has this setting changed. Hopefully, that fixes your issues!
