Redirected I/O with GnuPG?
Robert J. Hansen
rjh at sixdemonbag.org
Mon Jun 13 11:35:44 CEST 2005
I'm hitting a stumbling block trying to write a small snippet of C#
which fetches information about cipher preferences. Since I've not been
able to find information about the keyring file format, I'm falling back
to using GnuPG to do the keyring parsing. This is a suboptimal
solution, but it'll do for reasonably small keyrings.
The problem is that for some reason I'm entirely unable to read in
anything from GnuPG's output. I'm invoking GnuPG as:
gpg --command-fd 0 --status-fd 2 --no-tty --edit-key <keyID>
While I'm able to receive status messages on standard error, any attempt
to read any amount of data from standard output will block indefinitely.
This is not a Windows-specific problem: I've tried under Win32, OS X and
Linux.
Is there some magic command-line flag I'm missing here? Has anyone had
similar experiences writing code which invokes GnuPG?
More information about the Gnupg-devel
mailing list