SilleBille / pki

Dogtag PKI Issues should be reported to the Dogtag PKI Pagure Issues site
https://pagure.io/dogtagpki/issues
GNU General Public License v2.0
1 stars 1 forks source link

cert-fix fails when HOSTNAME env var not set #501

Closed SilleBille closed 4 years ago

SilleBille commented 4 years ago

This issue was migrated from Pagure Issue #3103.Originally filed by ftweedal on 2019-06-12

The issue is in 'pki-server cert-fix' command. Looking back, it seems the use of os.environ['HOSTNAME'] began in commit 59088d1e225ef3b5db451dbd1d214463e0612b8f. (The code now lives in base/server/python/pki/server/init.py). The client needs to use the proper hostname to talk TLS to Dogtag, but the HOSTNAME env var is not a reliable way to get it.

There's also a need to improve the error reporting from the 'pki-server cert-fix' command - to get a traceback instead of the rather cryptic 'HOSTNAME' message.