Skip to content

Commit

Permalink
Added some verification flags suggested by Julien Muchembled
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Jun 24, 2016
1 parent fdfc924 commit 5727c7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ZEO/zconfig.py
@@ -1,6 +1,7 @@
"""SSL configuration support
"""
import os
import sys

def ssl_config(section, server):
import ssl
Expand All @@ -26,6 +27,10 @@ def ssl_config(section, server):

context.verify_mode = ssl.CERT_REQUIRED

if sys.version_info >= (3, 4):
context.verify_flags |= ssl.VERIFY_X509_STRICT | (
context.cert_store_stats()['crl'] and ssl.VERIFY_CRL_CHECK_LEAF)

if server:
context.check_hostname = False
return context
Expand Down

0 comments on commit 5727c7a

Please sign in to comment.