mirror of
https://github.com/adulau/crl-monitor.git
synced 2024-12-22 16:56:01 +00:00
ICSI data added in the JSON output
This commit is contained in:
parent
d2a4c8c6f4
commit
ab10d41c19
1 changed files with 10 additions and 2 deletions
|
@ -130,9 +130,15 @@ class FetchCertificateHandler(tornado.web.RequestHandler):
|
|||
try:
|
||||
r = redis.StrictRedis(host='127.0.0.1', port=8323)
|
||||
except:
|
||||
print "Unable to connect to the Redis server"
|
||||
print ("Unable to connect to the Redis server")
|
||||
sys.exit(255)
|
||||
|
||||
#ICSI data
|
||||
try:
|
||||
ricsi = redis.StrictRedis(host='localhost', port=6380, db=5)
|
||||
except:
|
||||
print ("Unable to connect to the Redis ICSI notary server")
|
||||
|
||||
fp = input.lower()
|
||||
if not checksha1(value=fp):
|
||||
self.clear()
|
||||
|
@ -163,7 +169,9 @@ class FetchCertificateHandler(tornado.web.RequestHandler):
|
|||
|
||||
for i in range(0, extcount):
|
||||
out['info']['extension'][cert.get_ext_at(i).get_name()] = cert.get_ext_at(i).get_value()
|
||||
|
||||
if ricsi.exists(fp):
|
||||
icsi = ricsi.hgetall(fp)
|
||||
out['icsi'] = icsi
|
||||
if not self._finished:
|
||||
self.set_header('Content-Type', 'application/json')
|
||||
self.set_header('Server', servername)
|
||||
|
|
Loading…
Reference in a new issue