add --hostname option to certmaster-request to allow specifying the CN for the cert
authorHans Lellelid <hans@velum.net>
Mon, 23 May 2011 19:34:35 +0000 (15:34 -0400)
committerSeth Vidal <skvidal@fedoraproject.org>
Mon, 23 May 2011 19:34:35 +0000 (15:34 -0400)
scripts/certmaster-request

index b40a66c..1d7df8c 100755 (executable)
@@ -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)