On Mon, Mar 16, 2009 at 12:10 PM, <ved...@hush.com> wrote: > Andrew Flerchinger icrf.ml at gmail.com > wrote on Mon Mar 16 14:10:31 CET 2009 : > > > > If I pass in --yes, it does indeed overwrite as I'd > > If I don't, it does NOT overwrite the file. > > > it's just not telling me there was a problem with > > decryption like it does when I'm encrypting something. > > > there isn't a problem with decrypting, > > gnupg asks if you want to overwrite, > and if you answer no (N) > then it asks you where you want the file to be written to > > here is what i get when i try it (on windows) without the --yes > option : > > > c:\gnupg>gpg --passphrase aaaa1 --output c:\q.txt --decrypt > c:\q.txt.gpg > :pubkey enc packet: version 3, algo 1, keyid 7DC4274AF9015496 > data: [2047 bits] > gpg: public key is F9015496 > > You need a passphrase to unlock the secret key for > user: "aaaa1 <aa...@key.test>" > 2048-bit RSA key, ID F9015496, created 2005-12-01 > > gpg: encrypted with 2048-bit RSA key, ID F9015496, created 2005-12- > 01 > "aaaa1 <aa...@key.test>" > gpg: TWOFISH encrypted data > :compressed packet: algo=1 > :literal data packet: > mode b (62), created 1236869352, name="q.txt", > raw data: 3 bytes > gpg: original file name='q.txt' > File `c:\q.txt' exists. Overwrite? (y/N) n > Enter new filename: > Enter new filename: c:\q2.txt > gpg: decryption okay > gpg: session key: > `10:6EB46AC795C6CCB418116E50DDFDC8CBD3D345761C2759DD5223E8D5D30923DC > ' > > n.b. > i use the options of 'verbose verbose', > so gnupg gives a lot more information than what you might be used > to seeing > > here it is again without the 'verbose' options: > > c:\gnupg>gpg --passphrase aaaa1 --output c:\q.txt --decrypt > c:\q.txt.gpg > > You need a passphrase to unlock the secret key for > user: "aaaa1 <aa...@key.test>" > 2048-bit RSA key, ID F9015496, created 2005-12-01 > > gpg: encrypted with 2048-bit RSA key, ID F9015496, created 2005-12- > 01 > "aaaa1 <aa...@key.test>" > File `c:\q.txt' exists. Overwrite? (y/N) y > gpg: session key: > `10:6EB46AC795C6CCB418116E50DDFDC8CBD3D345761C2759DD5223E8D5D30923DC > ' > > c:\gnupg> > > > so, > does gnupg prompt you to 'overwrite' if you don't use the --yes > option ? > > > vedaal >
Yes, I do see that behavior. The primary difference is that I never want it to prompt me for anything, since I'm writing a headless wrapper. Try including the --batch parameter, which suppresses any interaction. I can't find any indication that it failed to overwrite the destination by return code or program output. It works just fine when encrypting, though, which is what has me confused. I can work around it (mostly, the operation won't be atomic, but it's probably close enough for me), but the inconsistency between encrypt/decrypt gave me pause. Thanks. Andrew
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users