Skip to content

Commit

Permalink
Merge pull request #34 from hph86/fix-time-comparison
Browse files Browse the repository at this point in the history
src/rating - Use UTC time for comparison with x509 certs
  • Loading branch information
phibos committed Feb 11, 2016
2 parents 46b9d46 + 621ae50 commit 884b13a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sslscan/module/rating/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, **kwargs):
RatingRule(
"server.certificate.x509.not_after",
rules=[
lambda v, i, kb: 6 if v < datetime.now() else None
lambda v, i, kb: 6 if v < datetime.utcnow() else None
],
)
)
Expand All @@ -68,7 +68,7 @@ def __init__(self, **kwargs):
RatingRule(
"server.certificate.x509.not_before",
rules=[
lambda v, i, kb: 6 if v > datetime.now() else None
lambda v, i, kb: 6 if v > datetime.utcnow() else None
],
)
)
Expand Down
4 changes: 2 additions & 2 deletions sslscan/module/rating/ssllabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def __init__(self, **kwargs):
RatingRule(
"server.certificate.x509.not_after",
rules=[
lambda v, i, kb: 6 if v < datetime.now() else None
lambda v, i, kb: 6 if v < datetime.utcnow() else None
],
)
)
Expand All @@ -163,7 +163,7 @@ def __init__(self, **kwargs):
RatingRule(
"server.certificate.x509.not_before",
rules=[
lambda v, i, kb: 6 if v > datetime.now() else None
lambda v, i, kb: 6 if v > datetime.utcnow() else None
],
)
)
Expand Down

0 comments on commit 884b13a

Please sign in to comment.