From 2ba8296843fc83256e3e13a23529a915d73a2e2d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 27 Feb 2012 15:21:05 +1300 Subject: Better certificate parsing. --- libmproxy/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libmproxy') diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 3381ad33..57a9e983 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -513,7 +513,7 @@ def get_remote_cn(host, port): CNRE = re.compile( r""" - Subject:.*CN=(\S*) + Subject:.*CN=([^ \t\n\r\f\v/]*) """, re.VERBOSE|re.MULTILINE ) @@ -524,8 +524,6 @@ SANRE = re.compile( """, re.VERBOSE|re.MULTILINE ) - - def parse_text_cert(txt): """ Returns a (common name, [subject alternative names]) tuple. -- cgit v1.2.3