[signing] tells Bach which program signs your setup files, so bach build --sign can do it instead of you running a signing tool by hand. Without this section nothing is signed, and a plain bach build never signs.
bach.toml
When it runs
Signing runs only when you ask for it:bach.toml that came from somewhere else can name any program, so building it must not run that program behind your back. Without --sign, a build with [signing] says so and leaves the files unsigned. --sign without a [signing] section is an error.
With --sign, Bach signs every setup file it writes (the offline installer, the online installer and an update patch) before it writes the update feed, so the feed already carries the signed file’s SHA-256.
What Bach prints and checks
Bach prints the command before it runs it.{env:NAME} is shown as written, never as its value, so a log does not hold your secrets. A signer that fails fails the build with its exit code. A program that cannot be started is reported with its name.
With this section, bach check and bach build also warn when programs or libraries inside the setup file are not signed, for example 1 of the 2 programs and libraries in the setup file aren't signed (helper.exe). Signing the setup file does not sign them, and Smart App Control can block an unsigned program once it is installed. Sign them in your own build, before Bach packs them.
The installed uninstall.exe stays unsigned: it is written on the user’s computer from the signed setup file, and a signature only covers the exact file it was made for. See Signing.
bach.toml
bach doctor says whether [signing] is set. The signer has to exist on the machine that builds. On macOS or Linux, use a signer that runs there, for example osslsigncode.