The `certs` plugin extracted a certificate's Common Name and formatted its subject using string assumptions that only held for pre-3.x OpenSSL output, so a certificate with only a Common Name and no Subject Alternative Name reported no hostnames from `certs:report` and was not recognized during nginx config generation, while the subject report retained the `subject=` prefix and used the wrong separators. Normalizing the subject with `-nameopt` before parsing makes the extraction version independent across OpenSSL and LibreSSL.
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.
The command used to reprocess everything is:
```shell
shfmt -l -bn -ci -i 2 -w .
```
Ref dokku/dokku-letsencrypt#76
Certificates provided by Let's Encrypt can have the domain provided in
the Subject Name field listed again in the Subject Alt Name fields,
leading to the same domain getting listed twice by get_ssl_hostnames()
that in turn leads to a duplicate server_name field in the nginx
configuration.
This patch adds a sort -u to ensure that every SSL hostname will only be
listed once.