mirror of
https://github.com/certbot/certbot.git
synced 2026-04-26 08:39:19 -04:00
more logging including client IP address
This commit is contained in:
parent
8cda7066b4
commit
4a892b0e02
2 changed files with 6 additions and 1 deletions
|
|
@ -116,6 +116,7 @@ class session(object):
|
|||
def add_request(self, csr, names):
|
||||
sessions.hset(self.id, "csr", csr)
|
||||
for name in names: sessions.rpush(self.id + ":names", name)
|
||||
sessions.hset(self.id, "client-addr", web.ctx.ip)
|
||||
sessions.hset(self.id, "state", "makechallenge")
|
||||
sessions.lpush("pending-makechallenge", self.id)
|
||||
sessions.publish("requests", "makechallenge")
|
||||
|
|
|
|||
|
|
@ -125,7 +125,11 @@ def makechallenge(session):
|
|||
#
|
||||
# Make one challenge for each name. (This one-to-one relationship
|
||||
# is not an inherent protocol requirement!)
|
||||
for i, name in enumerate(r.lrange("%s:names" % session, 0, -1)):
|
||||
names = r.lrange("%s:names" % session, 0, -1)
|
||||
if debug: print "%s: new session (request complies with policy)" % session
|
||||
if debug: print "%s: from requesting client at %s" % r.hget(session, "client-addr")
|
||||
if debug: print "%s: for %d names: %s" % (session, len(names), ",".join(names))
|
||||
for i, name in enumerate(names):
|
||||
challenge = "%s:%d" % (session, i)
|
||||
r.hset(challenge, "challtime", int(time.time()))
|
||||
r.hset(challenge, "type", 0) # DomainValidateSNI
|
||||
|
|
|
|||
Loading…
Reference in a new issue