CACHelp

Set up CAC on macOS

macOS reads a CAC with no middleware at all — the work is installing the DoD roots and explicitly trusting them. ~15 min · 6 steps.

Stuck on a specific error? Describe it to the AI assistant for a tailored fix — or check our error code reference.

How CAC works on macOS

macOS has shipped its own PIV smart card driver since macOS 10.12 Sierra, when Apple's CryptoTokenKit plug-in replaced the old tokend mechanism. Apple's current deployment documentation describes the supported baseline as macOS 10.15 or later. Either way the practical consequence is the same: on any Mac you are likely to be using, a CAC reader needs no third-party middleware, no ActivClient equivalent, and no purchased software.

That makes the actual work much narrower than most guides suggest. The card and reader almost always just work. What does not happen automatically is trust: DoD roots are private roots that Apple does not ship in its trust store, so importing them is not enough — you have to explicitly mark them trusted. Nearly every 'my CAC reads but the site rejects me' report on macOS is this one missing step.

The second thing worth knowing up front is that you cannot see your card in Keychain Access. Since High Sierra, CryptoTokenKit tokens are not displayed as a keychain in the GUI and do not show up in 'security find-identity'. This is expected behaviour, not a fault, and it sends a lot of people down a pointless troubleshooting path. Use the command line to confirm the card is seen.

A note on the middleware people still recommend: Thursby's PKard for Mac is end-of-life. Thursby was acquired by Identiv in 2018, that business was sold to Vitaprotech in 2024 and rebranded Hirsch, and thursby.com now redirects there. The surviving 'Legacy PKard for Mac' listing supports macOS 10.5 through 10.14 only — explicitly not Catalina or newer. Do not buy it; on a modern Mac it would replace something the OS already does.

What you need

  • A USB CCID reader — macOS bundles the standard CCID driver, so class-compliant readers work without installing anything. Plug into a port on the Mac rather than a chain of hubs and adapters while you are first testing.
  • An admin account — Installing into the System keychain and changing trust settings both require an administrator password. On Big Sur and later, changing admin-domain trust prompts for a password even when you are already running as root.
  • The DoD PKI certificate bundle — A ZIP of PKCS#7 archives from DISA. There is no macOS installer package — see the note in the steps below, because this is the single most common inaccuracy in other macOS CAC guides.

Steps

  1. 1

    Plug in the reader and confirm macOS sees it

    Plug the reader in and insert your CAC. Then run 'system_profiler SPSmartCardsDataType' in Terminal. This is the single best 'is my card seen?' command: it lists readers, reader drivers, token drivers, and the certificates on the card. 'sudo security list-smartcards' is a quicker check that prints token IDs such as com.apple.CryptoTokenKit.pivtoken:XXXXXX.

    • Do not look in Keychain Access to confirm the card. Since High Sierra, smart card tokens are not shown there and 'security find-identity' will not list them either. An empty Keychain Access is not evidence of a problem.
    • If macOS prompts you to pair the card with your user account, you can dismiss it. Apple documents that an unpaired card still works for websites — pairing only matters if you want to log in to the Mac itself with the card.
  2. 2

    Download the DoD certificate bundle

    Get the PKCS#7 bundle from DISA's PKI/PKE tools page on cyber.mil. The file is unclass-certificates_pkcs7_DoD.zip and contains the DER and PEM .p7b archives plus individual files for DoD Root CA 3, 4, 5 and 6, along with a signed SHA-256 manifest and a README.

    • There is no DISA-provided .pkg, .dmg or 'AllCerts for macOS' installer. Guides that tell you to run a macOS installer package are describing something that does not exist.
    • InstallRoot, the DoD tool that automates this on Windows, is Windows-only — there is no Mac build.
    • DISA's own tools page still lists a 'Mac OS Smartcard Services Installers' link pointing at macosforge.org. That project is long dead and the link does not resolve; ignore it.
  3. 3

    Install the roots into the System keychain

    Double-click each certificate to open it in Keychain Access and install into the System keychain rather than login, so the certificates apply to every user on the Mac. From the command line the equivalent, which also sets trust in the same operation, is: sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain DoD_Root_CA_3.cer

    • The login keychain works but only for the account that installed the certificates, which causes confusing results on shared machines.
    • If you prefer the GUI, install first and set trust in the next step — importing alone does not establish trust.
  4. 4

    Explicitly trust each DoD root

    In Keychain Access, find each DoD Root CA, right-click → Get Info → Trust, and set 'When using this certificate' to 'Always Trust'. This step is mandatory. DoD roots are private roots that are not in Apple's trust store, and simply importing them into the System keychain does not mark them trusted. If you used the add-trusted-cert command above, this is already done.

    • Symptom when this is skipped: the card reads correctly, 'system_profiler SPSmartCardsDataType' shows your certificates, and the .mil site still rejects you.
    • If authentication breaks right after a macOS major upgrade, re-check these trust settings before anything else.
  5. 5

    Use Safari, Chrome or Firefox

    Safari works natively — CryptoTokenKit publishes the card's identities to the Keychain layer and Safari picks them up. Chrome on macOS also works, because it uses the platform Security and Keychain APIs for client certificates. Firefox ships a module called osclientcerts that pulls client certificates from the OS store, enabled by default since Firefox 90, so it generally works without loading OpenSC.

    • The widely repeated claim that Chrome on macOS is unreliable for CAC dates from the pre-10.15 tokend era. Residual failures such as ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED are card or reader-driver level, not Chrome-specific.
    • Firefox has a separate pref for server trust: reading the DoD roots out of the System keychain requires security.enterprise_roots.enabled. That is not the same setting as osclientcerts, and confusing the two is common.
    • If the built-in Firefox module fails, loading OpenSC's PKCS#11 module from /Library/OpenSC/lib/ is the fallback that federal PIV guidance still documents.
  6. 6

    Insert the CAC and authenticate

    Browse to a .mil site, choose the right certificate when prompted, and enter your PIN. Pick EMAIL for webmail, IDENTITY or AUTH for general sign-on, and SIGNATURE for signing PDFs.

    • If you have just been issued a replacement CAC and macOS keeps offering the old certificates, see the stale token cache entry under Common problems.

