--gen-key & pipes
anthony at kcn.ne.jp
Tue Nov 9 00:13:02 CET 1999
I'm writing a Gnome frontend for gnupg and I've experienced problems writing to and reading from a "gpg --gen-key" child process.
Basically, I want take the key type, expiration, passphrase and other information from a dialog box and then write to a child process which exec's "gpg --gen-key", however piping the output of the parent process to the standard input of the child process doesn't seem to work.
I examined the source of ttyio.c and it seems that gnupg doesn't use standard input to read in the user input. Is this correct? What is the reason for this I/O method? Does it have some advantages over the standard I/O routines? For other commands, I can easily read the output of the gnupg child process using pipes, but the --gen-key command seems to be different.
Does anybody have any suggestions on how to solve this problem? Alternatively, is the gcrypt library advanced enough to use it to generate keys?
Anthony Mulcahy <anthony at kcn.ne.jp> GPG Key ID 61CA8871
More information about the Gnupg-devel