mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-06 20:10:56 +00:00
Add ssl protocol and ciphers in config
This commit is contained in:
parent
f253b23a67
commit
d765544edd
3 changed files with 10 additions and 3 deletions
|
@ -98,7 +98,9 @@ class HTTPSServer(HTTPServer):
|
|||
server_side=True,
|
||||
certfile=config.get("server", "certificate"),
|
||||
keyfile=config.get("server", "key"),
|
||||
ssl_version=ssl.PROTOCOL_SSLv23)
|
||||
ssl_version=getattr(ssl, config.get("server", "protocol"),
|
||||
ssl.PROTOCOL_SSLv23),
|
||||
ciphers=config.get("server", "ciphers"))
|
||||
|
||||
self.server_bind()
|
||||
self.server_activate()
|
||||
|
@ -271,8 +273,7 @@ class Application(object):
|
|||
authorization = environ.get("HTTP_AUTHORIZATION", None)
|
||||
|
||||
if authorization:
|
||||
authorization = \
|
||||
authorization.decode("ascii").lstrip("Basic").strip()
|
||||
authorization = authorization.lstrip("Basic").strip()
|
||||
user, password = self.decode(base64.b64decode(
|
||||
authorization.encode("ascii")), environ).split(":", 1)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue