Source: https://swgbar.com/en/guides/certificate-pinning-mtls-swg-inspection-macos/
Language: en

# Why certificate-pinned apps & mTLS break under SWG inspection

Understand why apps using TLS certificate pinning or mutual TLS (mTLS) fail behind corporate SWG HTTPS break-and-inspect on macOS even when MDM trusts the root CA.

SWG bar · Updated November 18, 2026

Employees on MDM-managed Macs frequently notice that normal websites work seamlessly behind a corporate Secure Web Gateway (SWG), while specific desktop apps, security updaters, mobile SDKs, or developer APIs immediately fail TLS handshakes. In most cases, the culprit is **certificate pinning** or **mutual TLS (mTLS)** colliding with SWG **HTTPS/SSL break-and-inspect**.

## Why MDM root trust cannot fix certificate pinning

During normal HTTPS browsing, Safari and Chrome trust any valid certificate chain rooted in an authority inside **macOS Keychain**—including corporate root CAs pushed by MDM.

Apps that implement **TLS certificate pinning (HPKP / SPKI pinning)** go one step further: they embed the expected public key hash (SPKI) or leaf/intermediate certificate directly inside the application binary. When a corporate SWG terminates TLS and re-signs the certificate with its own enterprise root CA:

1.  macOS Keychain says the SWG certificate is valid.
2.  The pinned application compares the SWG certificate’s public key fingerprint against its built-in pin.
3.  The fingerprints do not match—so the application aborts the TLS handshake immediately to protect against man-in-the-middle interception.

## Why mutual TLS (mTLS) breaks during break-and-inspect

With **mutual TLS (mTLS)**, both sides authenticate: the client presents a client certificate to the origin server before access is granted (common in banking APIs, B2B endpoints, zero-trust APIs, and hardware-backed developer services).

If an SWG sits in the middle and terminates the TLS connection to decrypt HTTP payloads, the origin server sees the SWG’s connection rather than your Mac’s client TLS handshake—breaking end-to-end client-certificate validation unless the gateway acts purely as an encrypted pass-through or is excluded for that host.

## Diagnose which hostnames are intercepted on your Mac

Before asking IT for a gateway rule or configuring a local rule, identify the exact hostname the pinned or mTLS app contacts:

