Skip to content

Commit

Permalink
T6013: Remove trusted_user_ca_key when the configuration does not exist
Browse files Browse the repository at this point in the history
Co-authored-by: Simon <[email protected]>
  • Loading branch information
takehaya and sarthurdev committed Dec 21, 2024
1 parent 040b197 commit b8ef2d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/conf_mode/service_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def generate(ssh):
call(f'ssh-keygen -q -N "" -t ed25519 -f {key_ed25519}')

if 'trusted_user_ca_key' in ssh:
...
elif os.path.exists(trusted_user_ca_key):
os.unlink(trusted_user_ca_key)
ca_key_name = ssh['trusted_user_ca_key']['ca_certificate']
pki_ca_cert = ssh['pki']['ca'][ca_key_name]

Expand Down

0 comments on commit b8ef2d1

Please sign in to comment.