Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
caucase
Commits
37e6a4f7
Commit
37e6a4f7
authored
Jul 07, 2022
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caucase.http: Silence ssl.OP_NO_{SSL,TLS}* deprecation warning.
parent
5af60b32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
caucase/http.py
caucase/http.py
+8
-2
No files found.
caucase/http.py
View file @
37e6a4f7
...
...
@@ -279,6 +279,8 @@ def startServerThread(server):
server_thread
.
daemon
=
True
server_thread
.
start
()
TLSVersion
=
getattr
(
ssl
,
'TLSVersion'
,
None
)
def
getSSLContext
(
key_len
,
threshold
,
...
...
@@ -299,8 +301,12 @@ def getSSLContext(
# SSL is used for client authentication, and is only required for very few
# users on any given caucased. So make ssl_context even stricter than python
# does.
# No TLSv1 and TLSv1.1, leaving (currently) only TLSv1.2
ssl_context
.
options
|=
ssl
.
OP_NO_TLSv1
|
ssl
.
OP_NO_TLSv1_1
# No TLSv1 and TLSv1.1
if
TLSVersion
is
None
:
# pragma: no cover
# BBB: py<3.7
ssl_context
.
options
|=
ssl
.
OP_NO_TLSv1
|
ssl
.
OP_NO_TLSv1_1
else
:
# pragma: no cover
ssl_context
.
minimum_version
=
TLSVersion
.
TLSv1_2
# If a client wishes to use https for unauthenticated operations, that's
# fine too.
...
...
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