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
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vincent Pelletier
caucase
Commits
9481466e
Commit
9481466e
authored
Jun 26, 2020
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
cbfcd37c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
caucase/http.py
caucase/http.py
+5
-0
caucase/http_wsgibase.py
caucase/http_wsgibase.py
+9
-0
No files found.
caucase/http.py
View file @
9481466e
...
@@ -313,6 +313,11 @@ def getSSLContext(
...
@@ -313,6 +313,11 @@ def getSSLContext(
for
x
in
cau
.
getCACertificateList
()
for
x
in
cau
.
getCACertificateList
()
)),
)),
)
)
# XXX: Should call SSL_{CTX_,}set_client_CA_list or
# SSL_{CTX_,}add_client_CA somehow, to specify CAU CA.
# Sadly, it does not seem to be exposed by python's ssl module.
# See https://tools.ietf.org/html/rfc5246#section-7.4.4 .
# https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_client_CA_list.html
http_cas_certificate_list
=
http_cas
.
getCACertificateList
()
http_cas_certificate_list
=
http_cas
.
getCACertificateList
()
threshold_delta
=
datetime
.
timedelta
(
threshold
,
0
)
threshold_delta
=
datetime
.
timedelta
(
threshold
,
0
)
exists
=
os
.
path
.
exists
(
server_key_path
)
exists
=
os
.
path
.
exists
(
server_key_path
)
...
...
caucase/http_wsgibase.py
View file @
9481466e
...
@@ -24,6 +24,8 @@ Base WSGI-related classes for caucase HTTP(S) server.
...
@@ -24,6 +24,8 @@ Base WSGI-related classes for caucase HTTP(S) server.
Separate from .http because of different-licensed code in the middle.
Separate from .http because of different-licensed code in the middle.
"""
"""
from
__future__
import
absolute_import
from
__future__
import
absolute_import
import
errno
import
socket
from
wsgiref.simple_server
import
ServerHandler
from
wsgiref.simple_server
import
ServerHandler
from
.utils
import
toBytes
from
.utils
import
toBytes
...
@@ -139,3 +141,10 @@ class CleanServerHandler(ServerHandler):
...
@@ -139,3 +141,10 @@ class CleanServerHandler(ServerHandler):
toBytes
(
self
.
http_version
),
toBytes
(
self
.
http_version
),
))
))
self
.
_flush
()
self
.
_flush
()
def
finish_response
(
self
):
try
:
ServerHandler
.
finish_response
(
self
)
except
socket
.
error
,
e
:
if
e
.
errno
!=
errno
.
EPIPE
:
raise
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