summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/submitcert.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/submitcert.py b/tools/submitcert.py
index 9d96148..cc483f1 100755
--- a/tools/submitcert.py
+++ b/tools/submitcert.py
@@ -26,6 +26,7 @@ parser.add_argument('baseurl', help="Base URL for CT server")
parser.add_argument('--store', default=None, metavar="dir", help='Get certificates from directory dir')
parser.add_argument('--sct-file', default=None, metavar="file", help='Store SCT:s in file')
parser.add_argument('--parallel', type=int, default=16, metavar="n", help="Number of parallel submits")
+parser.add_argument('--maxcerts', type=int, metavar="n", help="Maximum number of certificates to submit")
parser.add_argument('--check-sct', action='store_true', help="Check SCT signature")
parser.add_argument('--pre-warm', action='store_true', help="Wait 3 seconds after first submit")
parser.add_argument('--publickey', default=None, metavar="file", help='Public key for the CT log')
@@ -187,6 +188,9 @@ lastprinted = 0
print "listing certs"
ncerts = get_ncerts(certfiles)
+if args.maxcerts:
+ ncerts = min(ncerts, args.maxcerts)
+
print ncerts, "certs"
certs = itertools.islice(get_all_certificates(certfiles), ncerts)