1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-22 08:15:18 +00:00

cli: Add $HOSTNAME option for common name config option of client

This commit is contained in:
Lauri Võsandi 2018-03-22 11:15:11 +02:00
parent 1c49626f50
commit 9c6872a949

View File

@ -269,6 +269,10 @@ def certidude_enroll(fork, renew, no_wait, kerberos, skip_self):
click.echo("No common name specified for %s, not requesting a certificate" % authority_name) click.echo("No common name specified for %s, not requesting a certificate" % authority_name)
continue continue
# If deriving common name from *current* hostname is preferred
if common_name == "$HOSTNAME":
common_name = const.HOSTNAME
################################ ################################
### Generate keypair and CSR ### ### Generate keypair and CSR ###
################################ ################################