From a2e32089991f83151f069647c437c6a4c11b48c7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Aug 2019 12:31:46 +0100 Subject: [PATCH] Comments --- httpsig.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/httpsig.py b/httpsig.py index 12cd835d7..8ac2ef538 100644 --- a/httpsig.py +++ b/httpsig.py @@ -120,6 +120,9 @@ def createSignedHeader(privateKeyPem: str,nickname: str, \ return headers def verifyRecentSignature(signedDateStr: str) -> bool: + """Checks whether the given time taken from the header is within + 12 hours of the current time + """ currDate=datetime.datetime.utcnow() signedDate=datetime.datetime.strptime(signedDateStr,"%a, %d %b %Y %H:%M:%S %Z") # 12 hours tollerance