Passphrase from external program, script, or batch file
Wed, 6 Dec 2000 00:07:10 +0100 (MET)
> I saw something like --passphrase-fd in the archive, but I don't
> understand what it means or is really doing. Can anybody explain?
A file descriptor is an even more low-level function than a file. They
are represented by numbers, 0 = standard input, 1 = standard output and
2 = standard error (on DOS, stderr == stdout, NT follows the unix
convention here). However, you can also open higher numbers. If you have
opened such an fd, you can send data through it via something that is
called a pipe. One end sends data, the other end reads it (for 2-way
communication you'll have to open 2 fd's). Opening a fd and a pipe to send
data through it are standard methods in many programming languages,
including C and perl.
More information about fd's can be found in K&R chapter 8, and for piping
through an fd I have some example code in C (unix specific I'm affraid,
but the piping might also work in windows) if you're interested (a program
I once wrote to communicate this way with pgp 2.6.3).
ir. J.C.A. Wevers // Physics and science fiction site:
firstname.lastname@example.org // http://www.xs4all.nl/~johanw/index.html
PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to email@example.com