# Dns and ip not seen in node certificate

**URL:** <https://discuss.elastic.co/t/dns-and-ip-not-seen-in-node-certificate/164944>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 20, 2019, 1:52pm UTC](https://discuss.elastic.co/t/dns-and-ip-not-seen-in-node-certificate/164944 "2019-01-20T13:52:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [January 20, 2019, 1:52pm UTC](https://discuss.elastic.co/t/dns-and-ip-not-seen-in-node-certificate/164944/1 "2019-01-20T13:52:43Z")

</div>

Using _bin/elasticsearch-certutil_ to create node certificate, with --name, --dns, --ip, then using  
_openssl pkcs12 -info -in \<node-certificate.p12\>_,  
I can only see the CN (common name) of the certificate, but no dns and ip information.  
So how can I see these information?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [January 20, 2019, 6:41pm UTC](https://discuss.elastic.co/t/dns-and-ip-not-seen-in-node-certificate/164944/2 "2019-01-20T18:41:51Z")

</div>

AFAIK one cannot print the SANs of a certificate from a `PKCS#12` container using `openssl pkcs12` so this is not something related to `elasticsearch-certutil`.

You can, instead use `pkcs12` to get the certificate and then `x509` to get the information of the Certificate. This would look something like :

`openssl pkcs12 -in node-certificate.p12 -nokeys -clcerts | openssl x509 -text -noout`

and look for something similar to

```auto
 X509v3 Subject Alternative Name: 
                DNS:name.com, IP Address:1.1.1.1

```

in the output.

---

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [January 21, 2019, 10:24am UTC](https://discuss.elastic.co/t/dns-and-ip-not-seen-in-node-certificate/164944/3 "2019-01-21T10:24:19Z")

</div>

> [@ikakavas](#):
>
> openssl pkcs12 -in node-certificate.p12 -nokeys -clcerts | openssl x509 -text -noout

It is done. Thanks!

---

<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:** [February 18, 2019, 10:29am UTC](https://discuss.elastic.co/t/dns-and-ip-not-seen-in-node-certificate/164944/4 "2019-02-18T10:29:44Z")

</div>

Closed on February 18, 2019, 10:29am UTC

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