Page MenuHome GnuPG

Decrypting Files Automatically using --passphrase-fd option
Closed, ResolvedPublic

Description

Environment

MS Windows

Description

--passphrase-fd option fails un Windows platform
See blow for example :

C:\Data\NetBI\temp>dir pp

Volume in drive C has no label.
Volume Serial Number is D854-6D6B
 
Directory of C:\Data\NetBI\temp

15/02/2006 16:53 9 pp

1 File(s)              9 bytes
0 Dir(s)  66,789,579,264 bytes free

C:\Data\NetBI\temp>type pp
hillsy

C:\Data\NetBI\temp>type pp | gpg --passphrase-fd 0 -se -r www.netbi.com.au -o a
.a.gpg a.a
Reading passphrase from file descriptor 0

You need a passphrase to unlock the secret key for
user: "Mark Hills (www.metrotas.com.au) <markhills@metrotas.com.au>"
1024-bit DSA key, ID 4EC79632, created 2006-02-15

gpg: no default secret key: bad passphrase
gpg: a.a: sign+encrypt failed: bad passphrase

How To Repeat

C:\Data\NetBI\temp>dir pp

Volume in drive C has no label.
Volume Serial Number is D854-6D6B
 
Directory of C:\Data\NetBI\temp

15/02/2006 16:53 9 pp

1 File(s)              9 bytes
0 Dir(s)  66,789,579,264 bytes free

C:\Data\NetBI\temp>type pp
hillsy

C:\Data\NetBI\temp>type pp | gpg --passphrase-fd 0 -se -r www.netbi.com.au -o a
.a.gpg a.a
Reading passphrase from file descriptor 0

You need a passphrase to unlock the secret key for
user: "Mark Hills (www.metrotas.com.au) <markhills@metrotas.com.au>"
1024-bit DSA key, ID 4EC79632, created 2006-02-15

gpg: no default secret key: bad passphrase
gpg: a.a: sign+encrypt failed: bad passphrase

Fix

Unknown

Details

Due Date
Nov 20 2007, 1:00 AM

Event Timeline

werner added a subscriber: werner.

Need to check what's going on.

werner lowered the priority of this task from High to Normal.Oct 19 2006, 5:59 PM
werner set Due Date to Apr 20 2007, 2:00 AM.Apr 5 2007, 12:50 PM

You have a trailing space in the file, i.e.

hillsy<space><cr><lf>

To create a file without such a space, use

echo hillsy>pp

and not

echo hillsy >pp

The Windows echo command and the shell are different and inferior to what we are
used to under Unix. We can't change that because trailing spaces are allowed in
a passphrase

werner changed Due Date from Apr 20 2007, 2:00 AM to Nov 20 2007, 1:00 AM.