mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-18 05:42:35 +00:00
cert_audit: Sort the outputs by not_valid_after date
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
parent
fe13bd3d0e
commit
0b4832bbf5
@ -487,11 +487,13 @@ def main():
|
|||||||
filter_func = lambda d: (start_date < d.not_valid_before) or \
|
filter_func = lambda d: (start_date < d.not_valid_before) or \
|
||||||
(d.not_valid_after < end_date)
|
(d.not_valid_after < end_date)
|
||||||
|
|
||||||
|
sortby_end = lambda d: d.not_valid_after
|
||||||
|
|
||||||
if args.all:
|
if args.all:
|
||||||
filter_func = None
|
filter_func = None
|
||||||
|
|
||||||
# filter and output the results
|
# filter and output the results
|
||||||
for d in filter(filter_func, audit_results):
|
for d in sorted(filter(filter_func, audit_results), key=sortby_end):
|
||||||
list_all(d)
|
list_all(d)
|
||||||
|
|
||||||
logger.debug("Done!")
|
logger.debug("Done!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user