1.  Open [SWG bar](<https://swgbar.com/en/install/>) and reproduce the connection failure in your app.
2.  Check **SWG bar → Domains** (or run `swgbar domains list --status confirmed`) to find the exact API, CDN, or update hostname contacted by that app.
3.  Inspect the domain details and **Certificates** tab to confirm whether the corporate SWG root CA is terminating TLS for that host.

![SWG bar Certificates tab showing root CAs and associated domain counts; illustrative preview.](<https://swgbar.com/optimized/panel-native-certificates-four-tabs-720.webp>)

_Verify whether an app’s API or update hostname appears under an inspection CA cluster in SWG bar._

## Choose the appropriate resolution

*   **Production / managed corporate workflows**: Request a targeted **TLS inspection exception (do-not-decrypt rule)** from your IT or security administrator for the pinned or mTLS hostname so gateway routing stays intact without breaking TLS pinning. See [SWG bypass vs. TLS inspection exception](<https://swgbar.com/en/guides/swg-bypass-vs-tls-exception/>).
*   **Authorized local testing & development**: On networks you administer or are authorized to test, use [per-domain SWG bypass](<https://swgbar.com/en/guides/how-to-bypass-swg/>) from **Domains** or `swgbar bypass enable <domain>` so that specific hostname connects without gateway decryption.
*   **CLI & AI runtime CA store errors**: If the failure is not strict pinning, but rather `git`, `npm`, `Python`, `Claude Code`, or `Cursor` ignoring macOS Keychain, follow [Fix SWG TLS & SSL certificate errors in CLI and AI tools on a Mac](<https://swgbar.com/en/guides/swg-tls-certificate-errors-macos/>).

## Keep reading

*   [How to Bypass SWG on a Mac (One-Click Domain Bypass & CLI)](<https://swgbar.com/en/guides/how-to-bypass-swg/>)
*   [How to Bypass SSL Inspection on a Mac (Corporate SWG & Per-Domain Fix)](<https://swgbar.com/en/guides/bypass-ssl-inspection-mac/>)
*   [How to Bypass HTTPS & TLS Inspection on macOS (Break-and-Inspect Guide)](<https://swgbar.com/en/guides/bypass-https-tls-inspection-mac/>)
*   [How to Bypass Corporate Proxy & SWG SSL Inspection on a Mac](<https://swgbar.com/en/guides/bypass-corporate-proxy-ssl-inspection-mac/>)
*   [How to tell if your Mac is intercepted by an SWG (HTTPS & SSL inspection)](<https://swgbar.com/en/guides/detect-https-inspection/>)
*   [How to Check if Your Employer or Work Mac Is Intercepting HTTPS (SSL Inspection)](<https://swgbar.com/en/guides/check-if-work-mac-intercepting-https/>)
*   [SSL Inspection Checker for Mac: Menu Bar Tool to Detect HTTPS Interception](<https://swgbar.com/en/guides/ssl-inspection-checker-mac/>)
*   [Zscaler SSL Inspection on Mac: How to Check & Bypass per Domain](<https://swgbar.com/en/guides/zscaler-ssl-inspection-bypass-mac/>)
*   [Netskope SSL Inspection on Mac: Check Decryption & Bypass per Domain](<https://swgbar.com/en/guides/netskope-ssl-inspection-bypass-mac/>)
*   [Cloudflare WARP & Zero Trust TLS Inspection on Mac: Detect & Bypass](<https://swgbar.com/en/guides/cloudflare-warp-tls-inspection-mac/>)
*   [Confirmed vs. Suspected HTTPS inspection in SWG bar](<https://swgbar.com/en/guides/confirmed-vs-suspected-https-inspection/>)
*   [Inspect MITM root certificates & issuers in SWG bar](<https://swgbar.com/en/guides/inspect-mitm-root-certificates-macos/>)
*   [Enterprise SWG & MDM HTTPS inspection on a Mac](<https://swgbar.com/en/guides/enterprise-swg-https-inspection-macos/>)
*   [SWG bypass vs. TLS inspection exception (break and inspect)](<https://swgbar.com/en/guides/swg-bypass-vs-tls-exception/>)
*   [Bypass SWG for multi-domain web apps, SSO, CDNs & APIs on Mac](<https://swgbar.com/en/guides/multi-domain-sso-api-cdn-swg-bypass/>)
*   [Fix SWG bypass Recovering, Paused & connection errors on Mac](<https://swgbar.com/en/guides/troubleshoot-swg-bypass-recovering-paused-macos/>)
*   [macOS VPN virtual interfaces vs. SWG HTTPS inspection](<https://swgbar.com/en/guides/macos-vpn-virtual-interface-vs-swg-inspection/>)
*   [Fix SWG TLS & SSL certificate errors in CLI and AI tools on a Mac](<https://swgbar.com/en/guides/swg-tls-certificate-errors-macos/>)
*   [Homebrew, Docker, Python & Node.js CA trust behind an SWG on Mac](<https://swgbar.com/en/guides/homebrew-docker-python-node-ca-trust-swg-macos/>)
*   [Fix Claude Code & Cursor 'unable to get local issuer certificate' on Mac (SWG & MCP)](<https://swgbar.com/en/guides/ai-coding-agents-claude-code-cursor-swg-macos/>)
*   [Verify TLS certificates with openssl & security verify-cert on Mac](<https://swgbar.com/en/guides/verify-tls-certificates-openssl-security-verify-cert-macos/>)
*   [SWG bar permissions, local privacy & TLS probe limits](<https://swgbar.com/en/guides/macos-network-extension-privacy-probe-limits/>)
*   [How SWG bar checks HTTPS inspection](<https://swgbar.com/en/how-it-works/>)
*   [Download & install SWG bar for Mac (macOS 14+)](<https://swgbar.com/en/install/>)
*   [Chrome Extension to Detect SSL & HTTPS Inspection (SWG Bar Companion)](<https://swgbar.com/en/chrome-extension/>)
*   [SWG bar CLI Guide](<https://swgbar.com/en/cli/>)
*   [SWG bar MCP Guide](<https://swgbar.com/en/mcp/>)
*   [SWG bar release information](<https://swgbar.com/en/releases/>)
*   [About SWG bar](<https://swgbar.com/en/about/>)
