Hello guys, I ran into a problem when using gpg to sign and encrypt. I have a test run below (in bash):
$echo abcd | gpg -u b...@xyz.com --output message.pgp -r al...@123.com -se --passphrase-fd 0 << EOF <123456 <EOF There is no error but after decrypt message.pgp, the file content is empty. In above run, "abcd" is the input plain text to be encrypted, 123456 is the passphrase for b...@xyz.com's private key that is used for signing the file. My requirements are "abcd" can not be saved in a file, it has to be sent to gpg as stdin. So is the passphrase, it can not be saved in a file too. It looks like when input and passphrase are all passed in as stdin, gpg only takes passphrase and consider input text as empty, which result into an empty encrypt file. Is there anyway to solve this? I tried $echo abcd | gpg -u b...@xyz.com --batch --output message.pgp -r al...@123.com -se --passphrase "123456" but gpg gave error like: gpg: skipped `...@xyz.com': bad passphrase gpg: [stdin]: sign+encrypt failed: bad passphrase Thanks! _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users