checkCertificate method

Future<void> checkCertificate()

Stops the start when the files of AppConfig.tls, or of a port of AppConfig.ports, are bad: it throws a TlsException. Dox().startServer() runs it once, before any isolate starts. Else each isolate fails on its own and is started again, in a loop. It does nothing when no port has tls.

Implementation

Future<void> checkCertificate() async {
  AppConfig config = Dox().config;
  config.tls?.check();
  for (PortConfig port in config.ports) {
    port.tls?.check();
  }
}