@lasso-ai/cli 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -282,12 +282,13 @@ function hostCertificateStatus() {
|
|
|
282
282
|
let trusted = false;
|
|
283
283
|
if (hasCertificate()) {
|
|
284
284
|
try {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
// Use openssl to check the issuer of the certificate
|
|
286
|
+
const result = (0, node_child_process_1.execFileSync)("openssl", ["x509", "-noout", "-issuer", "-in", exports.TLS_CERT_FILE], { encoding: "utf8" });
|
|
287
|
+
// mkcert certificates have "mkcert" in the issuer
|
|
288
|
+
trusted = result.toLowerCase().includes("mkcert");
|
|
288
289
|
}
|
|
289
290
|
catch {
|
|
290
|
-
// If
|
|
291
|
+
// If openssl fails, assume not trusted
|
|
291
292
|
}
|
|
292
293
|
}
|
|
293
294
|
return { present: hasCertificate(), certificate: exports.TLS_CERT_FILE, key: exports.TLS_KEY_FILE, trusted };
|
package/package.json
CHANGED