How to verify a signed&encrypted file in script

Todd Freedom_Lover at pobox.com
Fri Oct 17 12:29:06 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yang Xiaopeng wrote:
>    gpg -o file -d file.gpg
> 
> can decrypt and verify the file, but the script doesn't know whether
> the file have a valid signature by checking the return value.

Take a look at the --status-fd option.  That will get you the info you
need about the signature status.

If that doesn't help you, maybe you could encrypt the file and then
make a detached sig of that, so you would have file.gpg and
file.gpg.sig.

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
If a government were put in charge of the Sahara Desert, within five
years they'd have a shortage of sand.
    -- Dr. Milton Friedman

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iD8DBQE/kArCuv+09NZUB1oRAm/iAJ4yhoEAYxO1USuDkQ5OB1V/ZbYn1gCguI7i
zcL8ZEOY+VGe2c9o/nQ3XRE=
=/8y1
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list