{"record":{"id":"eaa7dbba2d83efd7","repo":"openai/codex","slug":"managed-mitm-ca-certificate-path-is-missing-a-file","errorCode":null,"errorMessage":"managed MITM CA certificate path is missing a file name","messagePattern":"managed MITM CA certificate path is missing a file name","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/certs.rs","lineNumber":530,"sourceCode":"    bundle.push_str(\"-----END CERTIFICATE-----\\n\");\n}\n\nfn persist_managed_ca_certificate(proxy_dir: &Path, cert_pem: &str) -> Result<PathBuf> {\n    let hash = Sha256::digest(cert_pem.as_bytes());\n    let cert_path = proxy_dir.join(format!(\"{MANAGED_MITM_CA_CERT_PREFIX}-{hash:x}.pem\"));\n    write_atomic_create_new_or_reuse(&cert_path, cert_pem.as_bytes(), /*mode*/ 0o644)\n        .with_context(|| {\n            format!(\n                \"failed to persist managed MITM CA certificate {}\",\n                cert_path.display()\n            )\n        })?;\n    Ok(cert_path)\n}\n\nfn lock_managed_ca_certificate(certificate_path: &Path) -> Result<File> {\n    let lock_path = managed_ca_certificate_lock_path(certificate_path)\n        .ok_or_else(|| anyhow!(\"managed MITM CA certificate path is missing a file name\"))?;\n    let file = open_managed_ca_lock(&lock_path)?;\n    file.lock_shared()\n        .with_context(|| format!(\"failed to lock {}\", lock_path.display()))?;\n    Ok(file)\n}\n\nfn lock_managed_ca_artifacts(proxy_dir: &Path) -> Result<File> {\n    let lock_path = proxy_dir.join(MANAGED_MITM_CA_ARTIFACT_LOCK);\n    let file = open_managed_ca_lock(&lock_path)?;\n    file.lock()\n        .with_context(|| format!(\"failed to lock {}\", lock_path.display()))?;\n    Ok(file)\n}\n\nfn managed_ca_certificate_lock_path(certificate_path: &Path) -> Option<PathBuf> {\n    let file_name = certificate_path.file_name()?.to_string_lossy();\n    Some(certificate_path.with_file_name(format!(\".{file_name}.lock\")))\n}","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/certs.rs#L512-L548","documentation":"Error \"managed MITM CA certificate path is missing a file name\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/certs.rs:530 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}