Skip to content

Commit 04ab574

Browse files
Merge pull request #337 from martin-neotech/4.0-security-class-removal
Removed security class, redundant
2 parents bdf6631 + 424ebfc commit 04ab574

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

neo4j/api.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -106,31 +106,6 @@ def __bool__(self):
106106
return bool(self.values)
107107

108108

109-
class Security:
110-
""" Container for security details.
111-
"""
112-
113-
verify_cert = True
114-
115-
@classmethod
116-
def default(cls):
117-
return cls()
118-
119-
def __init__(self, verify_cert=True):
120-
self.verify_cert = verify_cert
121-
122-
def to_ssl_context(self):
123-
# See https://docs.python.org/3.7/library/ssl.html#protocol-versions
124-
from ssl import SSLContext, PROTOCOL_TLS_CLIENT, OP_NO_TLSv1, OP_NO_TLSv1_1, CERT_REQUIRED
125-
ssl_context = SSLContext(PROTOCOL_TLS_CLIENT)
126-
ssl_context.options |= OP_NO_TLSv1
127-
ssl_context.options |= OP_NO_TLSv1_1
128-
if self.verify_cert:
129-
ssl_context.verify_mode = CERT_REQUIRED
130-
ssl_context.set_default_verify_paths()
131-
return ssl_context
132-
133-
134109
class ServerInfo:
135110

136111
address = None

0 commit comments

Comments
 (0)