Verified Commit b76208bf authored by Martin Petráček's avatar Martin Petráček
Browse files fix error for self-signed certificates (missing CN)

parent 0e98bfa5
......@@ -53,9 +53,8 @@ def handle_tls(data, c):
if 'sni' in data['tls'].keys():
hostname = data['tls']['sni']
elif 'subject' in data['tls'].keys():
hostname = data['tls']['subject']
#get only CN from suject
m ='(?<=CN=)[^,]*', hostname)
m ='(?<=CN=)[^,]*', data['tls']['subject'])
if m:
hostname =
if not hostname:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment