From: Hans Lellelid Date: Mon, 23 May 2011 19:34:35 +0000 (-0400) Subject: add --hostname option to certmaster-request to allow specifying the CN for the cert X-Git-Tag: v0.29~16 X-Git-Url: https://pwan.org/git/?p=certmaster.git;a=commitdiff_plain;h=c683e17f2adb291ac564df4b33d7b1cb489dd9d8 add --hostname option to certmaster-request to allow specifying the CN for the cert --- diff --git a/scripts/certmaster-request b/scripts/certmaster-request index b40a66c..1d7df8c 100755 --- a/scripts/certmaster-request +++ b/scripts/certmaster-request @@ -16,8 +16,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import distutils.sysconfig +import optparse from certmaster import requester if __name__ == "__main__": - requester.request_cert() + parser = optparse.OptionParser() + + parser.add_option('--hostname', action="store", dest="hostname", + metavar="NAME", + help='hostname to use as the CN for the certificate') + + (opts, args) = parser.parse_args() + + requester.request_cert(hostname=opts.hostname)