I use GPG to encrypt a file in ASP.NET, C #. My code executes the command using ProcessStartInfo and gpg.exe is executing, but I have a problem. GPG asks me to allow always-trust with the "y" option. I also tried using "YES" (as suggested by the GPG, accepting "yes" for all questions), but that didn't work either.
The line that runs GPG:
"gpg --armor --output fileOutput.gpg --recipient secure@site.com --encrypt fileInput.xml --always-trust --yes"
The question arises:
I am NOT sure that the key belongs to the person specified in the User ID. If you really know what you are doing, you can answer the following question with yes
Use this key anyway?
How do I ignore a question or make the answer be true ("YES") without asking for confirmation?
Thanks.
iLevi source share