X-Git-Url: https://pwan.org/git/?p=certmaster.git;a=blobdiff_plain;f=scripts%2Fcertmaster-request;h=4c144431807eb421cc1c61dd29d3cc6185d33c3f;hp=3d807bdb511e121b5a025ec09c36a47a87e98fd9;hb=1b1b6f5733d65cbb73f48ac9b4419aba3dc00eee;hpb=8f2ff4d7c902d534d68ff1a16418b7be492033bf diff --git a/scripts/certmaster-request b/scripts/certmaster-request index 3d807bd..4c14443 100755 --- a/scripts/certmaster-request +++ b/scripts/certmaster-request @@ -1,10 +1,36 @@ #!/usr/bin/python +""" +Application to request a cert from a certmaster. +Takes no arguments, uses /etc/certmaster/minion.conf + +Copyright 2008, Red Hat, Inc +Michael DeHaan + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +""" -import sys import distutils.sysconfig +import optparse -from func.minion import server +from certmaster import requester if __name__ == "__main__": - server.main(sys.argv) + parser = optparse.OptionParser() + + parser.add_option('--hostname', action="store", dest="hostname", + metavar="NAME", + help='hostname to use as the CN for the certificate') + + parser.add_option('--ca', action="store", dest="ca", default='', + metavar="CA", + help='certificate authority used to sign the certificate') + + (opts, args) = parser.parse_args() + + requester.request_cert(hostname=opts.hostname, ca=opts.ca)