# 400 No required SSL certificate was sent

**URL:** <https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696>\
**Category:** Developing Nodes\
**Created:** [18 August 2020 15:12 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696 "2020-08-18T15:12:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rabah.tamezait](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rabah.tamezait/32/27389_2.png) [@rabah.tamezait](https://discourse.nodered.org/u/rabah.tamezait)\
**Post date:** [18 August 2020 15:12 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/1 "2020-08-18T15:12:34Z")

</div>

Hello,

I try to execute API in http request and I receive this message

""400 No required SSL certificate was sent""

please what means ?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 August 2020 16:17 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/2 "2020-08-18T16:17:38Z")

</div>

Hi @rabah.tamezait, welcome to the forum. Did you try googling for that error? It appears that the API requires you to send a certificate.

---

<div class="post-metadata">

**Author:** ![rabah.tamezait](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rabah.tamezait/32/27389_2.png) [@rabah.tamezait](https://discourse.nodered.org/u/rabah.tamezait)\
**Post date:** [18 August 2020 17:58 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/3 "2020-08-18T17:58:23Z")

</div>

Hello,  
Thank you, yes i tried in google, But i didn't resolve problem  
do you have some methodes or link ?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 August 2020 18:12 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/4 "2020-08-18T18:12:24Z")

</div>

Does the API documentation say that it needs a certificate?

---

<div class="post-metadata">

**Author:** ![rabah.tamezait](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rabah.tamezait/32/27389_2.png) [@rabah.tamezait](https://discourse.nodered.org/u/rabah.tamezait)\
**Post date:** [18 August 2020 18:16 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/5 "2020-08-18T18:16:44Z")

</div>

YES THAT does certification, i have certification .pfx  
but I don't know, how to make it in node-red ?  
Thank you

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 August 2020 20:19 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/6 "2020-08-18T20:19:52Z")

</div>

Hi Rabah,

So I assume you want to do the following:

1. You call an API via the http-request node
2. The called server requires a client-side certificate, to make sure you can authenticate yourself.

So you want to store the client certificate in a (pfx) container, and you want the http-request node to get it there (and send it to the server). Is that correct?

I have the impression that this is currently not possible in Node-RED, but perhaps this might get you started:

- The http-request node is based on the [request](https://www.npmjs.com/package/request) npm package.
- In that package you can see that a client-side certificate can be supplied via the [AgentOptions](https://www.npmjs.com/package/request#using-optionsagentoptions).
- However when you look at the [http-request](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/nodes/core/network/21-httprequest.js) node, you will see that the AgentOptions are _ **NOT** _ being used. So I don't think it is supported in Node-RED at the moment.
- And I'm not sure whether this will be added (based on this discussion) to the http-request node, because the "request" npm package is _ **obsolete** _. This is a known issue, but there is no solution yet (as you can read in this _[issue](https://github.com/node-red/node-red/issues/2481)_). So extending the http-request node further, might make a migration to another package even more difficult. But perhaps others have a different opinion about this ...

To be honest, if I was in your case I would do the http request from a function node. In this [StackOverflow](https://stackoverflow.com/questions/35478215/how-to-do-https-get-with-client-certificate-in-node) discussion, there is a simple example of a http request with client certificate. The example requires no extra npm packages, but only standard NodeJs stuff.

Note that I haven't tried this code myself!

Bart

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 August 2020 21:56 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/7 "2020-08-18T21:56:02Z")

</div>

Why not tick the 'use https' option in the node and provide the appropriate certs in the TLS config node? Probably much easier to use the functionality already provided by the node then go off editing code. Unless I'm missing something about the scenario?

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 August 2020 21:58 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/8 "2020-08-18T21:58:10Z")

</div>

Damn... Believe it or not, but I did never had a look at that config screen before ...  
Nice !!

---

<div class="post-metadata">

**Author:** ![rabah.tamezait](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rabah.tamezait/32/27389_2.png) [@rabah.tamezait](https://discourse.nodered.org/u/rabah.tamezait)\
**Post date:** [19 August 2020 07:49 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/9 "2020-08-19T07:49:22Z")

</div>

Hello,  
Thank you for your explanations, I will try every suggestions.

---

<div class="post-metadata">

**Author:** ![rabah.tamezait](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rabah.tamezait/32/27389_2.png) [@rabah.tamezait](https://discourse.nodered.org/u/rabah.tamezait)\
**Post date:** [19 August 2020 07:50 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/10 "2020-08-19T07:50:58Z")

</div>

Hello,  
Thank you for your réponses, i tried to use certs, But i have juste pfx....Can I obtain the certs, key private...JUSTE WITH PFX ???

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 August 2020 08:01 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/11 "2020-08-19T08:01:13Z")

</div>

Sorry, not an tls expert, but that does sound like the type of question Google could help you answer.

For example: [https://tecadmin.net/extract-private-key-and-certificate-files-from-pfx-file/](https://tecadmin.net/extract-private-key-and-certificate-files-from-pfx-file/)

---

<div class="post-metadata">

**Author:** ![rabah.tamezait](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rabah.tamezait/32/27389_2.png) [@rabah.tamezait](https://discourse.nodered.org/u/rabah.tamezait)\
**Post date:** [20 August 2020 14:08 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/12 "2020-08-20T14:08:22Z")

</div>

Thank you for yours réponses, But for now i miss CA Certificate in the node.

I don't know how i obtain it, if you any idea , thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 October 2020 14:08 UTC](https://discourse.nodered.org/t/400-no-required-ssl-certificate-was-sent/31696/13 "2020-10-19T14:08:35Z")

</div>

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