code: def _init_ca(self):
          
          if not exists(path_join(self.ca_dir, 'ca.cnf')):
              with open(path_join(self.ca_dir, 'ca.cnf'), 'w') as fh:
                  fh.write(
                      CA_CONF_TEMPLATE % (self.get_conf_variables()))
  
          if not exists(path_join(self.ca_dir, 'signing.cnf')):
              with open(path_join(self.ca_dir, 'signing.cnf'), 'w') as fh:
                  fh.write(
                      SIGNING_CONF_TEMPLATE % (self.get_conf_variables()))
  
          if exists(self.ca_cert) or exists(self.ca_key):
              raise RuntimeError("Initialized called when CA already exists")
          cmd = ['openssl', 'req', '-config', self.ca_conf,
                 '-x509', '-nodes', '-newkey', 'rsa',
                 '-days', self.default_ca_expiry,
                 '-keyout', self.ca_key, '-out', self.ca_cert,
                 '-outform', 'PEM']
          output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
          log("CA Init:\n %s" % output, level=DEBUG)
docs: Generate the root ca's cert and key.