diegosouzapw/OmniRoute · error · Error

Unable to compute certificate fingerprint for ${certPath}

Error message

Unable to compute certificate fingerprint for ${certPath}

What it means

Error "Unable to compute certificate fingerprint for ${certPath}" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/mitm/cert/install.ts:111

        env: {
          ...process.env,
          CERT_NAME: "OmniRoute MITM Root CA",
          CERT_PATH: certPath || "",
          ACTION: action,
        },
      },
      () => resolve()
    );
  });
}

// Get SHA1 fingerprint from cert file using Node.js crypto
function getCertFingerprint(certPath: string): string {
  const pem = fs.readFileSync(certPath, "utf-8");
  const der = Buffer.from(pem.replace(/-----[^-]+-----/g, "").replace(/\s/g, ""), "base64");
  const pairs = crypto.createHash("sha1").update(der).digest("hex").toUpperCase().match(/.{2}/g);
  if (!pairs) {
    throw new Error(`Unable to compute certificate fingerprint for ${certPath}`);
  }
  return pairs.join(":");
}

/**
 * Check if certificate is already installed in system store
 */
export async function checkCertInstalled(certPath: string): Promise<boolean> {
  if (IS_WIN) return checkCertInstalledWindows(certPath);
  if (IS_MAC) return checkCertInstalledMac(certPath);
  return checkCertInstalledLinux(certPath);
}

/**
 * macOS `security find-certificate -a -Z` prints the SHA-1 as a colon-less
 * hex string (e.g. `SHA-1 hash: ABCDEF…`), while {@link getCertFingerprint}
 * returns a colon-separated one (`AB:CD:EF…`). A raw substring check therefore
 * never matched and the cert was reported as not-installed on every run,

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/mitm/cert/install.ts:111 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/de940dd881e32c3c. Report an issue: GitHub.