To verify if file is signed correctly we use command:
gpg --verify <file_name>
and the output shows if file is signed correctly. And if it is, then signer name is shown. But is there possibility to specify in command line argument which user I expect to have signed that file?
I am invoking that command from Java and now I get exit code 0 from GPG whichever user have signed that file. I would like to specify which user I expect so GPG would return non-zero code when file was signed by other user. I know that I can compare GPG command output with my username, but I would like to know if I can check that on GPG command level.
I've looked into documentation, but I did not see that there.