ignore expired certs
This commit is contained in:
parent
709a9808aa
commit
6a1b4b4857
|
@ -566,6 +566,7 @@ def query_common_name(common_name, args):
|
||||||
if common_name == "%" and not owner:
|
if common_name == "%" and not owner:
|
||||||
result = (
|
result = (
|
||||||
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
|
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
|
||||||
|
.filter(not_(Certificate.revoked))
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
elif common_name == "%":
|
elif common_name == "%":
|
||||||
|
@ -573,6 +574,7 @@ def query_common_name(common_name, args):
|
||||||
result = (
|
result = (
|
||||||
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
|
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
|
||||||
.filter(Certificate.owner == owner)
|
.filter(Certificate.owner == owner)
|
||||||
|
.filter(not_(Certificate.revoked))
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -581,6 +583,7 @@ def query_common_name(common_name, args):
|
||||||
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
|
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
|
||||||
.filter(Certificate.cn.like(common_name))
|
.filter(Certificate.cn.like(common_name))
|
||||||
.filter(Certificate.owner == owner)
|
.filter(Certificate.owner == owner)
|
||||||
|
.filter(not_(Certificate.revoked))
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue