mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-01 20:27:37 +03:00
add logging for ssl cert/key and cafile
This commit is contained in:
parent
fb904320d2
commit
00dac0c030
1 changed files with 2 additions and 0 deletions
|
@ -185,6 +185,7 @@ class ParallelHTTPSServer(ParallelHTTPServer):
|
|||
"(%s)" % (type_name, name, "server", source, filename,
|
||||
e)) from e
|
||||
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
||||
logger.info("SSL load files certificate='%s' key='%s'", certfile, keyfile)
|
||||
context.load_cert_chain(certfile=certfile, keyfile=keyfile)
|
||||
if protocol:
|
||||
logger.info("SSL set explicit protocol: '%s'", protocol)
|
||||
|
@ -204,6 +205,7 @@ class ParallelHTTPSServer(ParallelHTTPServer):
|
|||
cipherlist.append(entry["name"])
|
||||
logger.info("SSL accepted ciphers: %s", ' '.join(cipherlist))
|
||||
if cafile:
|
||||
logger.info("SSL enable mandatory client certificate verification using CA file='%s'", cafile)
|
||||
context.load_verify_locations(cafile=cafile)
|
||||
context.verify_mode = ssl.CERT_REQUIRED
|
||||
self.socket = context.wrap_socket(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue