From 70592bfdffc3eaba34360c5a41e76b05889b0b61 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Fri, 9 Nov 2012 11:54:53 -0800 Subject: [PATCH] and we've moved ancient out of daemon_common into policy --- server-ca/daemon_common.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/server-ca/daemon_common.py b/server-ca/daemon_common.py index 39746dc29..42c1f8e1d 100644 --- a/server-ca/daemon_common.py +++ b/server-ca/daemon_common.py @@ -20,21 +20,6 @@ def short(session): tmp = session.partition(":") return tmp[0][:12] + "..." + tmp[1] + tmp[2] -def ancient(session, state): - """Given that this session is in the specified named state, - decide whether the daemon should forcibly expire it for being too - old, even if no client request has caused the serve to mark the - session as expired. This is most relevant to truly abandoned - sessions that no client ever asks about.""" - age = int(time.time()) - int(r.hget(session, "created")) - if state == "makechallenge" and age > 120: - if debug: print "considered", short(session), "ancient" - return True - if state == "testchallenge" and age > 600: - if debug: print "considered", short(session), "ancient" - return True - return False - def random(): """Return 64 hex digits representing a new 32-byte random number.""" return binascii.hexlify(Random.get_random_bytes(32))