Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
031ab976
Commit
031ab976
authored
Jul 18, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: SSL clients of servers with signed certs didn't load default
certs and were unable to connect.
parent
3c525909
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
CHANGES.rst
CHANGES.rst
+4
-0
src/ZEO/tests/testssl.py
src/ZEO/tests/testssl.py
+4
-0
src/ZEO/zconfig.py
src/ZEO/zconfig.py
+5
-1
No files found.
CHANGES.rst
View file @
031ab976
Changelog
Changelog
=========
=========
- Fixed: SSL clients of servers with signed certs didn't load default
certs and were unable to connect.
5.0.0a0 (2016-07-08)
5.0.0a0 (2016-07-08)
--------------------
--------------------
...
...
src/ZEO/tests/testssl.py
View file @
031ab976
...
@@ -195,6 +195,8 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -195,6 +195,8 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
factory
,
context
,
(
client_cert
,
client_key
,
None
),
factory
,
context
,
(
client_cert
,
client_key
,
None
),
check_hostname
=
True
)
check_hostname
=
True
)
context
.
load_default_certs
.
assert_called_with
()
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ZEO.ClientStorage.ClientStorage'
)
@
mock
.
patch
(
'ZEO.ClientStorage.ClientStorage'
)
def
test_ssl_mockiavellian_client_auth_dir
(
def
test_ssl_mockiavellian_client_auth_dir
(
...
@@ -210,6 +212,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -210,6 +212,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
capath
=
here
,
capath
=
here
,
check_hostname
=
True
,
check_hostname
=
True
,
)
)
context
.
load_default_certs
.
assert_not_called
()
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ZEO.ClientStorage.ClientStorage'
)
@
mock
.
patch
(
'ZEO.ClientStorage.ClientStorage'
)
...
@@ -226,6 +229,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -226,6 +229,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
cafile
=
server_cert
,
cafile
=
server_cert
,
check_hostname
=
True
,
check_hostname
=
True
,
)
)
context
.
load_default_certs
.
assert_not_called
()
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ZEO.ClientStorage.ClientStorage'
)
@
mock
.
patch
(
'ZEO.ClientStorage.ClientStorage'
)
...
...
src/ZEO/zconfig.py
View file @
031ab976
...
@@ -11,12 +11,16 @@ def ssl_config(section, server):
...
@@ -11,12 +11,16 @@ def ssl_config(section, server):
if
auth
:
if
auth
:
if
os
.
path
.
isdir
(
auth
):
if
os
.
path
.
isdir
(
auth
):
capath
=
auth
capath
=
auth
el
se
:
el
if
auth
!=
'DYNAMIC'
:
cafile
=
auth
cafile
=
auth
context
=
ssl
.
create_default_context
(
context
=
ssl
.
create_default_context
(
ssl
.
Purpose
.
CLIENT_AUTH
,
cafile
=
cafile
,
capath
=
capath
)
ssl
.
Purpose
.
CLIENT_AUTH
,
cafile
=
cafile
,
capath
=
capath
)
if
not
auth
:
assert
not
server
context
.
load_default_certs
()
if
section
.
certificate
:
if
section
.
certificate
:
password
=
section
.
password_function
password
=
section
.
password_function
if
password
:
if
password
:
...
...
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