# InfluxDB 3 Core self-signed certificate error with .NET SDK

**URL:** <https://community.influxdata.com/t/influxdb-3-core-self-signed-certificate-error-with-net-sdk/57282>\
**Category:** InfluxDB 3\
**Tags:** security\
**Created:** [May 20, 2025, 5:29am UTC](https://community.influxdata.com/t/influxdb-3-core-self-signed-certificate-error-with-net-sdk/57282 "2025-05-20T05:29:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![li\_xuguang](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/li_xuguang/32/19914_2.png) [@li\_xuguang](https://community.influxdata.com/u/li_xuguang)\
**Post date:** [May 20, 2025, 5:29am UTC](https://community.influxdata.com/t/influxdb-3-core-self-signed-certificate-error-with-net-sdk/57282/1 "2025-05-20T05:29:10Z")

</div>

Use InfluxDB3.Client SDK(.NET8) to query data from local InfluxDB 3 Core, get the SSL error like this .

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/3X/0/1/0112a049cfb0cebfe596d7d4dcce5748811fab15.jpeg)

Configuration like below.

1. Openssl

openssl req -x509 -nodes -newkey rsa:2048 -keyout influxdb-selfsigned.key -out influxdb-selfsigned.crt -days \<Number\_of\_Days\>

Common Name: PC Name

1. Influxdb3.exe serve –node-ind host01 –object-store file –data-dir ~/.influxdb3\_data –tls-cert= influxdb-selfsigned.crt tls-key=influxdb-selfsigned.key

URL: [https://localhost:8181](https://localhost:8181)  
Use Postman ping the url [https://localhost:8181/ping](https://localhost:8181/ping) with token can return the correct result (200 & the current version 3.0.1)

But use the .NetCore SDK to query data will return the SSL or certificate error.  
Could any one can help?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [May 30, 2025, 6:53pm UTC](https://community.influxdata.com/t/influxdb-3-core-self-signed-certificate-error-with-net-sdk/57282/2 "2025-05-30T18:53:35Z")

</div>

Hello @li_xuguang,  
Welcome!  
I’m so sorry I missed this. Please in the future tag me 🙂 I’m asking around because I don’t know the answer to this question.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [May 30, 2025, 8:13pm UTC](https://community.influxdata.com/t/influxdb-3-core-self-signed-certificate-error-with-net-sdk/57282/3 "2025-05-30T20:13:08Z")

</div>

Likely something to do with how they are setting up the cert. The common name might need to be `localhost` for the cert to be “valid” for localhost (e.g., see [SO comment](https://stackoverflow.com/a/32169444/23546832)).Postman may make some exceptions for cases like this since people use it locally, whereas the .Net client has more standard cert verification requirements.

![Stack Overflow](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/3X/a/7/a7c95d3a7058b5a6765e771ffecdee872eac9dea.png)Stack Overflow

[How can I create a self-signed certificate for ‘localhost’?](https://stackoverflow.com/a/32169444/23546832)

I’ve gone through the steps detailed in How do you use HTTPS and SSL on 'localhost'?, but this sets up a self-signed certificate for my machine name, and when browsing it via [https://localh](https://localh/)…

![](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/3X/1/5/159e723800e5f3779e22b57f5a49e13d2dbc937c.jpeg)

---

<div class="post-metadata">

**Author:** ![li\_xuguang](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/li_xuguang/32/19914_2.png) [@li\_xuguang](https://community.influxdata.com/u/li_xuguang)\
**Post date:** [June 18, 2025, 1:30am UTC](https://community.influxdata.com/t/influxdb-3-core-self-signed-certificate-error-with-net-sdk/57282/4 "2025-06-18T01:30:49Z")

</div>

Thanks a lot. We recreate the cert and it works correctly.
