summaryrefslogtreecommitdiff
path: root/monitor/josef_reader.py
diff options
context:
space:
mode:
authorJosef Gustafsson <josef.gson@gmail.com>2015-09-22 09:11:30 +0200
committerJosef Gustafsson <josef.gson@gmail.com>2015-09-22 09:11:30 +0200
commit95ff3d4fcd68e238667d12a9038af87d47d022b8 (patch)
treef8bde9086ae4d1b6af6618a32638a3d04b8d4075 /monitor/josef_reader.py
parent4f3be5f797b16519c69fa2e34f999941bd6ce821 (diff)
adding issuer filter to reader
Diffstat (limited to 'monitor/josef_reader.py')
-rwxr-xr-xmonitor/josef_reader.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/monitor/josef_reader.py b/monitor/josef_reader.py
index 1906587..1a1bdec 100755
--- a/monitor/josef_reader.py
+++ b/monitor/josef_reader.py
@@ -138,6 +138,12 @@ def db_monitor_domain(domain, log=None, exclude_invalid=None, get_cert=None):
else:
success = False
+ if issuer:
+ if issuer in entry["issuer"]:
+ pass:
+ else:
+ success = False
+
if cur_time > not_after_time:
valid = False
expired = True
@@ -178,11 +184,11 @@ def db_monitor_domain(domain, log=None, exclude_invalid=None, get_cert=None):
res.append(me)
- # print str(count_all) + " matches found. " \
- # + str(count_valid) + " valid, " \
- # + str(count_expired) + " expired and " \
- # + str(count_not_yet_valid) + " not yet valid for " \
- # + domain
+ print str(count_all) + " matches found. " \
+ + str(count_valid) + " valid, " \
+ + str(count_expired) + " expired and " \
+ + str(count_not_yet_valid) + " not yet valid for " \
+ + domain
return res
if __name__ == "__main__":
@@ -190,6 +196,7 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser(description="")
parser.add_argument('--domain', default=None)
parser.add_argument('--log', default=None)
+ parser.add_argument('--issuer', default=None)
parser.add_argument('--exclude-invalid', action='store_true')
parser.add_argument('--get-cert', action='store_true')