Problem with passphrase

Ping Kam pkam@quikcard.com
Tue Jun 3 23:30:02 2003


Hi:

I am trying to write a cmd file to automate the process.  What I try to do
is create a window interface which creates a cmd file in the background and
execute the cmd with ShellExecute.

I run the cmd file in the command prompt, I got the following message:

Reading passphrase from file descriptor 0 ...

You need a passphrase to unlock the secret key for
user: "QSI2NSCS (QSI to NSCS user account)"
1024-bit DSA key, ID CB031107, created 2002-05-14

gpg: skipped `QSI2NSCS': bad passphrase
gpg: C:\TEST\test1.txt: sign+encrypt failed: bad passphrase

It does not matter whether the passphrase is valid or not.

So I take out the passphrase out from the cmd file.  Now GPG prompt me for
the passphrase.  The following screen capture show the whole process:

You need a passphrase to unlock the secret key for
user: "QSI2NSCS (QSI to NSCS user account)"
1024-bit DSA key, ID CB031107, created 2002-05-14

Could not find a valid trust path to the key.  Let's see whether we
can assign some missing owner trust values.

No path leading to one of our keys found.

1024g/87BED04F 2002-05-07 "nscsuser (nscsuser key) <csprod@gov.ns.ca>"
             Fingerprint: E416 C940 0FB7 CC06 2F8F  44FE 055F AFED 87BE D04F

It is NOT certain that the key belongs to its owner.
If you *really* know what you are doing, you may answer
the next question with yes

Use this key anyway? y

Now the output file is created.  What can I do to use suppress these
messages and put the passphrase into the cmd file.

Another question, how can we save the message into a log file so we can
troubleshoot it when there is an error?

Thanks,
Ping Kam