> For the complete documentation index, see [llms.txt](https://notes.tatusl.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.tatusl.dev/infosec/ssl.md).

# SSL

## Check server certificate with OpenSSL

### With SNI

```bash
openssl s_client -showcerts -servername www.example.com -connect www.example.com:443 </dev/null
```

### Without SNI

```bash
openssl s_client -showcerts -connect www.example.com:443 </dev/null
```

### Full details

```bash
echo | \
    openssl s_client -servername www.example.com -connect www.example.com:443 2>/dev/null | \
    openssl x509 -text
```
