code: def gen_self_signed_cert(filepath, keyfile, days, silent=False):
      
      cmd = (
          'openssl req -x509 -new -nodes -key {} -days {} -out {} -subj "{}"'
      ).format(keyfile, days, filepath, SUBJECT)
      message = 'generate self signed certificate {} for {} days'.format(
          filepath, days)
      call_openssl(cmd, message, silent)
docs: generate self signed ssl certificate, i.e. a private CA certificate
      :param filepath: file path to the key file
      :param keyfile: file path to the private key
      :param days: valid duration for the certificate
      :param silent: whether to suppress output