diff options
author | Linus Nordberg <linus@nordu.net> | 2017-10-26 16:53:59 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-10-26 16:53:59 +0200 |
commit | 3d438903d01a166821f05bc1ca0e28a2021c8190 (patch) | |
tree | fb2db5080284618628ca2c51860bcbd3ba208ad8 | |
parent | 4525c721aa20873ea90fc6ea1a1dd5a376f172df (diff) |
Patch by Magnus Ahltorp from map/submission-fix.
-rwxr-xr-x | tools/submitcert.py | 4 |
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) |