Verify it worked

  • system_profiler SPSmartCardsDataType — Your reader is listed along with the token driver and the certificates present on the inserted card.
  • sudo security list-smartcards — At least one token ID of the form com.apple.CryptoTokenKit.pivtoken:XXXXXX. No output means the card is not being read at all — a hardware, reader or seating problem rather than a trust problem.
  • Open a .mil site in Safari — A certificate chooser appears, then a PIN prompt. If you get a TLS or certificate error instead, trust on the DoD roots is the thing to check.

Common problems

Card reads fine but the site still rejects me

Trust is not set. Importing a DoD root into the System keychain does not make it trusted, because these are private roots Apple does not ship. Open Keychain Access → the root → Get Info → Trust → 'Always Trust', or use 'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain'.

My CAC does not appear in Keychain Access

Expected behaviour, not a fault. Since High Sierra, CryptoTokenKit tokens are not shown in Keychain Access and 'security find-identity' will not list them. Confirm the card with 'system_profiler SPSmartCardsDataType' or 'sudo security list-smartcards' instead.

macOS keeps asking to pair the card with my account

You can simply dismiss it — Apple documents that an unpaired card still works for websites; pairing only enables logging in to the Mac with the card. To stop the prompt permanently: sudo defaults write /Library/Preferences/com.apple.security.smartcard UserPairing -bool false. For the current session, 'sc_auth pairing_ui -s disable' does the same.

New or reissued CAC still presents the old certificates

macOS caches per-card token state under /var/db/TokenCache/tokens/. With the card removed, clearing that directory and reinserting is the usual fix. Note this is long-standing community practice rather than an Apple-documented procedure, so treat it as a last resort.

Told to buy Thursby PKard for Mac

Do not. PKard for Mac is end-of-life: the surviving 'Legacy PKard for Mac' listing under Hirsch covers macOS 10.5 through 10.14 only and explicitly not Catalina or later. On a modern Mac it would duplicate functionality already built into the OS.

Chrome will not offer the certificate

Chrome on macOS does work with CAC via the platform Keychain APIs; the 'Chrome is unreliable' advice is from the pre-10.15 era. Confirm trust is set, quit Chrome fully and reopen. Persistent ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED points at the card or reader driver rather than the browser.

A specific reader misbehaves

macOS has two CCID drivers. Forcing the bundled ifd-ccid driver sometimes helps, particularly with NFC readers or large APDUs: sudo defaults write /Library/Preferences/com.apple.security.smartcard useIFDCCID -bool yes

Frequently asked questions

Do I need ActivClient, PKard or any other middleware on a Mac?

No. Apple's built-in CryptoTokenKit PIV driver has handled smart cards since macOS 10.12 Sierra, and Apple documents native support without additional software on 10.15 and later. PKard for Mac is in any case end-of-life and limited to macOS 10.14 and earlier.

Is there a DoD-provided macOS installer for the certificates?

No, and this is the most common error in other macOS CAC guides. DISA publishes PKCS#7 ZIP archives and the Windows-only InstallRoot tool. There is no .pkg or .dmg for macOS, so the certificates are installed manually through Keychain Access or the security command.

Why can't I see my CAC in Keychain Access?

Because macOS stopped showing smart card tokens there after Sierra. The card is almost certainly working. Use 'system_profiler SPSmartCardsDataType' to list the reader and the certificates on the card, or 'sudo security list-smartcards' for the token ID.

Should I pair my card when macOS asks?

Only if you want to log in to the Mac itself with the CAC. Apple states that a user who does not pair can still use the card to access websites. For ordinary webmail and .mil browsing, dismiss the prompt — or disable it with the UserPairing default.

Which browser should I use?

Safari is the least trouble, but Chrome and Firefox both work on current macOS. Chrome uses the platform Keychain APIs; Firefox uses its built-in osclientcerts module, on by default since Firefox 90. The older advice to avoid Chrome on Mac is stale.

Which DoD roots do I actually need?

The current bundle ships individual files for DoD Root CA 3, 4, 5 and 6, and installing the whole set is simplest. Installing a single root is a common cause of intermittent failures, because different .mil services chain to different roots.

Can I unlock FileVault or log in to macOS with my CAC?

On Apple silicon running macOS 11 or later, yes — smart cards are supported at the FileVault pre-boot screen, managed with 'sc_auth filevault'. Intel Macs with the T2 chip do not get this. Much of the published guidance on the subject predates Apple silicon and is no longer accurate.

Official sources

Other platforms