"--passphrase-fd n" not working

pd pd4953@myrealbox.com
Tue Oct 2 18:39:02 2001


At 11:43 PM 10/1/2001 +0200, you wrote:

>On Mon, 01 Oct 2001 16:21:37 -0400, pd said:
>
> > I can't get it to work. When I put in a filename it says it is
> > looking for file descriptor 0. Is the file descriptor here something
> > different than the filename? I tried inode number and that doesn't
>
>Yes, it is different. I suggest that you read some basic text on Unix
>like Steven's APUE. Or try it out:
>
>The standard output is usually assigned to FD 1, standard error to FD
>2. You might have notices things like
>
> foo 2>/dev/null
>
>which sends all error output (standard error = FD 2) to the /dev/null
>file/device. Or the more common one:
>
> foo >myfile
>
>which is the same as
>
> foo 1>myfile
Yes, I am familiar with these numbers. I didn't know they were called "file descriptors". I just looked at an excellent shell scripting book that verified what you said. (Unix Shell Programming. Lowell Jay Arthur & Ted Burns).
>So, why do we want to pass FD on the commandline? Not all FD are
>assigned to a file, oftne they are ahndles for pipes which are used
>for interprocess communication like:
>
> foo | bar
>
>where the shell build a pipe to direct the fd 1 of foo to the fd 0 of bar.
>
>See the source of gpgme for an example on how to use this gpg
>feature. strace may help you to get idea what's going on tehre.
I downloaded it but don't see anything on --passphrase-fd . All I could find on strace was in ltmain.sh. I couldn't find any examples there. However, with your help and others I have found that both of the following work for me: gpg --decrypt -r george --passphrase-fd 0 <pass.txt encrypted.txt gpg --decrypt -r george --passphrase-fd 3 3<pass.txt encrypted.txt Is there any way to do this with pipes instead of an actual file? I have a number of encrypted texts encrypted with the same key. I'd like to have a perl program prompt for the passphrase once and decrypt the texts without storing it in a file on the hard drive. If I replace "pass.txt" with the password or with `echo password_text` it tells me it can't find the file by that name. Another basic Unix script problem I think - making a string look like file contents. There has to be a way to do it, I just haven't been able to come up with it yet. Any help would be appreciated. Thanks, Paul
>Hth,
>
> Werner
>
>
>--
>Werner Koch Omnis enim res, quae dando non deficit, dum habetur
>g10 Code GmbH et non datur, nondum habetur, quomodo habenda est.
>Privacy Solutions -- Augustinus
>
>
>_______________________________________________
>Gnupg-users mailing list
>Gnupg-users@gnupg.org
>http://lists.gnupg.org/mailman/listinfo/gnupg-users