Skip to content

Commit

Permalink
Use system generated cert after TNC has been revoked
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Jan 15, 2025
1 parent aa3b74a commit 6ac440b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,16 @@ async def unset_registration_details(self):
if creds is None:
return

# If we have a cert set, we will try to revoke it
# If we have a cert set, we will try to revoke it and also update system to use system cert
if config['certificate']:
logger.debug('Setting up self generated cert for UI')
await self.middleware.call('certificate.setup_self_signed_cert_for_ui')
logger.debug('Restarting nginx to consume self generated cert')
await self.middleware.call('system.general.ui_restart', 2)
logger.debug('Revoking existing TNC cert')
await self.middleware.call('tn_connect.acme.revoke_cert')

logger.debug('Revoking TNC user account')
# We need to revoke the user account now
response = await self._call(
get_account_service_url(config).format(**creds), 'delete', headers=await self.auth_headers(config),
Expand Down

0 comments on commit 6ac440b

Please sign in to comment.