summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2008-02-29 14:35:42 -0500
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2008-02-29 14:35:42 -0500
commitec7d7181700b0b394a1c22b508a57f76085fa916 (patch)
treeafc9489c069838b8089e4f9e41678c09ea232c30 /scripts
parent9fd0d907c5893780f2baab0e9733e4a00ce75e98 (diff)
downloadthird_party-func-ec7d7181700b0b394a1c22b508a57f76085fa916.tar.gz
third_party-func-ec7d7181700b0b394a1c22b508a57f76085fa916.tar.xz
third_party-func-ec7d7181700b0b394a1c22b508a57f76085fa916.zip
delete files, hopefully for real. These are certmaster stuff we dont need anymore
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/certmaster11
-rwxr-xr-xscripts/certmaster-ca92
2 files changed, 0 insertions, 103 deletions
diff --git a/scripts/certmaster b/scripts/certmaster
deleted file mode 100755
index d5f677d..0000000
--- a/scripts/certmaster
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/python
-
-from func import certmaster
-
-import sys
-
-if __name__ == "__main__":
- certmaster.main(sys.argv)
-
-
-
diff --git a/scripts/certmaster-ca b/scripts/certmaster-ca
deleted file mode 100755
index 0a73e6c..0000000
--- a/scripts/certmaster-ca
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/python -tt
-# sign/list keys
-# --sign hostname hostname hostname
-# --list # lists all csrs needing to be signed
-# --list-all ?
-# --clean? not sure what it will do
-
-import sys
-import glob
-import os
-
-import func
-import func.certs
-import func.certmaster
-
-
-
-from optparse import OptionParser
-
-def errorprint(stuff):
- print >> sys.stderr, stuff
-
-
-def parseargs(args):
- usage = 'certmaster-ca <option> [args]'
- parser = OptionParser(usage=usage)
-
- parser.add_option('-l', '--list', default=False, action="store_true",
- help='list signing requests remaining')
- parser.add_option('-s', '--sign', default=False, action="store_true",
- help='sign requests of hosts specified')
- parser.add_option('-c', '--clean', default=False, action="store_true",
- help="clean out all certs or csrs for the hosts specified")
-
- (opts, args) = parser.parse_args()
-
-
- if not opts.list and not opts.sign and not opts.clean:
- parser.print_help()
- sys.exit(1)
-
- return (opts, args)
-
-def main(args):
- if os.geteuid() != 0:
- errorprint('Must be root to run certmaster-ca')
- return 1
-
- cm = func.certmaster.CertMaster()
-
- (opts, args) = parseargs(args)
-
-
- if opts.list:
- hns = cm.get_csrs_waiting()
- if hns:
- for hn in cm.get_csrs_waiting():
- print hn
- else:
- print 'No certificates to sign'
-
- return 0
-
- if opts.sign:
- if not args:
- errorprint('Need hostnames to sign')
- return 1
-
- for hn in args:
- csrglob = '%s/%s.csr' % (cm.cfg.csrroot, hn)
- csrs = glob.glob(csrglob)
- if not csrs:
- errorprint('No match for %s to sign' % hn)
- return 1
-
- for fn in csrs:
- certfile = cm.sign_this_csr(fn)
- print '%s signed - cert located at %s' % (fn, certfile)
- return 0
-
- if opts.clean:
- if not args:
- errorprint('Need hostname(s) to clean up')
- return 1
-
- for hn in args:
- cm.remove_this_cert(hn)
-
- return 0
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv[1:]))