# TLS certificates

**URL:** <https://community.hivemq.com/t/tls-certificates/1068>\
**Category:** Uncategorized\
**Created:** [March 10, 2022, 1:26pm UTC](https://community.hivemq.com/t/tls-certificates/1068 "2022-03-10T13:26:14Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dominicwenig-hmq](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/dominicwenig-hmq/32/280_2.png) [@dominicwenig-hmq](https://community.hivemq.com/u/dominicwenig-hmq)\
**Post date:** [March 11, 2022, 12:16pm UTC](https://community.hivemq.com/t/tls-certificates/1068/6 "2022-03-11T12:16:45Z")

</div>

Hi Hans,

currently, you opened the OpenSSL command line tool, via command `openssl`. However, that’s not required.  
Just open your terminal (shell, bash, zsh) and use the full command with your URL.

```auto
$ openssl s_client -connect brokerurl.s2.eu.hivemq.cloud:8883 -showcerts < /dev/null 2> /dev/null | sed -n ‘/BEGIN/,/END/p’ > server.pem

```

The other arguments in this command are:  
-showcerts → shows the full certificate chain  
\< /dev/null 2\> /dev/null → closes the command and redirects stderr  
sed -n ‘/BEGIN/,/END/p’ → finds the begin and end of each certificate  
\> server.pem. → redirects the output to the file `server.pem`

Kind regards,  
Dominic

---

_[View the full topic](https://community.hivemq.com/t/tls-certificates/1068)._
