Apple Code Signing¶
The apple-codesign
Rust crate and its corresponding rcodesign
CLI
tool implement code signing for Apple platforms.
We believe this crate provides the most comprehensive implementation of Apple code signing outside the canonical Apple tools. We have support for the following features:
Signing Mach-O binaries (the executable file format on Apple operating systems).
Signing, notarizing, and stapling directory bundles (e.g.
.app
directories).Signing, notarizing, and stapling XAR archives /
.pkg
installers.Signing, notarizing, and stapling disk images /
.dmg
files.
What this all means is that you can sign, notarize, and release Apple software from Linux and Windows without needing access to proprietary Apple software!
Other features include:
Built-in support for using smart cards (e.g. YubiKeys) for signing and key/certificate management.
A remote signing mode that enables you to delegate just the low-level cryptographic signature generation to a remote machine. This allows you to do things like have a CI job initiate signing but use a YubiKey on a remote machine to create cryptographic signatures. See Remote Code Signing for more.
Certificate Signing Request (CSR) support to enable arbitrary private keys (including those generated on smart card devices) to be easily exchanged for Apple-issued code signing certificates.
Support for dumping and diffing data structures related to code signatures.
Awareness of Apple’s public PKI infrastructure, including CA certificates and custom X.509 extensions and OIDs used by Apple.
Documentation and code that are likely a treasure trove for others wanting to play with Apple code signing.
The canonical home of this project is https://github.com/indygreg/PyOxidizer/tree/main/apple-codesign. While this project is developed inside a larger monorepository, it is designed to be used as a standalone project.
- Getting Started
- Using
rcodesign
- Managing Code Signing Certificates
- Smart Card Support
- Concepts
- Known Issues and Limitations
- How to Debug and Report Problems
- Remote Code Signing
- Remote Code Signing Protocol
- Remote Code Signing Design and Security Considerations
- A Primer on Gatekeeper
- Selectively Bypassing Gatekeeper with Custom Assessment Policies