The integrity of the file can be verified by comparing a computed hash value when the file was originally created.
$ doas pkg_add gnupg $ gpg2 --verify $FILE.sig $FILE