The following error indicates that the certificate has been changed since it was last retrieved from the publisher.
pkg install: Certificate /tmp/ips.test.7149/0/image0/var/pkg/publisher/test/certs/0ce15c572961b7a0413b8390c90b7cac18ee9010 has been modified on disk. Its hash value is not what was expected.
The certificate at the provided path is used to verify the package being installed, but the hash of the contents on disk do not match what the signature action thought they should be.
The simple solution is to remove the certificate and allow pkg to download the certificate again.