This development is motivated by the need to bring more flexibility in the build system: veriexec no longer needs to embed its CA store in its source code.
The CA store can then be stored in a separate tarball, which must contain two files:
- "trust.pem": the list of trusted certificates ;
- "forbidden.pem": the list of revoked certificates, which may be empty.
The tarball must be verified by mac_veriexec, or else will not be opened. The tarball is further extracted in memory (and not on the filesystem) so the extracted CAs cannot be tampered with.
The loaded certificates are added to the list of embedded certificates. Then the call to ve_trust_init will load all certificates (embedded and from the tarball) into its crypto engine.
A new option 'a' is introduced to specify the path of the tarball. The default path is "/etc/veriexec/anchors.txz".
If the option is not set and that the default tarball does not exist, then veriexec continues normally and will attempt to load its CA store from its source code.
If the option is set or if the tarball exists then any error while reading the tarball will cause the program to stop.