Skip to content

Commit

Permalink
fix: raise error when SSL_CLIENT_CERT_FILE doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintShit committed Oct 22, 2023
1 parent 750b90a commit ba756b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def generate_ssl_files():
os.path.isfile(SSL_KEY_FILE))):
generate_ssl_files()

if not os.path.isfile(SSL_CLIENT_CERT_FILE):
logger.error("Client's certificate file specified on SSL_CLIENT_CERT_FILE is missing")
exit(0)

authenticator = SSLAuthenticator(keyfile=SSL_KEY_FILE,
certfile=SSL_CERT_FILE,
ca_certs=SSL_CLIENT_CERT_FILE)
Expand Down

0 comments on commit ba756b5

Please sign in to comment.