Skip to content

Commit 64dc18d

Browse files
committed
Fix to subject alt name class variable to make byte type for correct
matching for Python 3.
1 parent 5794d65 commit 64dc18d

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.pydevproject

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?eclipse-pydev version="1.0"?><pydev_project>
3-
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">ndg-httpsclient-py3</pydev_property>
3+
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">ndg-httpsclient-py3.6</pydev_property>
44
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
55
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
66
<path>/ndg_httpsclient</path>

ndg/httpsclient/ssl_peer_verification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ServerSSLCertVerification(object):
4040
'domainComponent': 'DC',
4141
'userid': 'UID'
4242
}
43-
SUBJ_ALT_NAME_EXT_NAME = 'subjectAltName'
43+
SUBJ_ALT_NAME_EXT_NAME = b'subjectAltName'
4444
PARSER_RE_STR = '/(%s)=' % '|'.join(list(DN_LUT.keys()) + \
4545
list(DN_LUT.values()))
4646
PARSER_RE = re.compile(PARSER_RE_STR)

ndg/httpsclient/subj_alt_name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Pyasn1ImportError(ImportError):
2525
raise Pyasn1ImportError(import_error_msg)
2626

2727

28-
MAX = 64
28+
MAX = 1024
2929

3030

3131
class DirectoryString(univ.Choice):

ndg/httpsclient/test/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ class Constants(object):
2020
HOSTNAME = 'localhost'
2121
TEST_URI = 'https://%s:%d' % (HOSTNAME, PORT)
2222
TEST_URI2 = 'https://%s:%d' % (HOSTNAME, PORT2)
23-
23+
# TEST_URI = 'https://pypi.org'
24+
# TEST_URI2 = 'https://www.google.co.uk'
25+
2426
UNITTEST_DIR = os.path.dirname(os.path.abspath(__file__))
2527
CACERT_DIR = os.path.join(UNITTEST_DIR, 'pki', 'ca')
2628
SSL_CERT_FILENAME = 'localhost.crt'

0 commit comments

Comments
 (0)