Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bde2985f
Commit
bde2985f
authored
Sep 03, 2013
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python 2.6's ssl module has neither OPENSSL_VERSION_INFO nor _OPENSSL_API_VERSION
parent
8f65ef88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
Lib/test/test_ssl.py
Lib/test/test_ssl.py
+6
-15
No files found.
Lib/test/test_ssl.py
View file @
bde2985f
...
...
@@ -102,21 +102,12 @@ class BasicTests(unittest.TestCase):
((
'emailAddress'
,
'python-dev@python.org'
),))
self
.
assertEqual
(
p
[
'subject'
],
subject
)
self
.
assertEqual
(
p
[
'issuer'
],
subject
)
if
ssl
.
_OPENSSL_API_VERSION
>=
(
0
,
9
,
8
):
san
=
((
'DNS'
,
'altnull.python.org
\
x00
example.com'
),
(
'email'
,
'null@python.org
\
x00
user@example.org'
),
(
'URI'
,
'http://null.python.org
\
x00
http://example.org'
),
(
'IP Address'
,
'192.0.2.1'
),
(
'IP Address'
,
'2001:DB8:0:0:0:0:0:1
\
n
'
))
else
:
# OpenSSL 0.9.7 doesn't support IPv6 addresses in subjectAltName
san
=
((
'DNS'
,
'altnull.python.org
\
x00
example.com'
),
(
'email'
,
'null@python.org
\
x00
user@example.org'
),
(
'URI'
,
'http://null.python.org
\
x00
http://example.org'
),
(
'IP Address'
,
'192.0.2.1'
),
(
'IP Address'
,
'<invalid>'
))
self
.
assertEqual
(
p
[
'subjectAltName'
],
san
)
san
=
((
'DNS'
,
'altnull.python.org
\
x00
example.com'
),
(
'email'
,
'null@python.org
\
x00
user@example.org'
),
(
'URI'
,
'http://null.python.org
\
x00
http://example.org'
),
(
'IP Address'
,
'192.0.2.1'
))
self
.
assertEqual
(
p
[
'subjectAltName'
][:
4
],
san
)
def
test_DER_to_PEM
(
self
):
with
open
(
SVN_PYTHON_ORG_ROOT_CERT
,
'r'
)
as
f
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment