# The certificate is not trusted elasticsearch, but I do have the SSL certificates

**URL:** https://discuss.elastic.co/t/the-certificate-is-not-trusted-elasticsearch-but-i-do-have-the-ssl-certificates/309164
**Category:** Elasticsearch
**Tags:** docker
**Created:** [July 8, 2022, 12:28am UTC](https://discuss.elastic.co/t/the-certificate-is-not-trusted-elasticsearch-but-i-do-have-the-ssl-certificates/309164 "2022-07-08T00:28:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Xavier\_Font](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_font/32/108051_2.png) [@Xavier\_Font](https://discuss.elastic.co/u/Xavier_Font)
#### Post date: [July 8, 2022, 12:28am UTC](https://discuss.elastic.co/t/the-certificate-is-not-trusted-elasticsearch-but-i-do-have-the-ssl-certificates/309164/1 "2022-07-08T00:28:26Z")

</div>

when trying to access endpoints of my self-hosted elasticsearch,

On Safari I [https://i.stack.imgur.com/YA6Be.png](https://i.stack.imgur.com/YA6Be.png))]([https://i.stack.imgur.com/YA6Be.png](https://i.stack.imgur.com/YA6Be.png)

And on my Rust client I get `code: -67843, message: "The certificate was not trusted.`

However when I request information from the `https://localhost:9200/_ssl/certificates`endpoint on postman (which accepts invalid certs) I get an array full of certs:

> ```auto
> [
> {
> "path": "certs/http.p12",
> "format": "PKCS12",
> "alias": "http",
> "subject_dn": "CN=05eeab4fdxxx",
> "serial_number": "5126e9dc2658e8xxxxxxxxxxxxxxx",
> "has_private_key": true,
> "expiry": "2024-06-26T19:29:39.000Z"
> },
> {
> "path": "certs/http.p12",
> "format": "PKCS12",
> "alias": "http",
> "subject_dn": "CN=Elasticsearch security auto-configuration HTTP CA",
> "serial_number": "ca270f5cdc32982970c192c6cxxxxxxxxxxxx",
> "has_private_key": false,
> "expiry": "2025-06-26T19:29:39.000Z"
> },
> {
> "path": "certs/http.p12",
> "format": "PKCS12",
> "alias": "http_ca",
> "subject_dn": "CN=Elasticsearch security auto-configuration HTTP CA",
> "serial_number": "ca270f5cdc32982970c192c6c25xxxxxxxxxxxxxx",
> "has_private_key": true,
> "expiry": "2025-06-26T19:29:39.000Z"
> },
> {
> "path": "certs/transport.p12",
> "format": "PKCS12",
> "alias": "transport",
> "subject_dn": "CN=Elasticsearch security auto-configuration HTTP CA",
> "serial_number": "19c5505398d30c56b0ea320exxxxxxxxxx",
> "has_private_key": false,
> "expiry": "2121-06-03T19:29:36.000Z"
> },
> {
> "path": "certs/transport.p12",
> "format": "PKCS12",
> "alias": "transport",
> "subject_dn": "CN=05eeab4fd435",
> "serial_number": "eb743df4612a20b23d3exxxxxxxxxxxx",
> "has_private_key": true,
> "expiry": "2121-06-03T19:29:38.000Z"
> },
> {
> "path": "certs/transport.p12",
> "format": "PKCS12",
> "alias": "transport_ca",
> "subject_dn": "CN=Elasticsearch security auto-configuration HTTP CA",
> "serial_number": "19c5505398d30c56b0eaxxxxxxxxxxxx",
> "has_private_key": false,
> "expiry": "2121-06-03T19:29:36.000Z"
> }
> ]
> 
> ```

Meaning I do have SSL certs up and running, I would guess. So how can I solve this problem?

FOR THE SAME QUESTION IN STACK OVERFLOW [The certificate is not trusted elasticsearch, but I do have the SSL certificates - Stack Overflow](https://stackoverflow.com/questions/72905129/the-certificate-is-not-trusted-elasticsearch-but-i-do-have-the-ssl-certificates)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 5, 2022, 12:28am UTC](https://discuss.elastic.co/t/the-certificate-is-not-trusted-elasticsearch-but-i-do-have-the-ssl-certificates/309164/2 "2022-08-05T00:28:50Z")

</div>

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