verifying detached signitures using stdin
damon at enlighten.co.nz
Tue Jan 21 23:27:02 CET 2003
I've been extending a .NET wrapper that I found for pgp. It's quite a
nice wrapper because it uses stdin, stdout and stderr and uses no temp
files. It lacked the ability to create detached signatures and to verify
them so I decided to add those functions in.
Creating the detached signatures was fine but verifying them proved to
be a bit problematic because you need to pass the data to stdin twice
when you run the command like this:
gpg --armor --verify - -
I can do it fine when using the console and going ^Z after each input
but I can't seem to simulate the same thing in my program because I
believe ^Z is closing stdin and once I close it I can't re open it.
I did some searching on google and found a post to this group about the
exact same thing and an answer to it.
The original post and the answer are below:
The answer that seemed to work for the original poster is below:
gpg --enable-special-filenames --verify - '-&5' <sig 5<data
The only thing is I'm not sure how to implement the below answer, and if
it will work with the windows version of pgp.
More information about the Gnupg-devel