Skip to content

Commit

Permalink
fix: don't show a stack trace when a new key is offered #105
Browse files Browse the repository at this point in the history
  • Loading branch information
knrdl committed Jul 20, 2024
1 parent bf9de06 commit 37c24af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def valid_check(self) -> 'CaSettings':
if self.enabled:
if not self.encryption_key:
from cryptography.fernet import Fernet # pylint: disable=import-outside-toplevel
raise ValueError('Env Var ca_encryption_key is missing, use this freshly generated key: ' + Fernet.generate_key().decode())
print('Env Var ca_encryption_key is missing, use this freshly generated key: ' + Fernet.generate_key().decode())
exit(1)
if self.cert_lifetime.days < 1:
raise ValueError('Cert lifetime for internal CA must be at least one day, not: ' + str(self.cert_lifetime))
if self.crl_lifetime.days < 1:
Expand Down

0 comments on commit 37c24af

Please sign in to comment.